engram-notion-mcp 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Engram Notion MCP - Semantic Memory for AI Agents
|
|
2
|
+
|
|
3
|
+
**Engram Notion MCP** is a powerful Model Context Protocol (MCP) server that gives your AI agents a **permanent, semantic memory**. It seamlessly integrates with [Notion](https://notion.so) to store, retrieve, and organize information, turning your workspace into an intelligent knowledge base.
|
|
4
|
+
|
|
5
|
+
> 🧠 **Why Engram?**
|
|
6
|
+
> AI Agents often suffer from amnesia. Engram solves this by providing a persistent memory layer backed by Notion's robust database structure.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 📦 Features
|
|
11
|
+
|
|
12
|
+
### Notion Integration
|
|
13
|
+
| Feature | Tool Name | Description |
|
|
14
|
+
| :--- | :--- | :--- |
|
|
15
|
+
| **Page Creation** | `create_page` | Create new pages with content. Supports explicit parent IDs or defaults. |
|
|
16
|
+
| **Page Updates** | `update_page` | Append content to existing pages. |
|
|
17
|
+
| **Logging** | `log_to_notion` | Fast logging wrapper for appending notes/logs. |
|
|
18
|
+
| **Reading** | `read_page_content` | Read and parse page content into Agent-friendly text. |
|
|
19
|
+
| **Databases** | `list_databases` | detailed list of accessible databases. |
|
|
20
|
+
| **Querying** | `query_database` | Query databases with filters to find specific items. |
|
|
21
|
+
| **Organization** | `list_sub_pages` | List pages within a parent page. |
|
|
22
|
+
| **Cleanup** | `delete_block` | Archive/Delete blocks or pages. |
|
|
23
|
+
|
|
24
|
+
### Semantic Memory (SQLite)
|
|
25
|
+
| Feature | Tool Name | Description |
|
|
26
|
+
| :--- | :--- | :--- |
|
|
27
|
+
| **Store Facts** | `remember_fact` | Saves key info to internal vector-like storage. |
|
|
28
|
+
| **Search** | `search_memory` | Full-text search over stored memories. |
|
|
29
|
+
| **Recall** | `get_recent_memories`| Retrieve the latest context/facts. |
|
|
30
|
+
|
|
31
|
+
### Operations
|
|
32
|
+
| Feature | Tool Name | Description |
|
|
33
|
+
| :--- | :--- | :--- |
|
|
34
|
+
| **Alerts** | `send_alert` | Send push notifications via Telegram. |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🛠 Configuration
|
|
39
|
+
|
|
40
|
+
To use Engram Notion MCP, you need to set up your environment variables.
|
|
41
|
+
|
|
42
|
+
| Variable | Required | Description |
|
|
43
|
+
| :--- | :--- | :--- |
|
|
44
|
+
| `NOTION_API_KEY` | **Yes** | Your Notion Internal Integration Token (`secret_...`). |
|
|
45
|
+
| `NOTION_PAGE_ID` | No | Default Page ID for creating pages if no parent is specified. |
|
|
46
|
+
| `TELEGRAM_BOT_TOKEN`| No | For `send_alert` tool. |
|
|
47
|
+
| `TELEGRAM_CHAT_ID` | No | For `send_alert` tool. |
|
|
48
|
+
| `AGENT_MEMORY_PATH` | No | Custom path for the SQLite memory database. |
|
|
49
|
+
|
|
50
|
+
### 💡 Quick Setup Tips
|
|
51
|
+
|
|
52
|
+
<details>
|
|
53
|
+
<summary><strong>🔑 How to get Notion API Key</strong></summary>
|
|
54
|
+
|
|
55
|
+
1. Go to [Notion My Integrations](https://www.notion.so/my-integrations).
|
|
56
|
+
2. Click **New integration**.
|
|
57
|
+
3. Name it (e.g., "Engram Notion MCP") and submit.
|
|
58
|
+
4. Copy the **Internal Integration Secret**. this is your `NOTION_API_KEY`.
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary><strong>🤖 How to get Telegram Bot Token & Chat ID</strong></summary>
|
|
63
|
+
|
|
64
|
+
1. **Bot Token**:
|
|
65
|
+
- Open Telegram and search for **@BotFather**.
|
|
66
|
+
- Send the command `/newbot`.
|
|
67
|
+
- Follow the prompts to name your bot.
|
|
68
|
+
- Copy the **HTTP API Token**.
|
|
69
|
+
|
|
70
|
+
2. **Chat ID**:
|
|
71
|
+
- Search for **@userinfobot** in Telegram.
|
|
72
|
+
- Click Start or send `/start`.
|
|
73
|
+
- It will reply with your **Id**. Copy this number.
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Configuration Patterns
|
|
78
|
+
|
|
79
|
+
#### 1. Minimal Setup (Flexible / Unbound)
|
|
80
|
+
You can omit `NOTION_PAGE_ID` to keep the agent "unbound". It will force the agent to ask for a destination or search for one.
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
"env": {
|
|
84
|
+
"NOTION_API_KEY": "secret_your_key_here"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### 2. Multi-Page Support
|
|
89
|
+
You don't need to configure an array of IDs. **Engram relies on Notion's native permissions.**
|
|
90
|
+
To give the agent access to multiple specific pages:
|
|
91
|
+
1. Open any page in Notion.
|
|
92
|
+
2. Click the **... (three dots)** menu (top-right) -> **Connections**.
|
|
93
|
+
3. Look for the name you gave your integration (e.g., "Engram Notion MCP").
|
|
94
|
+
4. Once connected, the agent can automatically see this page using the `list_accessible_pages` tool.
|
|
95
|
+
5. **Repeat this** for any other page you want the agent to see.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🔌 Client Setup Instructions
|
|
100
|
+
Configure your favorite AI tool to use Engram Notion MCP. Click to expand your tool of choice:
|
|
101
|
+
|
|
102
|
+
<details>
|
|
103
|
+
<summary><strong>🖥️ Desktop Apps (Claude Desktop, ChatGPT)</strong></summary>
|
|
104
|
+
|
|
105
|
+
Add this to your `claude_desktop_config.json` or `mcp.json`.
|
|
106
|
+
|
|
107
|
+
**Config for using `npx` (Recommended):**
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"mcpServers": {
|
|
111
|
+
"engram": {
|
|
112
|
+
"command": "npx",
|
|
113
|
+
"args": ["-y", "engram-mcp"],
|
|
114
|
+
"env": {
|
|
115
|
+
"NOTION_API_KEY": "secret_your_key_here"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
</details>
|
|
122
|
+
|
|
123
|
+
<details>
|
|
124
|
+
<summary><strong>🆚 VS Code & Extensions (Cursor, Windsurf, Cline, Roo Code)</strong></summary>
|
|
125
|
+
|
|
126
|
+
Most VS Code environments use a `mcpServers` object in their settings.
|
|
127
|
+
|
|
128
|
+
**Generic Config:**
|
|
129
|
+
```json
|
|
130
|
+
"mcpServers": {
|
|
131
|
+
"engram": {
|
|
132
|
+
"command": "npx",
|
|
133
|
+
"args": ["-y", "engram-mcp"],
|
|
134
|
+
"env": {
|
|
135
|
+
"NOTION_API_KEY": "secret_your_key_here"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Where to put it:**
|
|
142
|
+
- **Cursor / Windsurf / VS Code**: User Settings (`settings.json`).
|
|
143
|
+
- **Cline / Roo Code**: Extension Settings -> MCP Servers.
|
|
144
|
+
- **Kilo Code**: `.kilo/config.json`.
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary><strong>⌨️ CLI Tools (Gemini CLI, Claude Code)</strong></summary>
|
|
149
|
+
|
|
150
|
+
**Gemini CLI:**
|
|
151
|
+
```bash
|
|
152
|
+
gemini mcp add engram node "npx engram-mcp" -e NOTION_API_KEY=secret_...
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Claude Code:**
|
|
156
|
+
```bash
|
|
157
|
+
export NOTION_API_KEY=secret_...
|
|
158
|
+
claude --mcp engram-mcp
|
|
159
|
+
```
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><strong>🐍 Manual / Python Native</strong></summary>
|
|
164
|
+
|
|
165
|
+
If you prefer `uvx` or have strict Python environments:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
"engram": {
|
|
169
|
+
"command": "uvx",
|
|
170
|
+
"args": ["engram-mcp"],
|
|
171
|
+
"env": { ... }
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
</details>
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🤝 Contributing
|
|
179
|
+
1. Fork the repo.
|
|
180
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`).
|
|
181
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`).
|
|
182
|
+
4. Push to the branch (`git push origin feature/amazing-feature`).
|
|
183
|
+
5. Open a Pull Request.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
Built with ❤️ using [FastMCP](https://github.com/jlowin/fastmcp).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "engram-notion-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Node.js implementation of the Engram Notion MCP server",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
"bin": {
|
|
17
17
|
"engram-mcp": "src/index.js"
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|