affine-markdown-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AFFINE_EMAIL | Yes | Account the agent signs in as | |
| AFFINE_BASE_URL | Yes | Your AFFiNE instance URL, e.g. https://affine.example.com (plain http only for localhost) | |
| AFFINE_PASSWORD | Yes | Password of the account the agent signs in as | |
| AFFINE_READ_ONLY | No | Set to true to register only the reading tools | false |
| AFFINE_WORKSPACE_ID | No | Default workspace, the id from /workspace/<id>/... Without it tools take a workspace name |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
AFFiNE workspace: docs as Markdown, a folder tree and Kanban boards.
Start with tree to see folders and docs. Docs and folders can be named by id or by title.
read_doc gives Markdown. Boards and blocks Markdown cannot show (images, embeds) appear as / markers. Keep those markers when you write the doc back with mode "replace", they keep the board or block in place. Removing a marker removes that block.
Boards: read_board shows cards lane by lane in board order, get_card adds the Markdown inside a card. Change cards only with add_card, update_card, move_card, delete_card. move_card sets the lane field (usually Status) and can place the card (top, bottom, before or after a card). New select values (a new status or author) are added to the board automatically.
create_board adds a Kanban board to a doc. edit_board changes its fields, lanes (add, rename, recolor, reorder, delete with moveTo) and views. delete_board removes it with its cards.
write_doc mode "append" adds to the end, "replace" rewrites the whole body.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_workspacesA | Workspaces the bot user can open, with id, name and role |
| treeA | Folder tree of a workspace with every doc (id and title), like the AFFiNE sidebar |
| searchB | Find docs whose title or text contains the words, with short snippets |
| read_docC | A doc as Markdown, with its id and link |
| list_boardsB | Kanban boards (database blocks) in one doc or in the whole workspace, with their lanes |
| read_boardB | All cards of a board lane by lane in board order, with fields, lane options and views |
| get_cardB | One card: title, lane, fields and the Markdown inside it (its description) |
| create_boardA | Add a Kanban board at the end of a doc, with lanes and fields. Make the doc first with create_doc if needed |
| edit_boardA | Change a board: rename it, add / rename / delete fields, add / rename / recolor / delete / reorder lanes, add a view. Give only what changes |
| delete_boardA | Delete a board with all its cards from a doc. Description docs of cards stay in All docs. Cannot be undone from here, AFFiNE history can |
| add_cardA | Add a card to a board, with optional fields (Status, Author, ...), a Markdown description and a place in its lane |
| update_cardC | Change a card title, fields, description or its place in the lane |
| move_cardA | Move a card to another Kanban lane (sets the lane field, usually Status), optionally to a place in that lane |
| delete_cardC | Delete a card from a board |
| create_docC | New doc from Markdown, optionally inside a folder |
| write_docA | Write Markdown into a doc. mode "append" adds at the end, "replace" rewrites the body (keep the markers from read_doc to keep boards and images) |
| trash_docA | Move a doc to the AFFiNE trash, or restore it with restore=true. Nothing is deleted for good |
| create_folderC | New sidebar folder, at the top or inside another folder |
| move_docA | Put a doc into a folder (moves it out of its current folder) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
Most tools target clearly distinct resources and actions (docs vs boards vs cards vs folders), and the read/list tools are separated by scope (list_boards vs read_board vs get_card vs read_doc). A few names are generic or could be confused, such as 'tree' and 'search', and 'read_doc' vs 'get_card' when cards contain Markdown, but descriptions generally resolve the ambiguity.
The majority follow verb_noun (create_board, add_card, delete_card, move_doc), but conventions are mixed: bare names like 'tree' and 'search', and inconsistent verbs for similar actions (read vs get, create vs add, write vs update, delete vs trash). It remains readable, but the set does not maintain a single predictable pattern.
19 tools is slightly above the ideal 3–15 range, but the domain covers workspaces, docs, boards, cards, and folders, so each tool largely earns its place. The surface is broad but not bloated, with no obvious duplicate tools.
Core lifecycle operations are well covered for docs (create/read/write/trash/move), boards (create/read/edit/delete/list), and cards (add/get/update/move/delete). Gaps remain around folder lifecycle (no delete/rename folder), doc title updates, and view deletion, but these are minor workaroundable omissions for the main workflow.