Affine MCP Server
Model Context Protocol server for AFFiNE. Connect AI assistants to AFFiNE workspaces, documents, databases, and collaboration APIs over stdio or HTTP.
Affine MCP Server is an open-source mcp server by DAWNCR0W, written mainly in JavaScript, with 317 GitHub stars and the MIT license. Its code was last updated Oct 30, 2026.
Scan summary: scanned Nov 5, 2026 at commit 00f1162. Seen able to connect to databases. Scan policy
00f1162 · Nov 5, 2026Findings (8)
- mediumMedium. Worth checking, often a vulnerable dependency or a setup problem.body-parser@2.3.0: 1 known vulnerabilityGHSA-27r3-jxmh-p828
package-lock.json - mediumMedium. Worth checking, often a vulnerable dependency or a setup problem.zod@3.25.76: 1 known vulnerabilityGHSA-mrhx-c7xc-m3w5
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.@hono/node-server@2.0.12: 1 known vulnerabilityGHSA-rmxm-3fg6-px4f
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.fast-uri@3.1.8: 4 known vulnerabilitiesGHSA-333x-w4r6-6crp, GHSA-w74x-v6f9-j3xg, GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.hono@4.13.7: 1 known vulnerabilityGHSA-5r4p-p66f-jhc7
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.ip-address@10.7.2: 1 known vulnerabilityGHSA-rxp7-6hxx-x8q5
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.qs@6.16.0: 1 known vulnerabilityGHSA-6pq8-jhm2-2vcw
package-lock.json - lowLow. Minor, or common in normal tools. Shown for information.No manifest declaring network access and environment variables (agent.json)
Network activity
Tools exposed (108)
list_workspacesList available AFFiNE workspaces with best-effort profile metadata and direct URLs
get_workspaceGet workspace details with best-effort profile metadata and a direct URL
create_workspaceCreate a new workspace with initial document (accessible in UI)
update_workspaceUpdate workspace settings. Requires at least one of public or enableAi.
delete_workspaceDelete a workspace permanently and report success only when AFFiNE confirms the mutation.
create_mindmapCreate 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.
get_mindmapRead and validate native mindmap hierarchy, ordered child IDs, text, collapsed state, geometry, and supported directions. Discover mindmapId via get_edgeless_canvas.
add_mindmap_nodeAdd 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.
update_mindmap_nodeReplace a native node's text and/or set collapsed. Keeps node IDs and hierarchy. Recalculates geometry; the editor may refine text dimensions when opened.
reparent_mindmap_nodeMove 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-
set_mindmap_styleSwitch 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.
set_mindmap_lockSet 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.
set_mindmap_layoutSet 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.
list_docsList 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 a
search_docsFast 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).
find_doc_by_titleResolve 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 too
list_tagsList 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.
list_docs_by_tagList documents that contain the requested tag. This is read-only and each result includes title metadata and an inTrash flag.
create_tagCreate a workspace-level tag entry for future reuse. This does not attach the tag to a document; use add_tag_to_doc for that.
add_tag_to_docAttach a workspace tag to a document, creating the workspace tag option if needed. Document tags are stored in workspace metadata.
remove_tag_from_docDetach a tag from one document without deleting the workspace-level tag. Use delete_tag only when the tag should be removed from every document.
delete_tagDelete 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.
get_docRead GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.
read_docRead 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, whic
get_capabilitiesReturn machine-readable capability flags for this MCP server, including static feature support and the effective enabled tool surface.
analyze_doc_fidelityInspect a document for markdown export fidelity risk, including unsupported AFFiNE block flavours and risky content paths.
move_docMove 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.
publish_docMake a document publicly accessible through AFFiNE public sharing. This changes sharing state; use revoke_doc to disable public access later.
revoke_docDisable public sharing for a document without deleting the document. Use delete_doc only when the document itself should be removed.
create_docCreate 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 insi
create_semantic_pageCreate an AFFiNE-native page with intentional section structure and native block composition.
append_semantic_sectionAppend a semantic section to an existing AFFiNE document by heading title and native block composition.
append_blockAppend document blocks with canonical types and legacy aliases (supports placement + strict validation).
export_doc_markdownExport AFFiNE document content to markdown.
export_with_fidelity_reportExport document markdown together with a structured fidelity report that highlights markdown loss risk and unsupported AFFiNE-native content.
create_doc_from_markdownCreate 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.
append_markdownAppend markdown content to an existing AFFiNE document. $$...$$ and $...$ become native equations.
replace_doc_with_markdownReplace the main note content of a document with markdown content.
trash_docMove a document to the AFFiNE trash without deleting its content. This is recoverable with restore_doc and safe to retry.
restore_docRestore a document from the AFFiNE trash without changing its content. This is safe to retry.
delete_docRemove 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
list_workspace_treeReturns 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.
get_orphan_docsFind 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.
list_childrenList 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.
update_doc_titleRename a document — updates both the sidebar title (workspace metadata) and the doc's internal page block title.
inspect_template_structureInspect a template doc's native structure, tags, and fallback risk before instantiation.
instantiate_template_nativeInstantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
add_database_rowAdd 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.
delete_database_rowDelete a row from an AFFiNE database block.
read_database_cellsRead row titles and database cell values from an AFFiNE database block. Rich-text titles and cells include both plain values and formatting-preserving deltas.
read_database_columnsRead schema metadata for an AFFiNE database block, including columns, select options, and view column mappings. Useful for empty databases before any rows exist.
update_database_rowBatch update multiple cells on an existing AFFiNE database row. Include `title` in the cells map to update the Kanban row title.
compose_database_from_intentCreate 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.
add_database_columnAdd 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.
add_surface_elementAdd 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
list_surface_elementsList 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.
update_surface_elementPartially 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.
delete_surface_elementDelete a surface element by id. Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.
update_frame_childrenReplace 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 ev
update_edgeless_blockPartially 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`.
update_blockPartially 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.
update_table_cellReplace one cell in an AFFiNE table by zero-based row and column while preserving rich-text attributes and the table's header bold formatting.
update_table_column_widthsSet every column width in an AFFiNE table while preserving rows and cell content. Pass null for a column to restore AFFiNE's automatic width.
move_blockMove an existing block without changing its id. Reuses append_block placement semantics and rejects document-root moves and cycles.
delete_blockDelete 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. R
get_edgeless_canvasRead 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 befor
list_commentsList 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.
create_commentCreate a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
update_commentReplace the content of an existing comment. This preserves the comment thread; use create_comment for a new thread.
delete_commentDelete an existing comment by id. This is destructive for that comment; use resolve_comment when you only want to mark a thread resolved.
resolve_commentSet a comment thread's resolved state without changing its content. Use delete_comment only when the comment should be removed.
list_historiesList doc histories (timestamps) for a doc.
list_collectionsList AFFiNE sidebar collections and their rules. Use this read-only tool before updating, deleting, or adding documents to a collection.
get_collectionRead one AFFiNE sidebar collection by id, including rules and allow-list. Use list_collections first when the id is unknown.
create_collectionCreate a new AFFiNE sidebar collection with optional rules. This writes workspace sidebar metadata but does not create documents.
update_collection_rulesReplace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
update_collectionRename an existing AFFiNE sidebar collection without changing its rules or allow-list.
delete_collectionDelete an AFFiNE sidebar collection. This removes the collection metadata but does not delete the documents it referenced.
add_doc_to_collectionAdd an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
remove_doc_from_collectionRemove a document id from an AFFiNE collection allow-list. This does not delete the document or change collection rules.
list_organize_nodesExperimental: list AFFiNE sidebar organize folder and link nodes from the folders workspace DB. Use this before moving or deleting organize nodes.
create_folderExperimental: create an AFFiNE organize folder node in the sidebar tree. This only changes sidebar organization, not document content.
create_workspace_blueprintCreate a simple AFFiNE organize folder blueprint with one root folder and optional child folders. This is a convenience wrapper around create_folder.
rename_folderExperimental: rename an AFFiNE organize folder node. This changes sidebar metadata only and does not rename documents inside the folder.
delete_folderExperimental: 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.
move_organize_nodeExperimental: 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.
add_organize_linkExperimental: 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.
delete_organize_linkExperimental: delete an AFFiNE organize doc, tag, or collection link node. This removes only the sidebar link, not the target resource.
set_doc_journalSet 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.
list_doc_propertiesList native workspace custom-property definitions and document values. Set includeLegacy to read older unscoped data separately for recovery; this never migrates or writes data.
create_custom_propertyCreate a workspace-wide custom property definition (text, number, checkbox, or date). Returns its propertyId.
delete_custom_propertySoft-delete a workspace custom property definition (by propertyId or name). Existing values are hidden.
set_doc_propertySet a document's custom property value (property by id or name). Value is validated against the property type (text/number/checkbox/date).
clear_doc_propertyRemove a custom property value from a document (property by id or name).
update_doc_iconSet 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.
update_folder_iconSet or clear the sidebar icon on an organize folder. Pass an emoji string, a full icon object, or null to remove it. Experimental.
get_doc_iconRead the current sidebar icon of a document. Returns null when none is set.
get_folder_iconRead the current sidebar icon of an organize folder. Returns null when none is set. Experimental.
current_userReturn the currently authenticated AFFiNE user profile. Use this read-only check to verify credentials before workspace or document operations.
update_profileUpdate current user's profile information. Requires at least one of name or avatarUrl.
update_settingsUpdate user settings and preferences.
sign_inSign in to AFFiNE using email and password; sets session cookies for subsequent calls.
get_blobDownload a blob from AFFiNE workspace storage, such as the file behind an image or attachment block. Images are returned as MCP image content; other files as an embedded base64 resource. Read-only.
upload_blobUpload a file or blob into AFFiNE workspace storage and return its blob key. Pass either inline content or, when the server allows it, a local filePath. This creates stored content but does not attach it to a document by itself.
delete_blobDelete a blob from AFFiNE workspace storage. Set permanently only when the blob should bypass recoverable deletion.
cleanup_blobsPermanently 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.
list_notificationsList 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.
read_all_notificationsAsk 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.
Automated result for the commit shown. See our scan policy. View the scan log
Maintainers can claim the listing to rescan, or dispute a result.
Affine MCP Server alternatives
View more →Similar mcp servers in Database Management, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| Affine MCP Server (this page) DAWNCR0W | 317 | MIT | Oct 30, 2026 | Scanned, no flagged issues |
| Codebase Memory MCP DeusData | 48k | MIT | Nov 1, 2026 | Scanned, see report |
| Xerj xerj-org | 19k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| MCP Toolbox googleapis | 17k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| Nightingale ccfos | 13k | Apache-2.0 | Oct 30, 2026 | Scanned, no flagged issues |
| Dbhub bytebase | 3.8k | MIT | Oct 26, 2026 | Scanned, no flagged issues |