A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Model Context Protocol server for AFFiNE. Connect AI assistants to AFFiNE workspaces, documents, databases, and collabor
A Model Context Protocol (MCP) server for AFFiNE. It exposes AFFiNE workspaces and documents to AI assistants over stdio (default) or HTTP (/mcp) and supports both AFFiNE Cloud and self-hosted deployments.
AFFiNE MCP Server is designed for three common scenarios:
Highlights:
Scope boundaries:
New in v2.2.0: Added document custom-property tools,
read_docLinkedPage reference IDs, and table ordering fixes.
| Goal | Start here |
|---|---|
| Set up a local stdio server with the least friction | docs/getting-started.md |
| Run the server in Docker or another OCI runtime | docs/getting-started.md#path-c-run-from-the-docker-image |
| Configure Claude Code, Claude Desktop, Codex CLI, or Cursor | docs/client-setup.md |
| Run the server remotely over HTTP or behind OAuth | docs/configuration-and-deployment.md |
| Lock down tool exposure for least-privilege deployments | docs/configuration-and-deployment.md#least-privilege-tool-exposure |
| Learn common AFFiNE workflows and tool sequences | docs/workflow-recipes.md |
| Browse the tool catalog by domain | docs/tool-reference.md |
npm i -g affine-mcp-server
affine-mcp --version
You can also run the package ad hoc:
npx -y -p affine-mcp-server affine-mcp -- --version
docker run -d \
-p 3000:3000 \
-e MCP_TRANSPORT=http \
-e AFFINE_BASE_URL=https://your-affine-instance.com \
-e AFFINE_API_TOKEN=ut_your_token \
-e AFFINE_MCP_AUTH_MODE=bearer \
-e AFFINE_MCP_HTTP_TOKEN=your-strong-secret \
ghcr.io/dawncr0w/affine-mcp-server:latest
Then point your client at:
{
"mcpServers": {
"affine": {
"type": "http",
"url": "http://localhost:3000/mcp",
"headers": {
"Authorization": "Bearer your-strong-secret"
}
}
}
}
For Docker, health checks, and remote deployment details, see docs/configuration-and-deployment.md#docker.
affine-mcp login
This stores credentials in ~/.config/affine-mcp/config with mode 600.
Settings -> Integrations -> MCP ServerClaude Code project config:
{
"mcpServers": {
"affine": {
"command": "affine-mcp"
}
}
}
Codex CLI:
codex mcp add affine -- affine-mcp
More client-specific setup is in docs/client-setup.md.
affine-mcp status
affine-mcp doctor
If you want to expose the server remotely over HTTP instead of stdio, start with docs/configuration-and-deployment.md.
| Target | Transport | Recommended auth | Recommended path |
|---|---|---|---|
| Claude Code | stdio | Saved config or API token | docs/client-setup.md#claude-code |
| Claude Desktop | stdio | Saved config or API token | docs/client-setup.md#claude-desktop |
| Codex CLI | stdio | Saved config or API token | docs/client-setup.md#codex-cli |
| Cursor | stdio | Saved config or API token | docs/client-setup.md#cursor |
| Containerized remote deployment | HTTP | Bearer token or OAuth | docs/getting-started.md#path-c-run-from-the-docker-image |
| Remote MCP clients | HTTP | Bearer token or OAuth | docs/configuration-and-deployment.md#http-mode |
| AFFiNE Cloud | stdio or HTTP | API token | docs/configuration-and-deployment.md#auth-strategy-matrix |
| Self-hosted AFFiNE | stdio or HTTP | API token, cookie, or email/password | docs/configuration-and-deployment.md#auth-strategy-matrix |
tool-manifest.json is the source of truth for canonical tool names. The MCP server exposes those tools through tools/list and tools/call.
Domains:
Use AFFINE_TOOL_PROFILE=read_only, core, or authoring when a deployment should expose a smaller surface than the complete full default. You can also combine profiles with AFFINE_DISABLED_GROUPS such as docs.database, destructive, or admin for finer control.
For the grouped catalog, notes, and operational caveats, see docs/tool-reference.md.
| Document | Purpose |
|---|---|
| docs/getting-started.md | First-run setup paths and verification |
| docs/client-setup.md | Client-specific configuration snippets and tips |
| docs/configuration-and-deployment.md | Environment variables, auth modes, Docker, HTTP mode, and deployment guidance |
| docs/workflow-recipes.md | End-to-end workflows and example tool sequences |
| docs/tool-reference.md | Tool catalog grouped by domain |
| docs/edgeless-canvas-cookbook.md | Edgeless canvas layout helpers and surface elements, worked end-to-end |
| CONTRIBUTING.md | Contributor workflow |
| SECURITY.md | Security reporting |
Useful CLI commands:
affine-mcp status - test the effective configurationaffine-mcp status --json - machine-readable status outputaffine-mcp doctor - diagnose config and connectivity issuesaffine-mcp show-config - print the effective config with secrets redactedaffine-mcp config-path - print the config file pathaffine-mcp snippet <claude|cursor|codex|all> [--env] - generate ready-to-paste client configaffine-mcp logout - remove stored credentialsFor common failures, see:
AFFINE_DISABLED_GROUPS and AFFINE_DISABLED_TOOLS for least-privilege setups/healthz and /readyz when running the HTTP server behind a container platform or load balancerRun the main quality gates before opening a PR:
npm run build
npm run test:tool-manifest
npm run pack:check
Additional validation:
npm run test:comprehensive boots a local Docker AFFiNE stack and validates the tool surfacenpm run test:e2e runs Docker, MCP, and Playwright togethernpm run test:playwright runs the Playwright suite onlynpm run test:create-placement, npm run test:capabilities-fidelity, npm run test:native-template, node tests/test-database-intent.mjs, node tests/test-semantic-page-composer.mjs, node tests/test-structured-receipts.mjs, node tests/test-organize-tools.mjs, and node tests/test-supporting-tools.mjsLocal clone flow:
git clone https://github.com/dawncr0w/affine-mcp-server.git
cd affine-mcp-server
npm install
npm run build
node dist/index.js
MIT License - see LICENSE.
MCP server integration for DaVinci Resolve Studio
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnos
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots