AFFiNE MCP Server
Provides full read/write access to AFFiNE workspaces, documents, databases, journals, organizations, and comments, enabling creation, editing, organization, and deletion of content across self-hosted AFFiNE and AFFiNE Cloud.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AFFiNE MCP Server Create a doc called Weekly Plan with a checklist"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AFFiNE MCP Server (multi-tenant)
A Model Context Protocol (MCP) server for AFFiNE with full read/write access: create, edit, organize, and delete documents, workspaces, comments, and more. It runs over stdio or HTTP (/mcp) and supports self-hosted AFFiNE and AFFiNE Cloud.
This repository is a fork of affine-mcp-server by DAWNCR0W (MIT). Nearly all of the tool surface and the AFFiNE protocol work is theirs; see Credits. What this fork adds:
Multi-tenant mode — one deployment serves many AFFiNE users on many AFFiNE domains. Your application sends each user's AFFiNE URL and credentials per session; nothing is stored. See Multi-tenant mode.
Interactive API reference — an OpenAPI 3.1 spec generated from the running server and a Scalar page. See API reference.
Deployment notes for Dokploy and multi-account setups (
deploy/multi-account/).
Table of Contents
Related MCP server: Notion MCP Server
Overview
AFFiNE MCP Server is designed for three common scenarios:
Run a local stdio MCP server for Claude Code, Codex CLI, Cursor, or Claude Desktop
Expose a remote HTTP MCP endpoint for hosted or browser-connected clients
Automate AFFiNE workspace, document, database, organization, and comment workflows through a stable MCP tool surface
Highlights:
Supports AFFiNE Cloud and self-hosted AFFiNE instances
Multi-tenant HTTP mode: per-session AFFiNE domain and credentials, with a mandatory host allowlist
Supports stdio and HTTP transports
Coordinates concurrent writes per workspace through one shared MCP server; optional document revisions reject stale edits
Supports session-cookie and email/password authentication, plus compatible bearer tokens for older deployments
Exposes 107 canonical MCP tools backed by AFFiNE GraphQL and WebSocket APIs
Reads native database
created-by(user ID) andcreated-time(timestamp) columns from row metadata; missing or invalid metadata returnsnullwithout backfilling itSets and clears native AFFiNE Journal dates with
set_doc_journalIncludes semantic page composition, native template instantiation, database intent composition, capability and fidelity reporting, and workspace blueprint helpers
Includes Docker images, health probes, and end-to-end test coverage
Scope boundaries:
This server can access only server-backed AFFiNE workspaces
Browser-local workspaces stored only in local storage are not available through AFFiNE server APIs
After a content write, transient workspace timestamp failures are retried up to three times with backoff. If metadata still cannot be confirmed, inspect the saved document before any repair; do not repeat the content edit. See document mutation recovery.
AFFiNE 0.27+ removed the legacy personal-access-token GraphQL API; this server no longer exposes token-management tools
AFFiNE Cloud requires browser-session authentication for this external GraphQL integration; programmatic email/password sign-in is blocked by Cloudflare
delete_docremoves workspace page metadata and requests content deletion. Some AFFiNE servers retain content despite acknowledging the request; the tool returns a partial result with a warning unless content absence is verified. Usetrash_docfor recoverable cleanup.
New in v3.2.1: Scripted cookie login now keeps session secrets out of process arguments, validates workspace access before saving credentials, and restores document pagination for ordinary workspace members.
Choose Your Path
Goal | Start here |
Set up a local stdio server with the least friction | |
Run the server in Docker or another OCI runtime | |
Configure Claude Code, Claude Desktop, Codex CLI, or Cursor | |
Let multiple agents write through one coordinated server | |
Run the server remotely over HTTP or behind OAuth | |
Lock down tool exposure for least-privilege deployments | docs/configuration-and-deployment.md#least-privilege-tool-exposure |
Learn common AFFiNE workflows and tool sequences | |
Browse the tool catalog by domain |
Quick Start
1. Install the CLI
npm i -g affine-mcp-server
affine-mcp --versionYou can also run the package ad hoc:
npx -y -p affine-mcp-server affine-mcp -- --version2. Or run the server in Docker
The published
ghcr.io/dawncr0w/affine-mcp-serverimage is the upstream project and does not include multi-tenant mode. To use this fork, build the image from this repository (docker build -t affine-mcp .).
docker run -d \
-p 3000:3000 \
-e MCP_TRANSPORT=http \
-e AFFINE_BASE_URL=https://your-affine-instance.com \
-e AFFINE_EMAIL=you@example.com \
-e AFFINE_PASSWORD=your-password \
-e AFFINE_MCP_AUTH_MODE=bearer \
-e AFFINE_MCP_HTTP_TOKEN=your-strong-secret \
ghcr.io/dawncr0w/affine-mcp-server:3.10.1Then 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.
HTTP deployments have two environment-only session limits:
Variable | Default | Purpose |
|
| Combined Streamable HTTP and legacy SSE session capacity, including sessions being initialized |
|
| Idle time before an inactive session is closed |
Short-lived Streamable HTTP clients, including cron jobs, should send DELETE /mcp
with their Mcp-Session-Id and authentication headers when finished. Exiting the
client process alone does not terminate its server-side session. A long idle
timeout can let abandoned sessions fill the limit and cause 503 / -32002
errors. Close unused sessions and choose an appropriate idle timeout before
raising the cap. See session capacity troubleshooting.
3. Save credentials with interactive login
affine-mcp loginThis stores credentials in $XDG_CONFIG_HOME/affine-mcp/config when XDG_CONFIG_HOME is set, otherwise in ~/.config/affine-mcp/config, with mode 600.
The login flow reuses the configured or saved AFFiNE URL when you press Enter at
the URL prompt. After authentication, workspace discovery displays the workspace
name first and falls back to Workspace name unavailable when profile metadata
has no name; the full ID remains visible. An invalid numeric selection is rejected
and prompted again. Enter q or send end-of-file to cancel without writing a new
config. A failed discovery request is reported as a failure; it is not treated as
a completed login.
For AFFiNE Cloud, paste the Cookie request header from a signed-in browser session
For self-hosted AFFiNE, use email/password (recommended) or a signed-in session cookie
AFFINE_API_TOKENremains available only for deployments that still accept a compatible GraphQL bearer token
The prompt defaults to AFFINE_BASE_URL from the environment or the saved config file, so pressing Enter keeps an already-configured self-hosted URL instead of switching back to AFFiNE Cloud.
For a self-hosted instance reached over plain HTTP on a trusted private network, AFFINE_ALLOW_INSECURE_HTTP=true must be set for the login run as well as for the server. The opt-in is read from the environment first and then from the saved config file.
To avoid re-running login when a session expires, persist the account credentials instead of the session cookie:
affine-mcp login --save-credentialsWith the email/password method, this stores AFFINE_EMAIL and AFFINE_PASSWORD so the server signs in on its own and renews the session before it expires. The password is written to the mode-600 config file, so use a dedicated least-privilege AFFiNE account. Without this flag the CLI keeps storing only the session credential, which never renews by itself.
For scripted session-cookie setup, keep the cookie out of process arguments:
affine-mcp login --url https://app.affine.pro --cookie-stdin --workspace-id your-workspace-id --forcePaste the cookie at the hidden prompt, or pipe it from a trusted secret source. The CLI verifies --workspace-id against the authenticated account before saving it. Piped input requires --force when existing credentials would be replaced.
After login, inspect and switch the saved default workspace without signing in again:
affine-mcp workspaces
affine-mcp workspaces --json
affine-mcp workspace <workspace-id>workspaces lists names first and marks the current default. workspace validates
the requested ID with the active credentials and changes only the local default
(AFFINE_WORKSPACE_ID); it does not grant access to a workspace or change the
authenticated account. With no ID, it uses the same validated selection flow.
4. Register the server with your client
Claude Code project config:
{
"mcpServers": {
"affine": {
"command": "affine-mcp"
}
}
}Codex CLI:
codex mcp add affine -- affine-mcpMore client-specific setup is in docs/client-setup.md.
5. Verify the connection
affine-mcp status
affine-mcp doctor
affine-mcp snippet codexThe recommended Codex form is a command-only registration line that keeps using
the current saved login. snippet claude and snippet cursor print JSON
configuration instead. Apply the generated snippet, then restart or reconnect
the MCP client so it starts a fresh server process.
For an explicit environment snapshot, add --env to any snippet command. It
copies the currently resolved URL, authentication, headers, workspace, and
relevant OAuth settings; client environment variables win over saved config at
runtime. Remove or regenerate copied credentials when they expire instead of
expecting a saved login to override them.
If you want to expose the server remotely over HTTP instead of stdio, start with docs/configuration-and-deployment.md. If an HTTP server already runs on the same host as your stdio client, use the private stdio HTTP bridge instead of starting another full server process.
Multi-tenant mode
Use this when your own application manages many AFFiNE users or domains. Instead of one
fixed AFFiNE account per process, each MCP session carries its own destination and
credentials in the headers of the initialize request:
docker build -t affine-mcp .
docker run -d -p 3000:3000 \
-e AFFINE_MCP_MULTI_TENANT=true \
-e AFFINE_MCP_TENANT_ALLOWED_HOSTS="affine.example.com,*.team.example.com" \
-e AFFINE_MCP_HTTP_TOKEN="$(openssl rand -hex 32)" \
affine-mcpPOST /mcp
Authorization: Bearer <AFFINE_MCP_HTTP_TOKEN>
X-Affine-Url: https://affine.example.com
X-Affine-Email: user@example.com
X-Affine-Password: ********AFFINE_MCP_HTTP_TOKENidentifies your application to the gateway. Keep it server-side.A session may only target hosts in
AFFINE_MCP_TENANT_ALLOWED_HOSTS; the server will not start without it.Credentials live in memory for the session and are never logged or written to disk.
Alternatives to email/password:
X-Affine-CookieorX-Affine-Token. Send exactly one method.
Full header reference, status codes, and operational notes: docs/configuration-and-deployment.md#multi-tenant-mode. For a single fixed account per deployment, see deploy/multi-account/README.md.
API reference
docs/openapi.json is an OpenAPI 3.1 description of the gateway (session lifecycle, tenant headers, status codes) and of all 106 tools exposed in multi-tenant mode, with their input and output schemas. It is machine-readable, so it also works as context for your own AI.
docs/index.html renders it with Scalar. Serve the docs folder over HTTP:
npx serve docsWhen the HTTP server is running, the reference is served at /docs and the spec at /openapi.json
(set AFFINE_MCP_DOCS=false to disable). The served spec targets its own origin, so "Try it" works without CORS setup.
The spec is generated from the running server, so it cannot drift from the code:
npm run build && npm run docs:openapiTools are MCP tools, not REST endpoints. They are listed under Webhooks in the reference
because OpenAPI has no concept of JSON-RPC methods; each is invoked as tools/call on POST /mcp.
Compatibility Matrix
Node.js 20.18.1 is the minimum supported runtime. CI validates the Node.js 20, 22, 24, and 26 release lines.
Target | Transport | Recommended auth | Recommended path |
Claude Code | stdio | Saved config | |
Claude Desktop | stdio | Saved config or session cookie | |
Codex CLI | stdio | Saved config or self-hosted email/password | |
Cursor | stdio | Saved config or session cookie | |
Containerized remote deployment | HTTP | Bearer token or OAuth | |
Remote MCP clients | HTTP | Bearer token or OAuth | |
AFFiNE Cloud | stdio or HTTP | Signed-in browser session cookie | |
Self-hosted AFFiNE | stdio or HTTP | Email/password or session cookie |
Tool Surface
tool-manifest.json is the source of truth for canonical tool names. The MCP server exposes those tools through tools/list and tools/call; tool definitions returned by tools/list include MCP annotations that mark read-only, destructive, idempotent, and external-world behavior for client-side tool selection.
Every canonical tool also declares an MCP outputSchema for its structuredContent. Object results retain their existing top-level fields, while array and scalar results use stable { items }, { text }, or { value } envelopes. The existing text content remains unchanged for compatibility with clients that do not consume structured results.
get_capabilities exposes the full implemented list in
server.supportedTools and the currently enabled surface in
server.effective.profile and server.effective.enabledTools, after profiles,
disabled groups or tools, and auth-mode policy. Inspect tools/list when you
need the final set of callable tools.
Advertised input and output schemas omit the SDK-generated draft-07 $schema marker. Schema interpretation follows the client context, allowing clients that reject an explicit draft-07 declaration to consume the tool surface.
Domains:
Workspace: create, inspect, update, delete, and traverse workspaces
Organization: collections, collection-rule sync, workspace blueprints, and experimental organize or folder helpers
Documents: search, read, create, publish, move, tag, custom properties, import/export, semantic composition, template inspection and native instantiation, capability and fidelity reporting, and block-level mutation
Databases: create columns, add rows, update rows, inspect schema, and compose database structures from intent
Comments: list, create, update, delete, and resolve
History: version history listing
Users and authentication: current user, sign-in, and profile/settings
Notifications: list and mark notifications as read
Blob storage: upload, delete, and cleanup blobs
For new document content, use create_doc for an optional single plain-text
paragraph and create_doc_from_markdown for native headings, lists, links,
code blocks, and $$...$$/$...$ math equations. Both tools accept folderId for immediate organize-folder placement.
New pages record the authenticated AFFiNE account in the app's Created by
property, including semantic pages, template instances, and workspace welcome pages.
Existing creator records are preserved; older pages are not backfilled.
New database rows also record the authenticated AFFiNE account and creation time,
including rows composed from intent or inserted as paragraph blocks. Editing or
moving existing rows preserves their creation metadata; older rows are not backfilled.
Use AFFINE_TOOL_PROFILE=read_only, core, or authoring when a deployment should expose a smaller surface than the complete full default. This is the recommended path for hosted, browser-connected, or least-privilege deployments because it reduces agent choice overload while keeping the full tool catalog available as an opt-in surface. You can also combine profiles with AFFINE_DISABLED_GROUPS such as docs.database, destructive, or admin for finer control.
Full-note replacement with replace_doc_with_markdown is destructive and requires full without disabling the destructive group. core and authoring retain incremental editing through append_markdown and update_block.
For the grouped catalog, notes, and operational caveats, see docs/tool-reference.md.
Documentation Map
Document | Purpose |
First-run setup paths and verification | |
Client-specific configuration snippets and tips | |
Environment variables, auth modes, Docker, HTTP mode, and deployment guidance | |
End-to-end workflows and example tool sequences | |
Tool catalog grouped by domain | |
Edgeless canvas layout helpers and surface elements, worked end-to-end | |
Contributor workflow | |
Security reporting |
Verify Your Setup
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 workspaces [--json]- list accessible workspaces by name and mark the defaultaffine-mcp workspace [id]- validate and set the local default workspaceaffine-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 credentials
Core configuration uses environment > saved config > defaults. HTTP body/session
limits, proxy settings, WebSocket timeouts, and the HTTP compatibility escape
hatches are environment-only runtime flags; they are not read from the saved
KEY=value file. See configuration precedence and environment scope.
For a self-hosted deployment with a non-standard GraphQL route, use
affine-mcp login --graphql-path /your/graphql/path or set
AFFINE_GRAPHQL_PATH; show-config --json prints the exact resolved
graphqlEndpoint without exposing secrets. Generated workspace and document URLs
use the configured AFFiNE base URL, so a custom GraphQL path does not become part
of a browser link.
For common failures, see:
Security and Scope
Never commit passwords, session cookies, or compatible bearer tokens
Use a dedicated least-privilege AFFiNE account for unattended deployments
Email/password HTTP sessions share one login and never fall back to anonymous backend requests after authentication failure
Use HTTPS for non-local deployments
Keep remote HTTP MCP listeners authenticated; bearer mode refuses a non-loopback bind without
AFFINE_MCP_HTTP_TOKENSend MCP bearer tokens in the
Authorizationheader, never in the URLRe-run
affine-mcp loginwhen a saved browser session expiresFor GUI clients, verify
command -v affine-mcpandcommand -v node; an absolute script path does not fix a#!/usr/bin/env nodeshebang when the GUI process has no Node.js directory inPATH. See GUI client PATH troubleshooting.Restrict exposed tools with
AFFINE_DISABLED_GROUPSandAFFINE_DISABLED_TOOLSfor least-privilege setupsTreat OAuth mode as a shared AFFiNE service-account deployment: it defaults to
read_only, and write-capable profiles requireAFFINE_OAUTH_ALLOW_SERVICE_WRITES=trueUse
/healthzand/readyzwhen running the HTTP server behind a container platform or load balancerSet HTTP body, session, idle, and shutdown limits explicitly for high-volume deployments
Development
Run the main quality gates before opening a PR:
npm run ciAdditional validation:
npm testverifies tool metadata, test-suite coverage, and the fast regression suite without requiring a live AFFiNE instancenpm run test:comprehensiveboots a local Docker AFFiNE stack and validates the tool surfacenpm run test:e2eruns Docker, MCP, and Playwright togethernpm run test:playwrightruns the Playwright suite onlyFocused runners for the new high-level tool surface include
npm run test:create-placement,npm run test:capabilities-fidelity,npm run test:native-template,npm run test:mutation-ack,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, andnode tests/test-supporting-tools.mjs
Live tests can mutate or delete AFFiNE data. They allow loopback targets by
default and refuse non-loopback targets unless the disposable target is
explicitly enabled and confirmed as documented in CONTRIBUTING.md. Never run
them against production.
Local clone flow:
git clone https://github.com/febrianrz/affine_mcp.git
cd affine-mcp-server
npm install
npm run build
node dist/index.jsRelease Notes
License
MIT License - see LICENSE. The original copyright notice is retained as the license requires.
Credits
This project exists because of DAWNCR0W and the contributors to
affine-mcp-server, which this repository is forked from
(imported at v3.10.2, commit 4bd2994; see UPSTREAM.md). The tool surface, AFFiNE GraphQL/WebSocket
integration, document model handling, and test suite are their work. Please star and support the original project.
Multi-tenant mode, the OpenAPI/Scalar reference, and the deployment notes are additions in this fork.
Support
Fork-specific issues (multi-tenant mode, API reference): open an issue on febrianrz/affine_mcp
Core tool behavior also exists upstream: DAWNCR0W/affine-mcp-server issues
Review AFFiNE product documentation at docs.affine.pro
Acknowledgments
Built for the AFFiNE knowledge base platform
Uses the Model Context Protocol specification
Powered by @modelcontextprotocol/sdk
Available Tools
107 toolsadd_database_columnAdd Database ColumnA
Add a column to an existing AFFiNE database block. Supports title, rich-text, select, multi-select, number, checkbox, link, and date types. A title addition is rejected when the current database snapshot already has a title column.
Inputs: name (required), docId (required), databaseBlockId (required), type, +4 more. Returns: ok, code, name, type, +7 more
add_database_rowAdd Database RowA
Add a row to an AFFiNE database block. Provide cell values mapped by column name or column ID. Title column text is stored on the row paragraph block. Select columns auto-create options by label.
Inputs: cells (required), docId (required), databaseBlockId (required), linkedDocId, +2 more. Returns: ok, code, added, error, +8 more
add_doc_to_collectionAdd Doc To CollectionA
Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
Inputs: docId (required), collectionId (required), workspaceId. Returns: id, ok, code, name, +7 more
add_mindmap_nodeAdd Native Mindmap NodeA
Add one native child shape to parentId inside mindmapId. beforeId optionally inserts before a sibling; otherwise append. Returns nodeId. Persists hierarchy and layout together. Maximum 500 nodes, depth 64; shape nodes only.
Inputs: text (required), docId (required), parentId (required), mindmapId (required), +3 more. Returns: ok, code, docId, error, +18 more
add_organize_linkAdd Organize LinkA
Experimental: add a doc, tag, or collection link under an AFFiNE organize folder. Use move_organize_node for an existing link node instead of creating a duplicate link.
Inputs: type (required), folderId (required), targetId (required), index, +1 more. Returns: id, ok, code, data, +8 more
add_surface_elementAdd Surface ElementA
Add a shape, connector, text, or group to the AFFiNE edgeless canvas surface. Shapes support rect/ellipse/diamond/triangle with fill, stroke, and text. Connectors draw arrows between shapes (by id) or between absolute points. Use for building diagrams programmatically. Style fields that don't apply to the chosen element type are reported in the response 'ignored' list (mirrors update_surface_element).
Inputs: type (required), docId (required), x, y, +27 more. Returns: ok, code, type, added, +8 more
add_tag_to_docAdd Tag To DocumentA
Attach a workspace tag to a document, creating the workspace tag option if needed. Document tags are stored in workspace metadata.
Inputs: tag (required), docId (required), workspaceId. Returns: ok, tag, code, tags, +10 more
analyze_doc_fidelityAnalyze Document FidelityARead-onlyIdempotent
Inspect a document for markdown export fidelity risk, including unsupported AFFiNE block flavours and risky content paths.
Inputs: docId (required), workspaceId. Returns: ok, code, docId, error, +7 more
append_blockAppend BlockC
Append document blocks with canonical types and legacy aliases (supports placement + strict validation).
Inputs: type (required), docId (required), x, y, +36 more. Returns: ok, code, kind, type, +13 more
append_markdownAppend MarkdownB
Append markdown content to an existing AFFiNE document. $$...$$ and $...$ become native equations.
Inputs: docId (required), markdown (required), strict, placement, +2 more. Returns: ok, code, kind, docId, +12 more
append_semantic_sectionAppend Semantic SectionB
Append a semantic section to an existing AFFiNE document by heading title and native block composition.
Inputs: docId (required), sectionTitle (required), bullets, callouts, +4 more. Returns: ok, code, docId, error, +11 more
cleanup_blobsCleanup Deleted BlobsADestructive
Permanently release blobs that were already marked deleted in a workspace. This is destructive cleanup and should be used only after confirming deleted blobs are no longer needed.
Inputs: workspaceId (required), confirmWorkspaceId (required). Returns: ok, code, kind, error, +8 more
clear_doc_propertyClear Document PropertyB
Remove a custom property value from a document (property by id or name).
Inputs: docId (required), property (required), workspaceId. Returns: ok, code, docId, error, +7 more
compose_database_from_intentCompose Database From IntentB
Create a useful AFFiNE database/data-view from declarative intent. Supports task_board and issue_tracker presets with starter schema, kanban view, and optional starter rows.
Inputs: docId (required), intent (required), title, seedRows, +3 more. Returns: ok, code, docId, error, +17 more
create_collectionCreate CollectionB
Create a new AFFiNE sidebar collection with optional rules. This writes workspace sidebar metadata but does not create documents.
Inputs: name (required), rules, workspaceId. Returns: id, ok, code, name, +7 more
create_commentCreate CommentA
Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
Inputs: docId (required), content (required), docMode, docTitle, +2 more. Returns: id, ok, code, kind, +9 more
create_custom_propertyCreate Custom PropertyB
Create a workspace-wide custom property definition (text, number, checkbox, or date). Returns its propertyId.
Inputs: name (required), type (required), icon, workspaceId. Returns: ok, code, name, type, +9 more
create_docCreate DocumentA
Create a new AFFiNE document with optional plain-text content stored as one paragraph. Use create_doc_from_markdown for native headings, lists, links, and code blocks. If parentDocId is provided, the new doc is linked into the sidebar tree immediately. If folderId is provided, the doc is placed inside that folder in the sidebar.
Inputs: title, content, folderId, parentDocId, +1 more. Returns: ok, code, kind, docId, +18 more
create_doc_from_markdownCreate Document From MarkdownA
Create a new AFFiNE document and import Markdown as native blocks, including $$...$$ equation blocks and $...$ inline equations. Use parentDocId to embed the new doc into a parent, or folderId to place it in an organize folder.
Inputs: markdown (required), title, strict, folderId, +2 more. Returns: ok, code, kind, docId, +20 more
create_folderCreate FolderA
Experimental: create an AFFiNE organize folder node in the sidebar tree. This only changes sidebar organization, not document content.
Inputs: name (required), index, parentId, workspaceId. Returns: id, ok, code, data, +9 more
create_mindmapCreate Native MindmapA
Create a native AFFiNE mindmap with one root shape in an existing document. Returns mindmapId/rootId for add_mindmap_node. Only right/left/balance are supported; down/up are unsupported by BlockSuite. Does not create a document or sidebar link.
Inputs: text (required), docId (required), x, y, +4 more. Returns: ok, code, docId, error, +18 more
create_semantic_pageCreate Semantic PageC
Create an AFFiNE-native page with intentional section structure and native block composition.
Inputs: title, pageType, sections, parentDocId, +1 more. Returns: ok, code, docId, error, +19 more
create_tagCreate TagA
Create a workspace-level tag entry for future reuse. This does not attach the tag to a document; use add_tag_to_doc for that.
Inputs: tag (required), workspaceId. Returns: ok, tag, code, error, +6 more
create_workspaceCreate WorkspaceB
Create a new workspace with initial document (accessible in UI)
Inputs: name (required), avatar. Returns: id, ok, url, code, +14 more
create_workspace_blueprintCreate Workspace BlueprintA
Create a simple AFFiNE organize folder blueprint with one root folder and optional child folders. This is a convenience wrapper around create_folder.
Inputs: rootFolderName (required), workspaceId, childFolderNames. Returns: ok, code, error, details, +9 more
current_userCurrent UserARead-onlyIdempotent
Return the currently authenticated AFFiNE user profile. Use this read-only check to verify credentials before workspace or document operations.
Inputs: no named parameters. Returns: id, ok, code, name, +9 more
delete_blobDelete BlobADestructive
Delete a blob from AFFiNE workspace storage. Set permanently only when the blob should bypass recoverable deletion.
Inputs: key (required), workspaceId (required), confirmKey, permanently. Returns: ok, key, code, kind, +10 more
delete_blockDelete BlockADestructive
Delete a block by id and return snapshots of the removed content. Removes descendants and unlinks from the parent's sys:children by default; set deleteChildren=false to keep descendants orphaned (for re-parenting), or pruneConnectors=true to also drop surface connectors referencing any deleted id. Refuses affine:page — use delete_doc for whole docs.
Inputs: docId (required), blockId (required), workspaceId, deleteChildren, +2 more. Returns: ok, code, error, reason, +10 more
delete_collectionDelete CollectionADestructive
Delete an AFFiNE sidebar collection. This removes the collection metadata but does not delete the documents it referenced.
Inputs: collectionId (required), workspaceId. Returns: ok, code, error, details, +5 more
delete_commentDelete CommentADestructive
Delete an existing comment by id. This is destructive for that comment; use resolve_comment when you only want to mark a thread resolved.
Inputs: id (required). Returns: id, ok, code, kind, +7 more
delete_custom_propertyDelete Custom PropertyADestructive
Soft-delete a workspace custom property definition (by propertyId or name). Existing values are hidden.
Inputs: property (required), workspaceId. Returns: ok, code, name, error, +7 more
delete_database_rowDelete Database RowBDestructive
Delete a row from an AFFiNE database block.
Inputs: docId (required), rowBlockId (required), databaseBlockId (required), workspaceId, +1 more. Returns: ok, code, error, deleted, +6 more
delete_docDelete DocumentADestructive
Remove a document from the workspace list and request content deletion. AFFiNE servers may acknowledge this request while retaining readable content that still syncs. Content deletion is reported only after absence is verified; otherwise the result is partial with a warning. This is destructive; use trash_doc for recoverable cleanup or revoke_doc to remove public access.
Inputs: docId (required), confirmDocId (required), workspaceId, expectedRevision. Returns: ok, code, kind, docId, +7 more
delete_folderDelete FolderADestructive
Experimental: delete an AFFiNE organize folder and every nested folder or link node. This is destructive for sidebar organization but does not delete target documents, tags, or collections.
Inputs: folderId (required), workspaceId. Returns: ok, code, error, details, +5 more
delete_organize_linkDelete Organize LinkADestructive
Experimental: delete an AFFiNE organize doc, tag, or collection link node. This removes only the sidebar link, not the target resource.
Inputs: nodeId (required), workspaceId. Returns: ok, code, error, nodeId, +5 more
delete_surface_elementDelete Surface ElementADestructive
Delete a surface element by id. Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.
Inputs: docId (required), elementId (required), workspaceId, pruneConnectors, +1 more. Returns: ok, code, error, reason, +7 more
delete_tagDelete TagADestructive
Delete a workspace-level tag and remove it from every document that references it. Accepts a tag id or name; an ambiguous name is rejected with the candidate ids.
Inputs: tag (required), workspaceId. Returns: ok, tag, code, error, +11 more
delete_workspaceDelete WorkspaceBDestructive
Delete a workspace permanently and report success only when AFFiNE confirms the mutation.
Inputs: id (required), confirmWorkspaceId (required). Returns: id, ok, code, kind, +9 more
export_doc_markdownExport Document MarkdownCRead-onlyIdempotent
Export AFFiNE document content to markdown.
Inputs: docId (required), workspaceId, includeFrontmatter. Returns: ok, code, tags, docId, +11 more
export_with_fidelity_reportExport With Fidelity ReportARead-onlyIdempotent
Export document markdown together with a structured fidelity report that highlights markdown loss risk and unsupported AFFiNE-native content.
Inputs: docId (required), workspaceId, includeFrontmatter. Returns: ok, code, docId, error, +7 more
find_doc_by_titleFind Doc by TitleARead-onlyIdempotent
Resolve docs by exact title. Returns ALL matches up to limit (callers handle ambiguity). Case-sensitive by default; pass caseInsensitive: true to fold case. Reads workspace metadata — fast, no per-doc fetch. Unlike search_docs (which is always case-insensitive and capped at limit 20), this tool defaults to case-sensitive matching and returns up to limit matches (default 50, max 200). Prefer this over search_docs when you know the exact title and want every match. Returns: { query, caseInsensitive, matches: [{ id, title, createdAt, updatedAt, inTrash }], workspaceDocCount, truncated }.
Inputs: title (required), limit, workspaceId, caseInsensitive. Returns: ok, code, error, query, +8 more
get_capabilitiesGet CapabilitiesARead-onlyIdempotent
Return machine-readable capability flags for this MCP server, including static feature support and the effective enabled tool surface.
Inputs: no named parameters. Returns: ok, code, docs, error, +5 more
get_collectionGet CollectionARead-onlyIdempotent
Read one AFFiNE sidebar collection by id, including rules and allow-list. Use list_collections first when the id is unknown.
Inputs: collectionId (required), workspaceId. Returns: id, ok, code, name, +7 more
get_docGet DocumentARead-onlyIdempotent
Read GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.
Inputs: docId (required), workspaceId. Returns: id, ok, code, error, +5 more
get_doc_iconGet Document IconARead-onlyIdempotent
Read the current sidebar icon of a document. Returns null when none is set.
Inputs: docId (required), workspaceId. Returns: ok, code, icon, kind, +8 more
get_edgeless_canvasGet Edgeless CanvasARead-onlyIdempotent
Read the full edgeless canvas: all edgeless-positioned blocks (notes, frames, edgeless-text) with their xywh, plus all surface elements (shapes, connectors, text, groups). Includes aggregate bounding box and per-type element counts. Use this when you need to understand canvas layout end-to-end before placing new elements.
Inputs: docId (required), workspaceId. Returns: ok, code, docId, error, +10 more
get_folder_iconGet Folder IconBRead-onlyIdempotent
Read the current sidebar icon of an organize folder. Returns null when none is set. Experimental.
Inputs: folderId (required), workspaceId. Returns: ok, code, icon, kind, +8 more
get_mindmapGet Native MindmapARead-onlyIdempotent
Read and validate native mindmap hierarchy, ordered child IDs, text, collapsed state, geometry, and supported directions. Discover mindmapId via get_edgeless_canvas.
Inputs: docId (required), mindmapId (required), workspaceId. Returns: ok, code, docId, error, +17 more
get_orphan_docsGet Orphan DocumentsARead-onlyIdempotent
Find all documents that have no parent (not linked from any other doc via embed_linked_doc / embed_synced_doc blocks or inline LinkedPage references). Useful for workspace hygiene. Note: scans all docs — O(n). Each doc includes an inTrash flag.
Inputs: workspaceId. Returns: ok, code, count, error, +5 more
get_workspaceGet WorkspaceBRead-onlyIdempotent
Get workspace details with best-effort profile metadata and a direct URL
Inputs: id (required). Returns: id, ok, url, code, +13 more
inspect_template_structureInspect Template StructureARead-onlyIdempotent
Inspect a template doc's native structure, tags, and fallback risk before instantiation.
Inputs: templateDocId (required), workspaceId. Returns: ok, code, tags, error, +15 more
instantiate_template_nativeInstantiate Template NativelyB
Instantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
Inputs: templateDocId (required), title, variables, parentDocId, +3 more. Returns: ok, code, mode, docId, +21 more
list_childrenList Document ChildrenARead-onlyIdempotent
List the direct children of a document in the sidebar (embed_linked_doc / embed_synced_doc blocks and inline LinkedPage references). Returns docId, title, URL, and inTrash for each child.
Inputs: docId (required), workspaceId. Returns: ok, code, count, docId, +6 more
list_collectionsList CollectionsARead-onlyIdempotent
List AFFiNE sidebar collections and their rules. Use this read-only tool before updating, deleting, or adding documents to a collection.
Inputs: workspaceId. Returns: ok, code, error, items, +4 more
list_commentsList CommentsARead-onlyIdempotent
List paginated comments for a document, including nested replies and resolution state. Use this before update_comment, delete_comment, or resolve_comment when you need the existing comment ids.
Inputs: docId (required), after, first, offset, +1 more. Returns: ok, code, edges, error, +6 more
list_doc_propertiesList Document PropertiesARead-onlyIdempotent
List native workspace custom-property definitions and document values. Set includeLegacy to read older unscoped data separately for recovery; this never migrates or writes data.
Inputs: docId (required), workspaceId, includeLegacy. Returns: ok, code, docId, error, +9 more
list_docsList DocumentsARead-onlyIdempotent
List documents in a workspace (GraphQL), falling back to bounded workspace metadata when GraphQL document access is denied. Each doc includes an inTrash flag; fallback summary, public, and defaultRole values are null. GraphQL and fallback cursors are not interchangeable; restart pagination without after if a cursor is rejected.
Inputs: after, first, offset, workspaceId. Returns: ok, code, edges, error, +6 more
list_docs_by_tagList Documents By TagBRead-onlyIdempotent
List documents that contain the requested tag. This is read-only and each result includes title metadata and an inTrash flag.
Inputs: tag (required), ignoreCase, workspaceId. Returns: ok, tag, code, docs, +8 more
list_historiesList HistoriesCRead-onlyIdempotent
List doc histories (timestamps) for a doc.
Inputs: guid (required), take, before, workspaceId. Returns: ok, code, error, items, +4 more
list_notificationsList NotificationsARead-onlyIdempotent
List one server page of current-user AFFiNE notifications in a stable envelope. The response preserves each edge cursor, server pageInfo, and serverTotalCount. unreadOnly is a client-side filter over only the fetched page; it does not change server counts or pageInfo.
Inputs: after, first, offset, unreadOnly. Returns: ok, code, kind, error, +5 more
list_organize_nodesList Organize NodesARead-onlyIdempotent
Experimental: list AFFiNE sidebar organize folder and link nodes from the folders workspace DB. Use this before moving or deleting organize nodes.
Inputs: workspaceId. Returns: ok, code, error, nodes, +6 more
list_surface_elementsList Surface ElementsARead-onlyIdempotent
List all shape/connector/text/group elements on the AFFiNE edgeless canvas surface. Returns raw xywh strings plus parsed {x,y,width,height} bounds, with Y.Text fields serialized to plain strings. Optional filters by element type or id.
Inputs: docId (required), type, elementId, workspaceId. Returns: ok, code, count, docId, +8 more
list_tagsList TagsARead-onlyIdempotent
List all workspace-level tags and the number of documents attached to each tag. Use this before tag mutation when the exact tag name or id is unknown.
Inputs: workspaceId. Returns: ok, code, tags, error, +6 more
list_workspacesList WorkspacesBRead-onlyIdempotent
List available AFFiNE workspaces with best-effort profile metadata and direct URLs
Inputs: includeProfile. Returns: ok, code, error, items, +4 more
list_workspace_treeList Workspace TreeARead-onlyIdempotent
Returns the full document hierarchy as a tree (roots → children → grandchildren). Use depth to limit nesting (default: 3). Note: loads all docs — may be slow on large workspaces. Each node includes an inTrash flag.
Inputs: depth, workspaceId. Returns: ok, code, tree, error, +7 more
move_blockMove BlockA
Move an existing block without changing its id. Reuses append_block placement semantics and rejects document-root moves and cycles.
Inputs: docId (required), blockId (required), placement (required), workspaceId, +1 more. Returns: ok, code, block, error, +10 more
move_docMove Document in SidebarA
Move a doc in the AFFiNE sidebar. The destination link is validated and added before the optional source link is removed, cycles are rejected, and partial outcomes are reported explicitly.
Inputs: docId (required), toParentDocId (required), workspaceId, fromParentDocId. Returns: ok, code, kind, docId, +9 more
move_organize_nodeMove Organize NodeA
Experimental: move an AFFiNE organize folder or link node to another folder or root. This preserves the target document, tag, or collection and changes only sidebar placement.
Inputs: nodeId (required), index, parentId, workspaceId. Returns: id, ok, code, error, +6 more
publish_docPublish DocumentA
Make a document publicly accessible through AFFiNE public sharing. This changes sharing state; use revoke_doc to disable public access later.
Inputs: docId (required), mode, workspaceId. Returns: ok, code, kind, docId, +6 more
read_all_notificationsMark All Notifications ReadB
Ask AFFiNE to mark every current-user notification as read. Inspect applied/status in the response; a false server result is reported as not_applied, not as success.
Inputs: no named parameters. Returns: ok, code, kind, error, +6 more
read_database_cellsRead Database CellsARead-onlyIdempotent
Read row titles and database cell values from an AFFiNE database block. Rich-text titles and cells include both plain values and formatting-preserving deltas.
Inputs: docId (required), databaseBlockId (required), columns, rowBlockIds, +1 more. Returns: ok, code, rows, error, +4 more
read_database_columnsRead Database ColumnsARead-onlyIdempotent
Read schema metadata for an AFFiNE database block, including columns, select options, and view column mappings. Useful for empty databases before any rows exist.
Inputs: docId (required), databaseBlockId (required), workspaceId. Returns: ok, code, error, title, +10 more
read_docRead Document ContentARead-onlyIdempotent
Read document block content and its revision via WebSocket snapshot. Pass revision as expectedRevision on a document write to reject stale edits through a shared MCP server. Each block includes plain text and formatting-preserving deltas. Set includeMarkdown: true to also get rendered markdown, which can be lossy for unsupported inline attributes.
Inputs: docId (required), workspaceId, includeMarkdown. Returns: ok, code, tags, docId, +12 more
remove_doc_from_collectionRemove Doc From CollectionA
Remove a document id from an AFFiNE collection allow-list. This does not delete the document or change collection rules.
Inputs: docId (required), collectionId (required), workspaceId. Returns: id, ok, code, name, +7 more
remove_tag_from_docRemove Tag From DocumentA
Detach a tag from one document without deleting the workspace-level tag. Use delete_tag only when the tag should be removed from every document.
Inputs: tag (required), docId (required), workspaceId. Returns: ok, tag, code, tags, +10 more
rename_folderRename FolderA
Experimental: rename an AFFiNE organize folder node. This changes sidebar metadata only and does not rename documents inside the folder.
Inputs: name (required), folderId (required), workspaceId. Returns: id, ok, code, name, +5 more
reparent_mindmap_nodeReparent Native Mindmap NodeA
Move a node with all descendants to a parent in the SAME native mindmap; beforeId optionally reorders siblings. Rejects root moves, cycles, missing/foreign IDs. Preserve collapsed state. One shared MCP server serializes workspace mutations; independent servers and native editors have no compare-and-swap protection.
Inputs: docId (required), nodeId (required), parentId (required), mindmapId (required), +3 more. Returns: ok, code, docId, error, +18 more
replace_doc_with_markdownReplace Document With MarkdownADestructive
Replace the main note content of a document with markdown content.
Inputs: docId (required), markdown (required), strict, allowEmpty, +2 more. Returns: ok, code, kind, docId, +10 more
resolve_commentResolve CommentA
Set a comment thread's resolved state without changing its content. Use delete_comment only when the comment should be removed.
Inputs: id (required), resolved (required). Returns: id, ok, code, kind, +8 more
restore_docRestore Document from TrashAIdempotent
Restore a document from the AFFiNE trash without changing its content. This is safe to retry.
Inputs: docId (required), workspaceId. Returns: ok, code, kind, docId, +13 more
revoke_docRevoke DocumentADestructive
Disable public sharing for a document without deleting the document. Use delete_doc only when the document itself should be removed.
Inputs: docId (required), workspaceId. Returns: ok, code, kind, docId, +6 more
search_docsSearch Documents by TitleARead-onlyIdempotent
Fast search for documents by title using workspace metadata. Much faster than exporting each doc. Returns docId, title, direct URL, and inTrash for each match, plus offset/limit pagination state (hasMore, truncated, and nextOffset).
Inputs: query (required), tag, limit, offset, +4 more. Returns: ok, tag, code, error, +15 more
set_doc_journalSet Document Journal DateAIdempotent
Set or clear AFFiNE's native Journal date for a document. Use YYYY-MM-DD or null to remove it; customJournal and custom properties are preserved.
Inputs: date (required), docId (required), workspaceId. Returns: ok, code, date, docId, +7 more
set_doc_propertySet Document PropertyB
Set a document's custom property value (property by id or name). Value is validated against the property type (text/number/checkbox/date).
Inputs: docId (required), value (required), property (required), workspaceId. Returns: ok, code, name, type, +11 more
set_mindmap_layoutSet Native Mindmap LayoutA
Set right, left, or balance and persist native node positions. Root stays anchored; collapsed flags remain unchanged. BlockSuite does not support down/up. This is a native mindmap, with editor-derived connectors.
Inputs: docId (required), layout (required), mindmapId (required), workspaceId, +1 more. Returns: ok, code, docId, error, +17 more
set_mindmap_lockSet Native Mindmap LockA
Set the mindmap's native lockedBySelf flag. Nodes inherit the lock in AFFiNE. Unlock does not clear ancestor-group or independently locked node flags; read the returned effective locked state. Does not change layout or styles. This is an editor lock, not an access-control boundary.
Inputs: docId (required), locked (required), mindmapId (required), workspaceId, +1 more. Returns: ok, code, docId, error, +17 more
set_mindmap_styleSet Native Mindmap StyleA
Switch native style ONE=1, TWO=2, THREE=3, FOUR=4. Persists the preset on all nodes, sizes and layout; native connectors follow style. Keeps IDs, hierarchy, collapsed state and root anchor. Rejects locked maps/nodes.
Inputs: docId (required), style (required), mindmapId (required), workspaceId, +1 more. Returns: ok, code, docId, error, +17 more
sign_inSign InA
Sign in to AFFiNE using email and password; sets session cookies for subsequent calls.
Inputs: email (required), password (required). Returns: ok, code, error, details, +4 more
trash_docMove Document to TrashAIdempotent
Move a document to the AFFiNE trash without deleting its content. This is recoverable with restore_doc and safe to retry.
Inputs: docId (required), workspaceId. Returns: ok, code, kind, docId, +13 more
update_blockUpdate BlockA
Partially update one paragraph, heading, quote, list, or code block while preserving its block id. Omitted fields remain unchanged. Paragraph/heading/quote conversions preserve ids; cross-flavour conversions are rejected.
Inputs: docId (required), blockId (required), text, type, +5 more. Returns: ok, code, block, error, +8 more
update_collectionUpdate CollectionA
Rename an existing AFFiNE sidebar collection without changing its rules or allow-list.
Inputs: collectionId (required), name, workspaceId. Returns: id, ok, code, name, +7 more
update_collection_rulesUpdate Collection RulesA
Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
Inputs: rules (required), collectionId (required), workspaceId. Returns: ok, code, error, rules, +9 more
update_commentUpdate CommentA
Replace the content of an existing comment. This preserves the comment thread; use create_comment for a new thread.
Inputs: id (required), content (required). Returns: id, ok, code, kind, +7 more
update_database_rowUpdate Database RowA
Batch update multiple cells on an existing AFFiNE database row. Include title in the cells map to update the Kanban row title.
Inputs: cells (required), docId (required), rowBlockId (required), databaseBlockId (required), +4 more. Returns: ok, code, error, details, +6 more
update_doc_iconUpdate Document IconA
Set or clear the sidebar icon (the Notion-style emoji slot) on a document. Pass an emoji string, a full icon object, or null to remove it.
Inputs: icon (required), docId (required), workspaceId. Returns: ok, code, icon, kind, +8 more
update_doc_titleUpdate Document TitleA
Rename a document — updates both the sidebar title (workspace metadata) and the doc's internal page block title.
Inputs: docId (required), title (required), workspaceId, expectedRevision. Returns: ok, code, kind, docId, +8 more
update_edgeless_blockUpdate Edgeless BlockA
Partially update a note/frame/edgeless-text block by id. x/y/width/height merge with current prop:xywh (move without resizing, or vice versa). background replaces prop:background (AFFiNE token or {light, dark} hex object). Fields that don't apply to the block's flavour come back under ignored.
Inputs: docId (required), blockId (required), x, y, +5 more. Returns: ok, code, error, blockId, +8 more
update_folder_iconUpdate Folder IconA
Set or clear the sidebar icon on an organize folder. Pass an emoji string, a full icon object, or null to remove it. Experimental.
Inputs: icon (required), folderId (required), workspaceId. Returns: ok, code, icon, kind, +8 more
update_frame_childrenUpdate Frame ChildrenA
Replace a frame block's contents wholesale. Accepts ids of surface elements (shapes/connectors/groups) AND edgeless blocks (notes/frames/edgeless-text) — all go into BlockSuite's prop:childElementIds map, matching what the editor writes when you drag members into a frame. Dragging the frame drags every owned member. Ids that don't resolve come back under 'missing'. By default the frame is resized to fit its new contents (plus padding + title band); set resizeToFit=false to leave xywh untouched. Pass [] to clear ownership (resize is skipped in that case).
Inputs: docId (required), blockId (required), childElementIds (required), padding, +3 more. Returns: ok, code, xywh, error, +10 more
update_mindmap_nodeUpdate Native Mindmap NodeB
Replace a native node's text and/or set collapsed. Keeps node IDs and hierarchy. Recalculates geometry; the editor may refine text dimensions when opened.
Inputs: docId (required), nodeId (required), mindmapId (required), text, +3 more. Returns: ok, code, docId, error, +18 more
update_profileUpdate ProfileA
Update current user's profile information. Requires at least one of name or avatarUrl.
Inputs: name, avatarUrl. Returns: id, ok, code, name, +6 more
update_settingsUpdate SettingsC
Update user settings and preferences.
Inputs: settings (required). Returns: ok, code, error, details, +4 more
update_surface_elementUpdate Surface ElementA
Partially update a surface element by id. x/y/width/height merge with the element's current xywh (move without resizing, or vice versa). text/label/title replace their Y.Text wholesale. Fields that don't apply to the element's type are reported in the response 'ignored' list.
Inputs: docId (required), elementId (required), x, y, +27 more. Returns: ok, code, type, error, +8 more
update_table_cellUpdate Table CellA
Replace one cell in an AFFiNE table by zero-based row and column while preserving rich-text attributes and the table's header bold formatting.
Inputs: row (required), text (required), docId (required), column (required), +3 more. Returns: ok, row, cell, code, +11 more
update_table_column_widthsUpdate Table Column WidthsA
Set every column width in an AFFiNE table while preserving rows and cell content. Pass null for a column to restore AFFiNE's automatic width.
Inputs: docId (required), widths (required), blockId (required), workspaceId, +1 more. Returns: ok, code, error, table, +11 more
update_workspaceUpdate WorkspaceB
Update workspace settings. Requires at least one of public or enableAi.
Inputs: id (required), public, enableAi. Returns: id, ok, code, kind, +6 more
upload_blobUpload BlobA
Upload a file or blob into AFFiNE workspace storage and return its blob key. This creates stored content but does not attach it to a document by itself.
Inputs: content (required), workspaceId (required), encoding, filename, +1 more. Returns: id, ok, key, code, +11 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 107 tools
The tool set covers many adjacent operations, and several groups overlap heavily: list_docs/search_docs/find_doc_by_title, get_doc/read_doc, create_doc/create_doc_from_markdown/create_semantic_page, and append_block/append_markdown/append_semantic_section. The descriptions usually explain the boundaries, so misselection is avoidable, but the sheer number of similar choices makes the set confusing in practice.
Almost all tools use snake_case with a verb_noun pattern, such as list_workspaces, create_doc, update_surface_element, and delete_comment. The main deviation is current_user, and there are minor verb variations like get/read/list, but the overall convention is predictable.
107 tools are far beyond an appropriate MCP surface and create severe navigation and selection overhead. Even though AFFiNE is a broad product, this set would benefit from consolidation and grouping rather than exposing nearly every operation individually.
Coverage is very broad across workspaces, docs, blocks, canvas, databases, mindmaps, tags, collections, folders, comments, properties, and blobs. There are still notable lifecycle gaps, such as database column update/delete, mindmap node deletion, blob listing/retrieval, and explicit comment replies.
Related MCP Connectors
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables clients such as Claude, Cursor, VS Code, and Windsurf to manage workspaces, projects, tasks, and AI agents through a hosted OAuth endpoint or a local stdio package, and to generate MCP tools from OpenAPI specs.2,530 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI agents headless, token-authenticated read/write access to a Notion workspace through MCP, using three context-efficient tools that cover 47 operations across pages, databases, blocks, templates, comments, users, and files. Supports creating and editing pages, querying and filtering databases, batch mutations with rollback and idempotency, markdown round-trips, and image/file uploads, runnable over stdio or HTTP in CI and self-hosted deployments.5,456 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients such as Claude, Cursor, VS Code, and Windsurf to list and manage workspaces, projects, tasks, AI agents, and automations through a hosted OAuth-secured endpoint or a local stdio package. Also generates MCP tools from any OpenAPI spec.2,530 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI agents and MCP-speaking clients such as Claude, Cursor, VS Code and Cline read/write access to a workspace through a single token, so they can create pages, query databases, append blocks, apply templates, comment, and upload files in plain language. It runs headless for CI, cron jobs and self-hosted deployments, keeping tool schemas and responses lightweight, with batched mutations, idempotency keys and retry handling built in.5,456 npmMIT