notion-mcp-server 0.0.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/LICENSE +21 -0
- package/README.md +236 -0
- package/build/config/index.js +5 -0
- package/build/index.js +17 -0
- package/build/resources/imageList.js +62 -0
- package/build/resources/index.js +1 -0
- package/build/resources/predictionList.js +43 -0
- package/build/resources/svgList.js +69 -0
- package/build/schema/annotations.js +15 -0
- package/build/schema/blocks.js +209 -0
- package/build/schema/color.js +22 -0
- package/build/schema/file.js +11 -0
- package/build/schema/icon.js +10 -0
- package/build/schema/lang.js +77 -0
- package/build/schema/mention.js +102 -0
- package/build/schema/notion.js +57 -0
- package/build/schema/page.js +68 -0
- package/build/schema/preprocess.js +1 -0
- package/build/schema/rich-text.js +71 -0
- package/build/schema/richText.js +757 -0
- package/build/schema/timezone.js +599 -0
- package/build/schema/tools.js +17 -0
- package/build/server/index.js +27 -0
- package/build/services/notion.js +20 -0
- package/build/services/replicate.js +23 -0
- package/build/tools/appendBlockChildren.js +25 -0
- package/build/tools/batchAppendBlockChildren.js +33 -0
- package/build/tools/batchDeleteBlocks.js +32 -0
- package/build/tools/batchMixedOperations.js +58 -0
- package/build/tools/batchUpdateBlocks.js +33 -0
- package/build/tools/createPage.js +18 -0
- package/build/tools/createPrediction.js +28 -0
- package/build/tools/deleteBlock.js +24 -0
- package/build/tools/formatRichText.js +83 -0
- package/build/tools/generateImage.js +48 -0
- package/build/tools/generateImageVariants.js +105 -0
- package/build/tools/generateMultipleImages.js +60 -0
- package/build/tools/generateSVG.js +43 -0
- package/build/tools/getPrediction.js +22 -0
- package/build/tools/index.js +31 -0
- package/build/tools/predictionList.js +30 -0
- package/build/tools/retrieveBlock.js +24 -0
- package/build/tools/retrieveBlockChildren.js +32 -0
- package/build/tools/searchPage.js +28 -0
- package/build/tools/updateBlock.js +25 -0
- package/build/tools/updatePage.js +40 -0
- package/build/types/blocks.js +11 -0
- package/build/types/emoji.js +1 -0
- package/build/types/index.js +1 -0
- package/build/types/notion.js +1 -0
- package/build/types/page.js +6 -0
- package/build/types/richText.js +1 -0
- package/build/types/tools.js +1 -0
- package/build/utils/blob.js +5 -0
- package/build/utils/error.js +127 -0
- package/build/utils/image.js +34 -0
- package/build/utils/index.js +1 -0
- package/build/utils/richText.js +174 -0
- package/build/validation/blocks.js +568 -0
- package/build/validation/notion.js +51 -0
- package/build/validation/page.js +262 -0
- package/build/validation/richText.js +744 -0
- package/build/validation/tools.js +16 -0
- package/package.json +44 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { blockSchema } from "./blocks.js";
|
|
3
|
+
import { parentSchema } from "./page.js";
|
|
4
|
+
export const createPageSchema = {
|
|
5
|
+
parent: parentSchema,
|
|
6
|
+
properties: z.object({
|
|
7
|
+
title: z.object({
|
|
8
|
+
title: z.array(z.any()), // Rich text array
|
|
9
|
+
}),
|
|
10
|
+
}),
|
|
11
|
+
children: z.array(blockSchema).optional(),
|
|
12
|
+
};
|
|
13
|
+
export const appendBlocksSchema = {
|
|
14
|
+
block_id: z.string(),
|
|
15
|
+
children: z.array(blockSchema),
|
|
16
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "notion-mcp-server",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"notion-mcp-server": "build/index.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc && shx chmod +x build/*.js",
|
|
10
|
+
"prepare": "npm run build",
|
|
11
|
+
"watch": "tsc --watch",
|
|
12
|
+
"inspector": "npx @modelcontextprotocol/inspector build/index.js -e NOTION_TOKEN=your_notion_token -e NOTION_PAGE_ID=your_notion_page_id"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/awkoy/notion-mcp-server",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"notion",
|
|
17
|
+
"mcp",
|
|
18
|
+
"modelcontextprotocol",
|
|
19
|
+
"ai"
|
|
20
|
+
],
|
|
21
|
+
"author": "Yaroslav Boiko <y.boikodeveloper@gmail.com>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"description": "MCP for Notion",
|
|
24
|
+
"files": [
|
|
25
|
+
"build"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.7.0",
|
|
29
|
+
"@notionhq/client": "^2.3.0",
|
|
30
|
+
"zod": "^3.24.2"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "^22.13.10",
|
|
34
|
+
"shx": "^0.3.4",
|
|
35
|
+
"typescript": "^5.8.2"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/awkoy/notion-mcp-server.git"
|
|
43
|
+
}
|
|
44
|
+
}
|