@mseep/affine-mcp-server 2.3.0
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 +22 -0
- package/README.md +270 -0
- package/bin/affine-mcp +5 -0
- package/dist/auth.js +61 -0
- package/dist/cli.js +726 -0
- package/dist/config.js +178 -0
- package/dist/edgeless/layout.js +222 -0
- package/dist/graphqlClient.js +116 -0
- package/dist/httpAuth.js +147 -0
- package/dist/httpDiagnostics.js +38 -0
- package/dist/index.js +209 -0
- package/dist/markdown/parse.js +559 -0
- package/dist/markdown/render.js +227 -0
- package/dist/markdown/types.js +1 -0
- package/dist/oauth.js +154 -0
- package/dist/sse.js +261 -0
- package/dist/toolSurface.js +349 -0
- package/dist/tools/accessTokens.js +45 -0
- package/dist/tools/auth.js +18 -0
- package/dist/tools/blobStorage.js +136 -0
- package/dist/tools/comments.js +104 -0
- package/dist/tools/docs.js +7478 -0
- package/dist/tools/history.js +22 -0
- package/dist/tools/icons.js +125 -0
- package/dist/tools/notifications.js +79 -0
- package/dist/tools/organize.js +1145 -0
- package/dist/tools/properties.js +426 -0
- package/dist/tools/user.js +13 -0
- package/dist/tools/userCRUD.js +77 -0
- package/dist/tools/workspaces.js +322 -0
- package/dist/util/explorerIcon.js +95 -0
- package/dist/util/mcp.js +28 -0
- package/dist/ws.js +113 -0
- package/docs/assets/edgeless-canvas-demo-advanced-dark.png +0 -0
- package/docs/assets/edgeless-canvas-demo-advanced-light.png +0 -0
- package/docs/client-setup.md +174 -0
- package/docs/configuration-and-deployment.md +265 -0
- package/docs/edgeless-canvas-cookbook.md +226 -0
- package/docs/getting-started.md +229 -0
- package/docs/tool-reference.md +200 -0
- package/docs/workflow-recipes.md +147 -0
- package/package.json +118 -0
- package/tool-manifest.json +99 -0
package/package.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mseep/affine-mcp-server",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Model Context Protocol server for AFFiNE - enables AI assistants to interact with AFFiNE workspaces, documents, and collaboration features.",
|
|
7
|
+
"author": "dawncr0w",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/DAWNCR0W/affine-mcp-server.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/DAWNCR0W/affine-mcp-server/issues"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/DAWNCR0W/affine-mcp-server#readme",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mcp",
|
|
19
|
+
"affine",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"ai",
|
|
22
|
+
"claude",
|
|
23
|
+
"knowledge-base",
|
|
24
|
+
"mseep",
|
|
25
|
+
"mcp-server"
|
|
26
|
+
],
|
|
27
|
+
"main": "dist/index.js",
|
|
28
|
+
"bin": {
|
|
29
|
+
"affine-mcp": "bin/affine-mcp"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "node -e \"require('fs').rmSync('dist',{ recursive: true, force: true })\"",
|
|
33
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
34
|
+
"dev": "tsx watch src/index.ts",
|
|
35
|
+
"start": "node dist/index.js",
|
|
36
|
+
"start:http": "MCP_TRANSPORT=http node dist/index.js",
|
|
37
|
+
"test": "npm run test:tool-manifest",
|
|
38
|
+
"test:cli-version": "node tests/test-cli-version.mjs",
|
|
39
|
+
"test:cli-commands": "node tests/test-cli-commands.mjs",
|
|
40
|
+
"test:cli-live": "node tests/test-cli-live.mjs",
|
|
41
|
+
"test:tool-manifest": "node scripts/verify-tool-manifest.mjs",
|
|
42
|
+
"test:tool-filtering": "node tests/test-tool-filtering.mjs",
|
|
43
|
+
"test:comprehensive": "bash tests/run-comprehensive.sh",
|
|
44
|
+
"test:comprehensive:raw": "node test-comprehensive.mjs",
|
|
45
|
+
"test:e2e": "bash tests/run-e2e.sh",
|
|
46
|
+
"test:db-create": "node tests/test-database-creation.mjs",
|
|
47
|
+
"test:db-cells": "node tests/test-database-cells.mjs",
|
|
48
|
+
"test:db-linked-doc": "node tests/test-database-linked-doc.mjs",
|
|
49
|
+
"test:db-ui-rows": "node tests/test-database-ui-rows.mjs",
|
|
50
|
+
"test:db-schema": "node tests/test-database-schema.mjs",
|
|
51
|
+
"test:data-view": "node tests/test-data-view.mjs",
|
|
52
|
+
"test:doc-discovery": "node tests/test-doc-discovery.mjs",
|
|
53
|
+
"test:doc-properties": "node tests/test-doc-properties.mjs",
|
|
54
|
+
"test:icons": "node tests/test-icons.mjs",
|
|
55
|
+
"test:read-doc-linked-refs": "node tests/test-read-doc-linked-refs.mjs",
|
|
56
|
+
"test:find-doc-by-title": "node tests/test-find-doc-by-title.mjs",
|
|
57
|
+
"test:create-placement": "node tests/test-create-placement.mjs",
|
|
58
|
+
"test:surface-elements": "node tests/test-surface-elements.mjs",
|
|
59
|
+
"test:surface-element-gating": "node scripts/verify-surface-element-gating.mjs",
|
|
60
|
+
"test:edgeless-seed": "node tests/test-edgeless-canvas-setup.mjs",
|
|
61
|
+
"test:edgeless-ui": "npx playwright test tests/playwright/verify-edgeless-canvas.pw.ts --config tests/playwright/playwright.config.ts",
|
|
62
|
+
"test:capabilities-fidelity": "node tests/test-capabilities-fidelity.mjs",
|
|
63
|
+
"test:native-template": "node tests/test-native-template-instantiation.mjs",
|
|
64
|
+
"test:data-view-ui": "npx playwright test tests/playwright/verify-data-view.pw.ts --config tests/playwright/playwright.config.ts",
|
|
65
|
+
"test:bearer": "node tests/test-bearer-auth.mjs",
|
|
66
|
+
"test:http-email-password": "node tests/test-http-email-password.mjs",
|
|
67
|
+
"test:http-bearer": "node tests/test-http-bearer.mjs",
|
|
68
|
+
"test:oauth-http": "node tests/test-oauth-http.mjs",
|
|
69
|
+
"test:organize": "node tests/test-organize-tools.mjs",
|
|
70
|
+
"test:create-doc-folder-placement": "node tests/test-create-doc-folder-placement.mjs",
|
|
71
|
+
"test:supporting-tools": "node tests/test-supporting-tools.mjs",
|
|
72
|
+
"test:tag-visibility": "node tests/test-tag-visibility.mjs",
|
|
73
|
+
"test:markdown-roundtrip": "node tests/test-markdown-roundtrip.mjs",
|
|
74
|
+
"test:markdown-rich-text-import": "node tests/test-markdown-rich-text-import.mjs",
|
|
75
|
+
"test:playwright": "npx playwright test --config tests/playwright/playwright.config.ts",
|
|
76
|
+
"pack:check": "npm pack --dry-run",
|
|
77
|
+
"ci": "npm run build && npm run test:tool-manifest && npm run pack:check",
|
|
78
|
+
"prepublishOnly": "npm run ci"
|
|
79
|
+
},
|
|
80
|
+
"files": [
|
|
81
|
+
"bin",
|
|
82
|
+
"dist",
|
|
83
|
+
"docs",
|
|
84
|
+
"README.md",
|
|
85
|
+
"tool-manifest.json",
|
|
86
|
+
"LICENSE"
|
|
87
|
+
],
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=18"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"@modelcontextprotocol/sdk": "^1.17.2",
|
|
96
|
+
"cors": "^2.8.6",
|
|
97
|
+
"express": "^5.2.1",
|
|
98
|
+
"form-data": "^4.0.4",
|
|
99
|
+
"jose": "^6.2.1",
|
|
100
|
+
"fractional-indexing": "^3.2.0",
|
|
101
|
+
"markdown-it": "^14.1.0",
|
|
102
|
+
"node-fetch": "^3.3.2",
|
|
103
|
+
"socket.io-client": "^4.8.1",
|
|
104
|
+
"undici": "^8.0.2",
|
|
105
|
+
"yjs": "^13.6.27",
|
|
106
|
+
"zod": "^3.23.8"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@playwright/test": "^1.50.0",
|
|
110
|
+
"@types/cors": "^2.8.19",
|
|
111
|
+
"@types/express": "^5.0.6",
|
|
112
|
+
"@types/markdown-it": "^14.1.2",
|
|
113
|
+
"@types/node": "^25.2.3",
|
|
114
|
+
"tsx": "^4.16.2",
|
|
115
|
+
"typescript": "^6.0.2"
|
|
116
|
+
},
|
|
117
|
+
"publisher": "mseep"
|
|
118
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.3.0",
|
|
3
|
+
"tools": [
|
|
4
|
+
"add_database_column",
|
|
5
|
+
"add_database_row",
|
|
6
|
+
"add_doc_to_collection",
|
|
7
|
+
"add_organize_link",
|
|
8
|
+
"add_surface_element",
|
|
9
|
+
"add_tag_to_doc",
|
|
10
|
+
"analyze_doc_fidelity",
|
|
11
|
+
"append_block",
|
|
12
|
+
"append_markdown",
|
|
13
|
+
"append_semantic_section",
|
|
14
|
+
"cleanup_blobs",
|
|
15
|
+
"clear_doc_property",
|
|
16
|
+
"compose_database_from_intent",
|
|
17
|
+
"create_collection",
|
|
18
|
+
"create_comment",
|
|
19
|
+
"create_custom_property",
|
|
20
|
+
"create_doc",
|
|
21
|
+
"create_doc_from_markdown",
|
|
22
|
+
"create_folder",
|
|
23
|
+
"create_semantic_page",
|
|
24
|
+
"create_tag",
|
|
25
|
+
"create_workspace",
|
|
26
|
+
"create_workspace_blueprint",
|
|
27
|
+
"current_user",
|
|
28
|
+
"delete_blob",
|
|
29
|
+
"delete_block",
|
|
30
|
+
"delete_collection",
|
|
31
|
+
"delete_comment",
|
|
32
|
+
"delete_custom_property",
|
|
33
|
+
"delete_database_row",
|
|
34
|
+
"delete_doc",
|
|
35
|
+
"delete_folder",
|
|
36
|
+
"delete_organize_link",
|
|
37
|
+
"delete_surface_element",
|
|
38
|
+
"delete_workspace",
|
|
39
|
+
"export_doc_markdown",
|
|
40
|
+
"export_with_fidelity_report",
|
|
41
|
+
"find_doc_by_title",
|
|
42
|
+
"generate_access_token",
|
|
43
|
+
"get_capabilities",
|
|
44
|
+
"get_collection",
|
|
45
|
+
"get_doc",
|
|
46
|
+
"get_doc_icon",
|
|
47
|
+
"get_edgeless_canvas",
|
|
48
|
+
"get_folder_icon",
|
|
49
|
+
"get_orphan_docs",
|
|
50
|
+
"get_workspace",
|
|
51
|
+
"inspect_template_structure",
|
|
52
|
+
"instantiate_template_native",
|
|
53
|
+
"list_access_tokens",
|
|
54
|
+
"list_children",
|
|
55
|
+
"list_collections",
|
|
56
|
+
"list_comments",
|
|
57
|
+
"list_doc_properties",
|
|
58
|
+
"list_docs",
|
|
59
|
+
"list_docs_by_tag",
|
|
60
|
+
"list_histories",
|
|
61
|
+
"list_notifications",
|
|
62
|
+
"list_organize_nodes",
|
|
63
|
+
"list_surface_elements",
|
|
64
|
+
"list_tags",
|
|
65
|
+
"list_workspace_tree",
|
|
66
|
+
"list_workspaces",
|
|
67
|
+
"move_doc",
|
|
68
|
+
"move_organize_node",
|
|
69
|
+
"publish_doc",
|
|
70
|
+
"read_all_notifications",
|
|
71
|
+
"read_database_cells",
|
|
72
|
+
"read_database_columns",
|
|
73
|
+
"read_doc",
|
|
74
|
+
"remove_doc_from_collection",
|
|
75
|
+
"remove_tag_from_doc",
|
|
76
|
+
"rename_folder",
|
|
77
|
+
"replace_doc_with_markdown",
|
|
78
|
+
"resolve_comment",
|
|
79
|
+
"revoke_access_token",
|
|
80
|
+
"revoke_doc",
|
|
81
|
+
"search_docs",
|
|
82
|
+
"set_doc_property",
|
|
83
|
+
"sign_in",
|
|
84
|
+
"update_collection",
|
|
85
|
+
"update_collection_rules",
|
|
86
|
+
"update_comment",
|
|
87
|
+
"update_database_row",
|
|
88
|
+
"update_doc_icon",
|
|
89
|
+
"update_doc_title",
|
|
90
|
+
"update_edgeless_block",
|
|
91
|
+
"update_folder_icon",
|
|
92
|
+
"update_frame_children",
|
|
93
|
+
"update_profile",
|
|
94
|
+
"update_settings",
|
|
95
|
+
"update_surface_element",
|
|
96
|
+
"update_workspace",
|
|
97
|
+
"upload_blob"
|
|
98
|
+
]
|
|
99
|
+
}
|