DAWNCR0W/affine-mcp-server
Model Context Protocol server for AFFiNE. Connect AI assistants to AFFiNE workspaces, documents, databases, and collaboration APIs over stdio or HTTP.
e323f1ae459caffine-mcp-server3.14.0 in package.jsonPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety and Capability Exposure are shown as partly traced instead of a score: no finding there is not a clean result.
- In 88 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- 114 of 120 tools, prompts and resources could not be followed through the code
- 6 tools, prompts and resources registered only in the repository's tests are not counted on this page
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 114 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
compose_database_from_intentNo tool was seen to: start other programs on the machine; read or write files; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (114: 114 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
add_database_columntool 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
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.
add_database_rowtool 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 co
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.
add_database_rowstool Add many rows to an AFFiNE database block with one write. Each row is {cells, linkedDocId?} with the same cell rules as add_database_row. Atomic: an invalid row
Add many rows to an AFFiNE database block with one write. Each row is {cells, linkedDocId?} with the same cell rules as add_database_row. Atomic: an invalid row rejects the whole call. Returns row block ids in input order.add_database_viewtool Add a new view (table or kanban) to an existing AFFiNE database block. Kanban mode requires groupBy: the name of a select/multi-select column to group cards by.
Add a new view (table or kanban) to an existing AFFiNE database block. Kanban mode requires groupBy: the name of a select/multi-select column to group cards by. Duplicate view names are rejected.
add_doc_to_collectiontool Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
add_mindmap_nodetool Add one native child shape to parentId inside mindmapId. beforeId optionally inserts before a sibling; otherwise append. Returns nodeId. Persists hierarchy and
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.
add_organize_linktool 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 duplica
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.
add_surface_elementtool Add a shape, connector, text, or group to the AFFiNE edgeless canvas surface. Shapes support rect/ellipse/diamond/triangle with fill, stroke, and text. Connecto
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).
add_surface_elementstool Add many shapes, connectors, texts or groups to the edgeless canvas in ONE atomic write. Each item takes the same fields as add_surface_element plus an optional
Add many shapes, connectors, texts or groups to the edgeless canvas in ONE atomic write. Each item takes the same fields as add_surface_element plus an optional `key`: a local name that LATER connectors may use as sourceId/targetId, so a whole diagram needs one call. Other endpoint ids must exist in the surface or document blocks. Invalid items, duplicate keys or forward references reject the whole call. Returns each element's id in input order.
add_tag_to_doctool Attach a workspace tag to a document, creating the workspace tag option if needed. Document tags are stored in workspace metadata.
Attach a workspace tag to a document, creating the workspace tag option if needed. Document tags are stored in workspace metadata.
analyze_doc_fidelitytool Inspect a document for markdown export fidelity risk, including unsupported AFFiNE block flavours and risky content paths.
Inspect a document for markdown export fidelity risk, including unsupported AFFiNE block flavours and risky content paths.
append_blocktool Append document blocks with canonical types and legacy aliases (supports placement + strict validation).
Append document blocks with canonical types and legacy aliases (supports placement + strict validation).
append_markdowntool Append markdown content to an existing AFFiNE document. $$...$$ and $...$ become native equations.
Append markdown content to an existing AFFiNE document. $$...$$ and $...$ become native equations.
append_semantic_sectiontool Append a semantic section to an existing AFFiNE document by heading title and native block composition.
Append a semantic section to an existing AFFiNE document by heading title and native block composition.
cleanup_blobstool Permanently release blobs that were already marked deleted in a workspace. This is destructive cleanup and should be used only after confirming deleted blobs ar
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.
clear_doc_propertytool Remove a custom property value from a document (property by id or name).
Remove a custom property value from a document (property by id or name).
compose_database_from_intenttool Create a useful AFFiNE database/data-view from declarative intent. Supports task_board and issue_tracker presets (kanban) and intent "table": a table view with Network
Create a useful AFFiNE database/data-view from declarative intent. Supports task_board and issue_tracker presets (kanban) and intent "table": a table view with a Title column plus your own `columns` and optional `seedRows`, all in one call. Columns and seed rows are validated together before a single content write; invalid input leaves the document unchanged.
create_collectiontool Create a new AFFiNE sidebar collection with optional rules. This writes workspace sidebar metadata but does not create documents.
Create a new AFFiNE sidebar collection with optional rules. This writes workspace sidebar metadata but does not create documents.
create_commenttool Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
create_custom_propertytool Create a workspace-wide custom property definition (text, number, checkbox, or date). Returns its propertyId.
Create a workspace-wide custom property definition (text, number, checkbox, or date). Returns its propertyId.
create_doctool 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
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.
create_doc_from_markdowntool Create a new AFFiNE document and import Markdown as native blocks, including $$...$$ equation blocks and $...$ inline equations. Use parentDocId to embed the ne
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.
create_foldertool Experimental: create an AFFiNE organize folder node in the sidebar tree. This only changes sidebar organization, not document content.
Experimental: create an AFFiNE organize folder node in the sidebar tree. This only changes sidebar organization, not document content.
create_mindmaptool 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
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. Rendering of native mindmaps depends on the AFFiNE client version; if nodes do not appear, rebuild the diagram with add_surface_element (shapes + connectors).
create_semantic_pagetool Create an AFFiNE-native page with intentional section structure and native block composition.
Create an AFFiNE-native page with intentional section structure and native block composition.
create_tagtool 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.
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.
create_workspacetool Create a new workspace with initial document (accessible in UI)
Create a new workspace with initial document (accessible in UI)
create_workspace_blueprinttool Create a simple AFFiNE organize folder blueprint with one root folder and optional child folders. This is a convenience wrapper around create_folder.
Create a simple AFFiNE organize folder blueprint with one root folder and optional child folders. This is a convenience wrapper around create_folder.
current_usertool Return the currently authenticated AFFiNE user profile. Use this read-only check to verify credentials before workspace or document operations.
Return the currently authenticated AFFiNE user profile. Use this read-only check to verify credentials before workspace or document operations.
delete_blobtool Delete a blob from AFFiNE workspace storage. Set permanently only when the blob should bypass recoverable deletion.
Delete a blob from AFFiNE workspace storage. Set permanently only when the blob should bypass recoverable deletion.
delete_blocktool 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=
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.
delete_collectiontool Delete an AFFiNE sidebar collection. This removes the collection metadata but does not delete the documents it referenced.
Delete an AFFiNE sidebar collection. This removes the collection metadata but does not delete the documents it referenced.
delete_commenttool Delete an existing comment by id. This is destructive for that comment; use resolve_comment when you only want to mark a thread resolved.
Delete an existing comment by id. This is destructive for that comment; use resolve_comment when you only want to mark a thread resolved.
delete_custom_propertytool Soft-delete a workspace custom property definition (by propertyId or name). Existing values are hidden.
Soft-delete a workspace custom property definition (by propertyId or name). Existing values are hidden.
delete_database_rowtool Delete a row from an AFFiNE database block.
Delete a row from an AFFiNE database block.
delete_doctool Remove a document from the workspace list and request content deletion. AFFiNE servers may acknowledge this request while retaining readable content that still
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.
delete_foldertool Experimental: delete an AFFiNE organize folder and every nested folder or link node. This is destructive for sidebar organization but does not delete target doc
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.
delete_organize_linktool Experimental: delete an AFFiNE organize doc, tag, or collection link node. This removes only the sidebar link, not the target resource.
Experimental: delete an AFFiNE organize doc, tag, or collection link node. This removes only the sidebar link, not the target resource.
delete_surface_elementtool Delete a surface element by id. Deleting a native mindmap also deletes all of its node shapes (reported in deletedNodes). Set pruneConnectors=true to also delet
Delete a surface element by id. Deleting a native mindmap also deletes all of its node shapes (reported in deletedNodes). Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.
delete_tagtool 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 id
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.
delete_workspacetool Delete a workspace permanently and report success only when AFFiNE confirms the mutation.
Delete a workspace permanently and report success only when AFFiNE confirms the mutation.
export_doc_markdowntool Export AFFiNE document content to markdown.
Export AFFiNE document content to markdown.
export_with_fidelity_reporttool Export document markdown together with a structured fidelity report that highlights markdown loss risk and unsupported AFFiNE-native content.
Export document markdown together with a structured fidelity report that highlights markdown loss risk and unsupported AFFiNE-native content.
find_doc_by_titletool Resolve docs by exact title. Returns ALL matches up to `limit` (callers handle ambiguity). Case-sensitive by default; pass `caseInsensitive: true` to fold case.
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 }.get_blobtool Download 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
Download 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.
get_capabilitiestool Return machine-readable capability flags for this MCP server, including static feature support and the effective enabled tool surface.
Return machine-readable capability flags for this MCP server, including static feature support and the effective enabled tool surface.
get_collectiontool Read one AFFiNE sidebar collection by id, including rules and allow-list. Use list_collections first when the id is unknown.
Read one AFFiNE sidebar collection by id, including rules and allow-list. Use list_collections first when the id is unknown.
get_doctool Read GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.
Read GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.
get_doc_icontool Read the current sidebar icon of a document. Returns null when none is set.
Read the current sidebar icon of a document. Returns null when none is set.
get_doc_revisiontool Read the current document content revision without returning block content. The token matches read_doc.revision and can be passed as expectedRevision to a suppo
Read the current document content revision without returning block content. The token matches read_doc.revision and can be passed as expectedRevision to a supported document mutation.
get_edgeless_canvastool Read the full edgeless canvas: all edgeless-positioned blocks (notes, frames, edgeless-text, images) with their xywh, plus all surface elements (shapes, connect
Read the full edgeless canvas: all edgeless-positioned blocks (notes, frames, edgeless-text, images) 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.
get_folder_icontool Read the current sidebar icon of an organize folder. Returns null when none is set. Experimental.
Read the current sidebar icon of an organize folder. Returns null when none is set. Experimental.
get_mindmaptool Read and validate native mindmap hierarchy, ordered child IDs, text, collapsed state, geometry, and supported directions. Discover mindmapId via get_edgeless_ca
Read and validate native mindmap hierarchy, ordered child IDs, text, collapsed state, geometry, and supported directions. Discover mindmapId via get_edgeless_canvas.
get_orphan_docstool 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 fo
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.
get_workspacetool Get workspace details with best-effort profile metadata and a direct URL
Get workspace details with best-effort profile metadata and a direct URL
inspect_template_structuretool Inspect a template doc's native structure, tags, and fallback risk before instantiation.
Inspect a template doc's native structure, tags, and fallback risk before instantiation.
instantiate_template_nativetool Instantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
Instantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
list_childrentool 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,
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.
list_collectionstool List AFFiNE sidebar collections and their rules. Use this read-only tool before updating, deleting, or adding documents to a collection.
List AFFiNE sidebar collections and their rules. Use this read-only tool before updating, deleting, or adding documents to a collection.
list_commentstool List paginated comments for a document, including nested replies and resolution state. Use this before update_comment, delete_comment, or resolve_comment when y
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.
list_doc_propertiestool List native workspace custom-property definitions and document values. Set includeLegacy to read older unscoped data separately for recovery; this never migrate
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.
list_docstool List documents in a workspace (GraphQL), falling back to bounded workspace metadata when GraphQL document access is denied. Each doc includes an inTrash flag; f
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.
list_docs_by_tagtool List documents that contain the requested tag. This is read-only and each result includes title metadata and an inTrash flag.
List documents that contain the requested tag. This is read-only and each result includes title metadata and an inTrash flag.
list_historiestool List doc histories (timestamps) for a doc.
List doc histories (timestamps) for a doc.
list_notificationstool List one server page of current-user AFFiNE notifications in a stable envelope. The response preserves each edge cursor, server pageInfo, and serverTotalCount.
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.
list_organize_nodestool Experimental: list AFFiNE sidebar organize folder and link nodes from the folders workspace DB. Use this before moving or deleting organize nodes.
Experimental: list AFFiNE sidebar organize folder and link nodes from the folders workspace DB. Use this before moving or deleting organize nodes.
list_surface_elementstool 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
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.list_tagstool 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.
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.
list_workspace_treetool 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
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.
list_workspacestool List available AFFiNE workspaces with best-effort profile metadata and direct URLs
List available AFFiNE workspaces with best-effort profile metadata and direct URLs
move_blocktool Move an existing block without changing its id. Reuses append_block placement semantics and rejects document-root moves and cycles.
Move an existing block without changing its id. Reuses append_block placement semantics and rejects document-root moves and cycles.
move_doctool 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 outco
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.
move_organize_nodetool 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 sid
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.
publish_doctool Make a document publicly accessible through AFFiNE public sharing. This changes sharing state; use revoke_doc to disable public access later.
Make a document publicly accessible through AFFiNE public sharing. This changes sharing state; use revoke_doc to disable public access later.
read_all_notificationstool 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 suc
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.
read_database_cellstool 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.
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.
read_database_columnstool Read schema metadata for an AFFiNE database block, including columns, select options, and view column mappings. Useful for empty databases before any rows exist
Read schema metadata for an AFFiNE database block, including columns, select options, and view column mappings. Useful for empty databases before any rows exist.
read_doctool Read document block content and its revision via WebSocket snapshot. Pass revision as expectedRevision on a document write to reject stale edits through a share
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.
remove_doc_from_collectiontool Remove a document id from an AFFiNE collection allow-list. This does not delete the document or change collection rules.
Remove a document id from an AFFiNE collection allow-list. This does not delete the document or change collection rules.
remove_tag_from_doctool 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.
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.
rename_foldertool Experimental: rename an AFFiNE organize folder node. This changes sidebar metadata only and does not rename documents inside the folder.
Experimental: rename an AFFiNE organize folder node. This changes sidebar metadata only and does not rename documents inside the folder.
reparent_mindmap_nodetool 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.
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.
replace_doc_with_markdowntool Replace the main note content of a document with markdown content.
Replace the main note content of a document with markdown content.
resolve_commenttool Set a comment thread's resolved state without changing its content. Use delete_comment only when the comment should be removed.
Set a comment thread's resolved state without changing its content. Use delete_comment only when the comment should be removed.
restore_doctool Restore a document from the AFFiNE trash without changing its content. This is safe to retry.
Restore a document from the AFFiNE trash without changing its content. This is safe to retry.
revoke_doctool Disable public sharing for a document without deleting the document. Use delete_doc only when the document itself should be removed.
Disable public sharing for a document without deleting the document. Use delete_doc only when the document itself should be removed.
search_docstool 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,
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).
set_doc_journaltool 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.
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.
set_doc_propertytool Set a document's custom property value (property by id or name). Value is validated against the property type (text/number/checkbox/date).
Set a document's custom property value (property by id or name). Value is validated against the property type (text/number/checkbox/date).
set_mindmap_layouttool Set right, left, or balance and persist native node positions. Root stays anchored; collapsed flags remain unchanged. BlockSuite does not support down/up. This
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.
set_mindmap_locktool 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
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.
set_mindmap_styletool 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, col
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.
sign_intool Sign in to AFFiNE using email and password; sets session cookies for subsequent calls.
Sign in to AFFiNE using email and password; sets session cookies for subsequent calls.
trash_doctool Move a document to the AFFiNE trash without deleting its content. This is recoverable with restore_doc and safe to retry.
Move a document to the AFFiNE trash without deleting its content. This is recoverable with restore_doc and safe to retry.
update_blocktool Partially update one paragraph, heading, quote, list, or code block while preserving its block id. Omitted fields remain unchanged. Paragraph/heading/quote conv
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. Returns the resulting document revision for the next expectedRevision check.
update_blockstool Apply several update_block edits within one document using one content update. Each block id must be unique. If any edit is invalid, no content update is sent.
Apply several update_block edits within one document using one content update. Each block id must be unique. If any edit is invalid, no content update is sent. Returns per-block results in input order and the resulting document revision.
update_collectiontool Rename an existing AFFiNE sidebar collection without changing its rules or allow-list.
Rename an existing AFFiNE sidebar collection without changing its rules or allow-list.
update_collection_rulestool Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
update_commenttool Replace the content of an existing comment. This preserves the comment thread; use create_comment for a new thread.
Replace the content of an existing comment. This preserves the comment thread; use create_comment for a new thread.
update_database_rowtool Batch update multiple cells on an existing AFFiNE database row. Include `title` in the cells map to update the Kanban row title.
Batch update multiple cells on an existing AFFiNE database row. Include `title` in the cells map to update the Kanban row title.
update_doc_icontool 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.
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.
update_doc_titletool Rename a document — updates both the sidebar title (workspace metadata) and the doc's internal page block title.
Rename a document — updates both the sidebar title (workspace metadata) and the doc's internal page block title.
update_edgeless_blocktool Partially update a note/frame/edgeless-text/image block by id. x/y/width/height merge with current prop:xywh (move without resizing, or vice versa). background
Partially update a note/frame/edgeless-text/image 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); edgeless-text and image blocks have no background and report it under `ignored`. Fields that don't apply to the block's flavour come back under `ignored`.update_folder_icontool Set or clear the sidebar icon on an organize folder. Pass an emoji string, a full icon object, or null to remove it. Experimental.
Set or clear the sidebar icon on an organize folder. Pass an emoji string, a full icon object, or null to remove it. Experimental.
update_frame_childrentool Replace a frame block's contents wholesale. Accepts ids of surface elements (shapes/connectors/groups) AND edgeless blocks (notes/frames/edgeless-text) — all go
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).
update_mindmap_nodetool 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.
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.
update_profiletool Update current user's profile information. Requires at least one of name or avatarUrl.
Update current user's profile information. Requires at least one of name or avatarUrl.
update_settingstool Update user settings and preferences.
Update user settings and preferences.
update_surface_elementtool 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 replac
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.
update_surface_elementstool Partially update many surface elements in ONE atomic write. Each item takes the same fields as update_surface_element. A missing element rejects the whole call.
Partially update many surface elements in ONE atomic write. Each item takes the same fields as update_surface_element. A missing element rejects the whole call. Returns per-element changed/ignored lists.
update_table_celltool 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.
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.
update_table_column_widthstool 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.
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.
update_workspacetool Update workspace settings. Requires at least one of public or enableAi.
Update workspace settings. Requires at least one of public or enableAi.
upload_blobtool Upload 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 cr
Upload 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.
Text the model reads (117)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
sign_in tool
Sign in to AFFiNE using email and password; sets session cookies for subsequent calls.
get_blob tool
Download 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_blob tool
Upload 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_blob tool
Delete a blob from AFFiNE workspace storage. Set permanently only when the blob should bypass recoverable deletion.
cleanup_blobs tool
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.
list_comments tool
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.
create_comment tool
Create a new comment on an existing document. This writes collaboration state; use update_comment when editing an existing comment instead.
update_comment tool
Replace the content of an existing comment. This preserves the comment thread; use create_comment for a new thread.
delete_comment tool
Delete an existing comment by id. This is destructive for that comment; use resolve_comment when you only want to mark a thread resolved.
resolve_comment tool
Set a comment thread's resolved state without changing its content. Use delete_comment only when the comment should be removed.
list_docs tool
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.
search_docs tool
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).
find_doc_by_title tool
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 }.list_tags tool
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.
list_docs_by_tag tool
List documents that contain the requested tag. This is read-only and each result includes title metadata and an inTrash flag.
create_tag tool
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.
add_tag_to_doc tool
Attach a workspace tag to a document, creating the workspace tag option if needed. Document tags are stored in workspace metadata.
remove_tag_from_doc tool
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.
delete_tag tool
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.
get_doc tool
Read GraphQL metadata for one document, such as title, summary, public state, roles, and timestamps. Use read_doc when you need block content.
read_doc tool
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.
get_doc_revision tool
Read the current document content revision without returning block content. The token matches read_doc.revision and can be passed as expectedRevision to a supported document mutation.
get_capabilities tool
Return machine-readable capability flags for this MCP server, including static feature support and the effective enabled tool surface.
analyze_doc_fidelity tool
Inspect a document for markdown export fidelity risk, including unsupported AFFiNE block flavours and risky content paths.
move_doc tool
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.
publish_doc tool
Make a document publicly accessible through AFFiNE public sharing. This changes sharing state; use revoke_doc to disable public access later.
revoke_doc tool
Disable public sharing for a document without deleting the document. Use delete_doc only when the document itself should be removed.
create_doc tool
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.
create_semantic_page tool
Create an AFFiNE-native page with intentional section structure and native block composition.
append_semantic_section tool
Append a semantic section to an existing AFFiNE document by heading title and native block composition.
append_block tool
Append document blocks with canonical types and legacy aliases (supports placement + strict validation).
export_doc_markdown tool
Export AFFiNE document content to markdown.
export_with_fidelity_report tool
Export document markdown together with a structured fidelity report that highlights markdown loss risk and unsupported AFFiNE-native content.
create_doc_from_markdown tool
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.
append_markdown tool
Append markdown content to an existing AFFiNE document. $$...$$ and $...$ become native equations.
replace_doc_with_markdown tool
Replace the main note content of a document with markdown content.
trash_doc tool
Move a document to the AFFiNE trash without deleting its content. This is recoverable with restore_doc and safe to retry.
restore_doc tool
Restore a document from the AFFiNE trash without changing its content. This is safe to retry.
delete_doc tool
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.
list_workspace_tree tool
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.
get_orphan_docs tool
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.
list_children tool
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.
update_doc_title tool
Rename a document — updates both the sidebar title (workspace metadata) and the doc's internal page block title.
inspect_template_structure tool
Inspect a template doc's native structure, tags, and fallback risk before instantiation.
instantiate_template_native tool
Instantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
add_database_row tool
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.
add_database_rows tool
Add many rows to an AFFiNE database block with one write. Each row is {cells, linkedDocId?} with the same cell rules as add_database_row. Atomic: an invalid row rejects the whole call. Returns row block ids in input order.delete_database_row tool
Delete a row from an AFFiNE database block.
read_database_cells tool
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.
read_database_columns tool
Read 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_row tool
Batch update multiple cells on an existing AFFiNE database row. Include `title` in the cells map to update the Kanban row title.
compose_database_from_intent tool
Create a useful AFFiNE database/data-view from declarative intent. Supports task_board and issue_tracker presets (kanban) and intent "table": a table view with a Title column plus your own `columns` and optional `seedRows`, all in one call. Columns and seed rows are validated together before a single content write; invalid input leaves the document unchanged.
add_database_column tool
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.
add_database_view tool
Add a new view (table or kanban) to an existing AFFiNE database block. Kanban mode requires groupBy: the name of a select/multi-select column to group cards by. Duplicate view names are rejected.
add_surface_element tool
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).
add_surface_elements tool
Add many shapes, connectors, texts or groups to the edgeless canvas in ONE atomic write. Each item takes the same fields as add_surface_element plus an optional `key`: a local name that LATER connectors may use as sourceId/targetId, so a whole diagram needs one call. Other endpoint ids must exist in the surface or document blocks. Invalid items, duplicate keys or forward references reject the whole call. Returns each element's id in input order.
update_surface_elements tool
Partially update many surface elements in ONE atomic write. Each item takes the same fields as update_surface_element. A missing element rejects the whole call. Returns per-element changed/ignored lists.
list_surface_elements tool
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.update_surface_element tool
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.
delete_surface_element tool
Delete a surface element by id. Deleting a native mindmap also deletes all of its node shapes (reported in deletedNodes). Set pruneConnectors=true to also delete any connectors whose source or target referenced the deleted element.
update_frame_children tool
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).
update_edgeless_block tool
Partially update a note/frame/edgeless-text/image 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); edgeless-text and image blocks have no background and report it under `ignored`. Fields that don't apply to the block's flavour come back under `ignored`.update_block tool
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. Returns the resulting document revision for the next expectedRevision check.
update_blocks tool
Apply several update_block edits within one document using one content update. Each block id must be unique. If any edit is invalid, no content update is sent. Returns per-block results in input order and the resulting document revision.
update_table_cell tool
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.
update_table_column_widths tool
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.
move_block tool
Move an existing block without changing its id. Reuses append_block placement semantics and rejects document-root moves and cycles.
delete_block tool
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.
get_edgeless_canvas tool
Read the full edgeless canvas: all edgeless-positioned blocks (notes, frames, edgeless-text, images) 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.
list_histories tool
List doc histories (timestamps) for a doc.
update_doc_icon tool
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.
update_folder_icon tool
Set 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_icon tool
Read the current sidebar icon of a document. Returns null when none is set.
get_folder_icon tool
Read the current sidebar icon of an organize folder. Returns null when none is set. Experimental.
create_mindmap tool
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. Rendering of native mindmaps depends on the AFFiNE client version; if nodes do not appear, rebuild the diagram with add_surface_element (shapes + connectors).
get_mindmap tool
Read and validate native mindmap hierarchy, ordered child IDs, text, collapsed state, geometry, and supported directions. Discover mindmapId via get_edgeless_canvas.
add_mindmap_node tool
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.
update_mindmap_node tool
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.
reparent_mindmap_node tool
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.
set_mindmap_style tool
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.
set_mindmap_lock tool
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.
set_mindmap_layout tool
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.
list_notifications tool
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.
read_all_notifications tool
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.
list_collections tool
List AFFiNE sidebar collections and their rules. Use this read-only tool before updating, deleting, or adding documents to a collection.
get_collection tool
Read one AFFiNE sidebar collection by id, including rules and allow-list. Use list_collections first when the id is unknown.
create_collection tool
Create a new AFFiNE sidebar collection with optional rules. This writes workspace sidebar metadata but does not create documents.
update_collection_rules tool
Replace an AFFiNE collection's rules and rebuild its allow-list from current workspace documents. This can change which docs appear in the collection.
update_collection tool
Rename an existing AFFiNE sidebar collection without changing its rules or allow-list.
delete_collection tool
Delete an AFFiNE sidebar collection. This removes the collection metadata but does not delete the documents it referenced.
add_doc_to_collection tool
Add an existing document id to an AFFiNE collection allow-list. Use update_collection_rules instead when membership should be rule-driven.
remove_doc_from_collection tool
Remove a document id from an AFFiNE collection allow-list. This does not delete the document or change collection rules.
list_organize_nodes tool
Experimental: list AFFiNE sidebar organize folder and link nodes from the folders workspace DB. Use this before moving or deleting organize nodes.
create_folder tool
Experimental: create an AFFiNE organize folder node in the sidebar tree. This only changes sidebar organization, not document content.
create_workspace_blueprint tool
Create a simple AFFiNE organize folder blueprint with one root folder and optional child folders. This is a convenience wrapper around create_folder.
rename_folder tool
Experimental: rename an AFFiNE organize folder node. This changes sidebar metadata only and does not rename documents inside the folder.
delete_folder tool
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.
move_organize_node tool
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.
add_organize_link tool
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.
delete_organize_link tool
Experimental: delete an AFFiNE organize doc, tag, or collection link node. This removes only the sidebar link, not the target resource.
set_doc_journal tool
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.
list_doc_properties tool
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.
create_custom_property tool
Create a workspace-wide custom property definition (text, number, checkbox, or date). Returns its propertyId.
delete_custom_property tool
Soft-delete a workspace custom property definition (by propertyId or name). Existing values are hidden.
set_doc_property tool
Set a document's custom property value (property by id or name). Value is validated against the property type (text/number/checkbox/date).
clear_doc_property tool
Remove a custom property value from a document (property by id or name).
current_user tool
Return the currently authenticated AFFiNE user profile. Use this read-only check to verify credentials before workspace or document operations.
update_profile tool
Update current user's profile information. Requires at least one of name or avatarUrl.
update_settings tool
Update user settings and preferences.
list_workspaces tool
List available AFFiNE workspaces with best-effort profile metadata and direct URLs
get_workspace tool
Get workspace details with best-effort profile metadata and a direct URL
create_workspace tool
Create a new workspace with initial document (accessible in UI)
update_workspace tool
Update workspace settings. Requires at least one of public or enableAi.
delete_workspace tool
Delete a workspace permanently and report success only when AFFiNE confirms the mutation.
add_database_column tool
list_collections tool
delete_doc tool
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 6 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 6 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 6 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 6 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 6 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 114 capabilities; 1 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 114 capabilities; 1 more call code the scanner could not follow, where it may happen
- Tools that call the network1 of 114 capabilities call the network
Where the code is: 114 handlers in 13 files at commit e323f1ae459c
src/tools/auth.tssign_insrc/tools/blobStorage.tsget_blob, upload_blob, delete_blob, cleanup_blobssrc/tools/comments.tslist_comments, create_comment, update_comment, delete_comment, resolve_commentsrc/tools/docs.tslist_docs, search_docs, find_doc_by_title, list_tags, list_docs_by_tag, create_tag, add_tag_to_doc, remove_tag_from_doc, delete_tag, get_doc, read_doc, get_doc_revision +47src/tools/history.tslist_historiessrc/tools/icons.tsupdate_doc_icon, update_folder_icon, get_doc_icon, get_folder_iconsrc/tools/mindmap.tscreate_mindmap, get_mindmap, add_mindmap_node, update_mindmap_node, reparent_mindmap_node, set_mindmap_style, set_mindmap_lock, set_mindmap_layoutsrc/tools/notifications.tslist_notifications, read_all_notificationssrc/tools/organize.tslist_collections, get_collection, create_collection, update_collection_rules, update_collection, delete_collection, add_doc_to_collection, remove_doc_from_collection, list_organize_nodes, create_folder, create_workspace_blueprint, rename_folder +4src/tools/properties.tsset_doc_journal, list_doc_properties, create_custom_property, delete_custom_property, set_doc_property, clear_doc_propertysrc/tools/user.tscurrent_usersrc/tools/userCRUD.tsupdate_profile, update_settingssrc/tools/workspaces.tslist_workspaces, get_workspace, create_workspace, update_workspace, delete_workspace
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: package.json
- Lockfiles checked against OSV1 file resolved and checked against the OSV database
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK version@modelcontextprotocol/sdk ^1.32.2
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 114 capabilities; 1 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read (5 only in code no tool reaches)
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | @modelcontextprotocol/sdk ^1.32.2 |
| Servers in the code | 9 (affine-mcp, database-safety, document-creation-recovery-test, runtime-capacity-test, runtime-idle-test, runtime-close-test, queue-error-schema-test, output-schema-test, output-schema-wire-test) |
The project's own security
| Security policy | yes SECURITY.md |
|---|---|
| Private reporting | mentioned the policy names a private channel |
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-16 |
| Signed releases | not checked yet |
Install it
For the server's own npm package affine-mcp-server. Pin a version ([email protected]) so an update cannot change the tools without you noticing.
Claude Desktop claude_desktop_config.json
{
"mcpServers": {
"affine-mcp-server": {
"command": "npx",
"args": [
"-y",
"affine-mcp-server"
]
}
}
}Cursor ~/.cursor/mcp.json
{
"mcpServers": {
"affine-mcp-server": {
"command": "npx",
"args": [
"-y",
"affine-mcp-server"
]
}
}
}VS Code .vscode/mcp.json
{
"servers": {
"affine-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"affine-mcp-server"
]
}
}
}Claude Code terminal
claude mcp add affine-mcp-server -- npx -y affine-mcp-serverWhere it is published
| npm package | affine-mcp-server |
|---|---|
| Downloads | 4 387 a month on npm |
| Listed in | 4 catalogs (github_search, glama, mcp_toplist, npm) |
| License | MIT |
| Created | 2025-08-11 |
| Topics | affine ai-assistants claude codex cursor knowledge-base mcp model-context-protocol |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.