Affine MCP Server
AFFiNE workspaces and documents accessible to AI via stdio or HTTP.
Data last scanned today · Reviewed today
Overview
The Affine MCP Server provides an interface for interacting with AFFiNE workspaces, documents, databases, and comments. It is built to support both AFFiNE Cloud and self-hosted environments by leveraging GraphQL and WebSocket APIs. The server offers flexibility in deployment, allowing users to choose between stdio or HTTP transports depending on their client setup. Functionality includes semantic page composition, database intent management, and workspace blueprint automation. Users can manage their AFFiNE data through 96 exposed MCP tools, ensuring workflows remain accessible across different AI assistant environments. Please note that this server can only interact with server-backed workspaces, as local-only storage remains inaccessible.
Our verdict
This server carries a high risk level with a security score of 48/100. Because it is a community-maintained project and has not yet undergone an editorial security review, users should exercise caution. Specifically, the authentication methods and the safety of read-only modes have not been verified. This tool is best suited for experienced developers working in self-hosted environments who can audit the implementation themselves.
- Supports 96 canonical tools for comprehensive workspace automation
- Compatible with both AFFiNE Cloud and self-hosted deployments
- Maintains an active development cycle with commits from 24 contributors
- Features a small footprint with only 12 direct dependencies
- Community-maintained without official vendor support
- Authentication and read-only mode safety remain unreviewed
- Cannot access browser-local AFFiNE workspace storage
Setup
{
"mcpServers": {
"affine-mcp-server": {
"args": [
"-y",
"affine-mcp-server"
],
"command": "npx"
}
}
}Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.
- No read-only mode — running this grants full read/write access.
- No built-in authentication — anyone with access to this config can invoke every tool it exposes.
Tools
| Tool | Description | Risk |
|---|---|---|
| list_workspaces | List all available workspaces | low |
| get_workspace | Read workspace details | low |
| create_workspace | Create a workspace with an initial document | medium |
| update_workspace | Update workspace settings | medium |
| delete_workspace | Permanently delete a workspace | high |
| list_workspace_tree | Return the workspace document hierarchy as a tree | low |
| get_orphan_docs | Find documents that are not linked from a parent doc | low |
| list_collections | List workspace collections | low |
| get_collection | Read a collection by id | low |
| create_collection | Create a collection | medium |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf | ||||
| ChatGPT |
Frequently asked questions
›Can I use this server to access my browser-local AFFiNE workspaces?
No, this server only supports server-backed AFFiNE workspaces. Browser-local workspaces stored in local storage are not available through AFFiNE server APIs.
›Does the server support authentication with AFFiNE Cloud?
Yes, but due to Cloudflare restrictions on email/password sign-in, you must use a session cookie obtained from a signed-in browser session.
›How are credentials stored by the CLI?
Credentials are stored in a local configuration file with 600 permissions, typically located at $XDG_CONFIG_HOME/affine-mcp/config or ~/.config/affine-mcp/config.
›Are personal access tokens still supported for all AFFiNE versions?
No, AFFiNE versions 0.27 and later removed the legacy GraphQL API for personal access tokens. This server no longer provides tools for token management.
›What transport protocols can I use to connect to this server?
The server supports both stdio and HTTP transports, making it compatible with local clients like Claude Desktop or remote configurations.
Changelog
Badge
Maintain this server? Add the live badge to your README.