notion-mcp-server 2.4.2 → 2.4.4
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 +5 -7
- package/build/operations/files.js +14 -4
- package/package.json +17 -3
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ A Personal Access Token (PAT) is like a key that lets the AI act as **you** insi
|
|
|
84
84
|
"mcpServers": {
|
|
85
85
|
"notion": {
|
|
86
86
|
"command": "npx",
|
|
87
|
-
"args": ["-y", "
|
|
87
|
+
"args": ["-y", "notion-mcp-server"],
|
|
88
88
|
"env": {
|
|
89
89
|
"NOTION_TOKEN": "ntn_paste_your_token_here"
|
|
90
90
|
}
|
|
@@ -93,7 +93,7 @@ A Personal Access Token (PAT) is like a key that lets the AI act as **you** insi
|
|
|
93
93
|
}
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
> **What is this block?** It tells Claude Desktop how to launch the Notion connector. `npx` is a small tool that downloads and runs the connector automatically the first time — you don't install anything separately, it happens in the background (the first run may take
|
|
96
|
+
> **What is this block?** It tells Claude Desktop how to launch the Notion connector. `npx` is a small tool that downloads and runs the connector automatically the first time — you don't install anything separately, it happens in the background (the first run may take a few seconds). `env` is where your Notion token goes. Leave every quote mark and bracket exactly as shown; the only thing you change is the token.
|
|
97
97
|
|
|
98
98
|
4. Replace `ntn_paste_your_token_here` with the token you copied in Step 1 — **leave the quotation marks around it**.
|
|
99
99
|
5. **Save** the file (`Cmd+S` / `Ctrl+S`).
|
|
@@ -221,14 +221,12 @@ NOTION_TOKEN=secret_xxx NOTION_PAGE_ID=abc123... node build/index.js
|
|
|
221
221
|
|
|
222
222
|
### Claude Code / Cursor / Claude Desktop
|
|
223
223
|
|
|
224
|
-
> ⚠️ **Heads-up while the v2 line stabilizes on npm.** The latest published `notion-mcp-server` on npm is **v1.x**; this repo is **v2.4**. Until v2 is published, the install snippets below pull from GitHub via `npx -y github:awkoy/notion-mcp-server` (npm builds from source on first run). Once v2 is on npm, you can swap that for plain `notion-mcp-server@^2`.
|
|
225
|
-
|
|
226
224
|
**Claude Code:**
|
|
227
225
|
|
|
228
226
|
```bash
|
|
229
227
|
claude mcp add notion -s user \
|
|
230
228
|
-e NOTION_TOKEN=ntn_paste_your_token_here \
|
|
231
|
-
-- npx -y
|
|
229
|
+
-- npx -y notion-mcp-server
|
|
232
230
|
```
|
|
233
231
|
|
|
234
232
|
**Cursor** (`~/.cursor/mcp.json`) **or Claude Desktop** (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` · Windows: `%APPDATA%\Claude\claude_desktop_config.json`):
|
|
@@ -238,7 +236,7 @@ claude mcp add notion -s user \
|
|
|
238
236
|
"mcpServers": {
|
|
239
237
|
"notion": {
|
|
240
238
|
"command": "npx",
|
|
241
|
-
"args": ["-y", "
|
|
239
|
+
"args": ["-y", "notion-mcp-server"],
|
|
242
240
|
"env": {
|
|
243
241
|
"NOTION_TOKEN": "ntn_paste_your_token_here"
|
|
244
242
|
}
|
|
@@ -295,7 +293,7 @@ To find a page ID: open the page in Notion → **Share → Copy link**. The ID i
|
|
|
295
293
|
claude mcp add notion -s user \
|
|
296
294
|
-e NOTION_TOKEN=ntn_xxx \
|
|
297
295
|
-e NOTION_PAGE_ID=abc123... \
|
|
298
|
-
-- npx -y
|
|
296
|
+
-- npx -y notion-mcp-server
|
|
299
297
|
```
|
|
300
298
|
|
|
301
299
|
---
|
|
@@ -17,19 +17,29 @@ const SourceSchema = z.discriminatedUnion("type", [
|
|
|
17
17
|
url: z.url().describe("Public URL to fetch the file bytes from."),
|
|
18
18
|
}),
|
|
19
19
|
]);
|
|
20
|
+
// Returns Uint8Array<ArrayBuffer> — the DOM Blob constructor's BlobPart type
|
|
21
|
+
// rejects Uint8Array<ArrayBufferLike> under newer @types/node (it widens to
|
|
22
|
+
// include SharedArrayBuffer). Allocating fresh guarantees the concrete type.
|
|
20
23
|
async function resolveBytes(source) {
|
|
21
|
-
if (source.type === "base64")
|
|
22
|
-
|
|
24
|
+
if (source.type === "base64") {
|
|
25
|
+
const buf = Buffer.from(source.data, "base64");
|
|
26
|
+
const out = new Uint8Array(buf.byteLength);
|
|
27
|
+
out.set(buf);
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
23
30
|
const res = await fetch(source.url);
|
|
24
31
|
if (!res.ok) {
|
|
25
32
|
throw new Error(`Failed to fetch ${source.url}: ${res.status} ${res.statusText}`);
|
|
26
33
|
}
|
|
27
|
-
return
|
|
34
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
28
35
|
}
|
|
29
36
|
function splitIntoParts(buf, partSize = MAX_PART_BYTES) {
|
|
30
37
|
const parts = [];
|
|
31
38
|
for (let offset = 0; offset < buf.length; offset += partSize) {
|
|
32
|
-
|
|
39
|
+
const end = Math.min(offset + partSize, buf.length);
|
|
40
|
+
const part = new Uint8Array(end - offset);
|
|
41
|
+
part.set(buf.subarray(offset, end));
|
|
42
|
+
parts.push(part);
|
|
33
43
|
}
|
|
34
44
|
return parts;
|
|
35
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notion-mcp-server",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"notion-mcp-server": "build/index.js"
|
|
@@ -16,13 +16,27 @@
|
|
|
16
16
|
"homepage": "https://github.com/awkoy/notion-mcp-server",
|
|
17
17
|
"keywords": [
|
|
18
18
|
"notion",
|
|
19
|
+
"notion-mcp",
|
|
20
|
+
"notion-mcp-server",
|
|
21
|
+
"notion-api",
|
|
22
|
+
"notion-integration",
|
|
19
23
|
"mcp",
|
|
24
|
+
"mcp-server",
|
|
20
25
|
"modelcontextprotocol",
|
|
21
|
-
"
|
|
26
|
+
"model-context-protocol",
|
|
27
|
+
"claude",
|
|
28
|
+
"claude-desktop",
|
|
29
|
+
"cursor",
|
|
30
|
+
"chatgpt",
|
|
31
|
+
"anthropic",
|
|
32
|
+
"ai",
|
|
33
|
+
"ai-agent",
|
|
34
|
+
"agent",
|
|
35
|
+
"llm"
|
|
22
36
|
],
|
|
23
37
|
"author": "Yaroslav Boiko <y.boikodeveloper@gmail.com>",
|
|
24
38
|
"license": "MIT",
|
|
25
|
-
"description": "MCP for Notion",
|
|
39
|
+
"description": "Notion MCP server for Claude, Cursor, ChatGPT, and Claude Desktop — connect AI agents to Notion via the Model Context Protocol. Create pages, query databases, append blocks, upload files, and more in natural language.",
|
|
26
40
|
"files": [
|
|
27
41
|
"build"
|
|
28
42
|
],
|