docmost-community-mcp
This MCP server lets an AI act as a Docmost Community user to search, read, write, and organize a self-hosted wiki through Docmost’s internal HTTP API.
Search and read pages, sections, outlines, history, breadcrumbs, backlinks, attachments, comments, spaces, and workspace members.
Create, update, partially edit, duplicate, copy, move, trash/restore, and permanently delete pages.
Edit parts of pages with text, section, and table-row operations while leaving untouched content unchanged.
Create, update, and delete page comments, including replies.
Manage spaces and space membership/roles; create, update, delete, and export spaces.
Export pages/spaces to Markdown or HTML, optionally including children or attachments.
Upload attachments, get attachment info, and manage page labels.
Operate read-only via
DOCMOST_READ_ONLYand limit exposed tools withDOCMOST_TOOLSETS.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@docmost-community-mcp Search the wiki for 'API authentication' and summarize the top result."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
docmost-community-mcp
Model Context Protocol (MCP) server for self-hosted Docmost Community / Open Source Edition. Lets Claude, Cursor or any MCP client search, read, write and organize your wiki.
Docmost's official MCP server and API keys are Enterprise-only. This server talks to the same internal HTTP API the Docmost web app uses, so it works on the free edition.
Source: github.com/dilruwanm/docmost-community-mcp
Quick start
You need Docmost v0.71+ (verified on v0.96.0), Node.js 20+, and a Docmost user for the AI to sign in as. A dedicated user is best: the AI can do anything that user can.
Claude Code:
claude mcp add docmost --env DOCMOST_URL=https://docs.example.com --env DOCMOST_EMAIL=you@example.com --env DOCMOST_PASSWORD=your-password -- npx -y docmost-community-mcpCursor, Claude Desktop and other clients: add this to the client's MCP config (for Cursor, .cursor/mcp.json or ~/.cursor/mcp.json):
{
"mcpServers": {
"docmost": {
"command": "npx",
"args": ["-y", "docmost-community-mcp"],
"env": {
"DOCMOST_URL": "https://docs.example.com",
"DOCMOST_EMAIL": "you@example.com",
"DOCMOST_PASSWORD": "your-password"
}
}
}
}Restart the client, then ask something like "list my Docmost spaces". To let the AI read but never change anything, add DOCMOST_READ_ONLY=true. All settings are under Environment.
Related MCP server: docmost-mcp-local
What you can ask it
"Find our onboarding checklist and summarize it."
"In the Release 2.4 page, set Alpha's State to Done in the Status table."
"Add a Risks section under Plan with these three points."
"Move every page under Drafts into the Archive space."
"Show the open comments on the Q3 roadmap and reply to the question about dates."
"Export the Engineering space as Markdown."
Compatibility
Docmost | Community / Open Source Edition, v0.71+ for page writes; verified on v0.96.0. Older servers can read, and writes fail with a clear error. |
Node.js | 20 or newer |
MCP clients | Any client that runs stdio servers. Setups above for Claude Code, Claude Desktop and Cursor. |
Transport | stdio |
This server uses Docmost's internal HTTP API (the one its web app uses), not a documented public API. A Docmost upgrade can change it; if a tool breaks after an upgrade, please open an issue with your Docmost version.
Install from source
git clone https://github.com/dilruwanm/docmost-community-mcp.git
cd docmost-community-mcp
npm install
npm run buildThen point your client at the build instead of npx:
{
"mcpServers": {
"docmost": {
"command": "node",
"args": ["/absolute/path/to/docmost-community-mcp/dist/index.js"],
"env": {
"DOCMOST_URL": "https://docs.example.com",
"DOCMOST_EMAIL": "you@example.com",
"DOCMOST_PASSWORD": "your-password"
}
}
}
}What you get
Official Enterprise MCP tool names, plus Community extras those docs omit.
Pages: search_pages, get_page, create_page, update_page, edit_page, list_pages, list_child_pages, duplicate_page, copy_page_to_space, move_page, move_page_to_space, delete_page, restore_page, list_trash, get_page_history, get_history_version, get_breadcrumbs, get_backlinks, export_page
Spaces: list_spaces, get_space, create_space, update_space, delete_space, export_space
Comments: get_comments, create_comment, update_comment, delete_comment
Search / people: search_attachments, search_suggest, list_workspace_members, get_current_user
Files / labels / access: upload_attachment, get_attachment_info, list_page_labels, add_page_labels, remove_page_label, list_space_members, add_space_members, remove_space_member, update_space_member_role
Page and comment bodies are Markdown. update_page goes through POST /api/pages/update with format: "markdown" so Docmost converts and applies the change in place. edit_page (below) edits the page's ProseMirror JSON instead, so untouched content is written back exactly as it was read. The server does not open a Yjs socket or invent its own TipTap schema.
Editing part of a page
update_page replaces, appends or prepends a whole body. To change one part, use edit_page: it reads the page, applies your edits in memory and writes once. Tables, callouts, inline comments and every block you did not touch are sent back unchanged. If any edit fails, nothing is written.
{
"page_id": "aB3dE5fG7h",
"expected_updated_at": "2026-11-21T12:00:00.000Z",
"edits": [
{ "mode": "replace_text", "old_text": "v1.0", "new_text": "v1.1" },
{ "mode": "replace_section", "heading": "## Status", "markdown": "Shipped." },
{ "mode": "insert_in_section", "heading": "Install", "markdown": "Requires Node 20." }
]
}Mode | What it does |
| Replaces |
| Keeps the heading and replaces everything under it, subsections included. Rename a heading with |
| Adds blocks to a section. |
| Adds blocks after the section and all its subsections. |
| Removes the heading, its body and its subsections. |
| Changes one table row. |
| Adds a row with |
| Removes the row matched by |
How table rows work:
rowandafter_rowmatch a row by the text of its first cell (exact, ignoring extra spaces). Header rows never match. No match, or more than one, is an error that lists the candidates. Passheadingto search one section only, for example when two tables share a row name.Cell values are one line of text with bold, italic, code and links. The number of
cellsmust equal the table's columns. Tables with merged cells, and tables inside callouts or columns, are refused.
{
"page_id": "aB3dE5fG7h",
"edits": [
{ "mode": "update_row", "row": "Alpha", "values": { "State": "Done" } },
{ "mode": "insert_row", "after_row": "Alpha", "cells": ["Gamma", "Gil", "Open"] },
{ "mode": "delete_row", "row": "Beta", "heading": "Status" }
]
}How sections work:
headingis the heading's text (case-insensitive), or"## Text"to pin the level. A missing heading, or a name that matches more than one section, is an error that lists the candidates.A section runs from its heading to the next heading of the same or higher level. Sections are flat: text sitting after a subsection's content belongs to that subsection. To add text to a parent section ahead of its subsections, use
insert_in_section, notinsert_after_section.Only top-level headings count; headings inside callouts or tables do not.
New
markdownsupports headings, paragraphs, one-level bullet and numbered lists, fenced code, and bold, italic, code and links. Tables, blockquotes, callouts, images, nested or task lists and horizontal rules are refused with an error naming the construct. Usereplace_textto change text inside existing rich content, and the row modes to change table rows.expected_updated_at(optional) refuses the write if the page changed since thatupdatedAt. There is still a small window between the check and the write.
Reading less
get_page can return part of a page: outline: true lists the headings with offsets, heading returns one section as Markdown, and max_chars plus offset page through the body. Text longer than 40,000 characters is cut off with truncated: true and a next_offset; pass it back as offset to continue. get_history_version pages the same way. format=json bodies are not capped.
Smaller responses
To save AI context, list and write results are slim by default (for example list_pages items keep id, slugId, title, icon, parentPageId, hasChildren, updatedAt, with the shared space shown once), fields that are null are omitted, and JSON is compact. Pass verbose: true to get the full metadata. The CHANGELOG lists exactly which fields each tool drops.
DOCMOST_TOOLSETS limits which tools are exposed, which shrinks the tool list your client sends to the model on every request.
Environment
Variable | Required | Purpose |
| yes | Instance URL, e.g. |
| one auth method | Community login |
| one auth method |
|
| no | Session cache file |
| no |
|
| no | Comma list of tool groups to expose: |
Email/password is preferred. The JWT is cached under ~/.docmost-community-mcp/session.json and refreshed on 401. MFA accounts cannot complete login here — use DOCMOST_AUTH_TOKEN instead.
Use a dedicated Docmost user. Do not commit credentials.
Security
The AI acts as the Docmost user you configure, with all of that user's permissions. Use a dedicated user, and give it only the spaces and role it needs.
DOCMOST_READ_ONLY=truerefuses every tool that changes content.DOCMOST_TOOLSETShides whole tool groups.The login session (a JWT) is cached in
~/.docmost-community-mcp/session.json, orDOCMOST_SESSION_PATH. Treat that file like a password.Keep credentials in your client's MCP config or environment, never in a repository.
To report a vulnerability, see SECURITY.md. Please don't open a public issue for it.
Troubleshooting
Symptom | Fix |
"This account requires MFA" | The login here can't complete MFA. Sign in to Docmost in a browser, copy the |
"Saved session is missing or expired" | With |
"This Docmost build is too old for in-place Markdown writes" | Upgrade Docmost to v0.71 or newer. Reading works on older versions. |
| Attachment search is a Docmost Enterprise feature. |
| The AI guessed an argument name. The error names the wrong key; the right one is in the tool's schema (here |
A table gains an empty header row after an edit | Fixed in 1.2.0. Update to the latest version; the next save repairs an affected table. |
The client can't start | Use |
Design notes
stdio only in this release. Streamable HTTP can be added later.
No Enterprise license, no Docmost database access, no Docmost fork.
Space slugs are accepted anywhere a space id is required.
Page slugIds (the id in page URLs) are accepted anywhere a page id is required, and are resolved to UUIDs before the request.
move_pagecomputes the required fractionalpositionkey (first,last, or after a sibling).create_page/update_pagefail clearly on servers older than v0.71 instead of silently dropping the body.get_current_userreportsdocmostVersionfrom Docmost'scurrentVersionfield.delete_spacerequiresconfirm: true. Mutating tools honorDOCMOST_READ_ONLY.list_pagesdefaults to recently updated pages. Passview=treefor sidebar-root pages.edit_pageneeds Docmost to acceptformat: "json"on/api/pages/update; this was verified on v0.96.0. It writes the whole page body back in one request, so a person typing in the editor at the same moment can still be overwritten (seeexpected_updated_at).Docmost's Markdown export ignores a table's header row and writes a blank header line instead, so writing that Markdown back would demote the real header and add an empty row each time.
get_pageputs the first non-blank row back as the header and drops blank rows left by earlier round trips, so reading and writing a page keeps its tables, and the next save repairs a damaged one. GFM has no headerless tables, so a table stored without a header row gains one on write-back.export_pageoutput is not affected.Every tool rejects unknown argument names, and the error names them (for example
pageIdinstead ofpage_id).search_attachmentsis Enterprise-only; Community hosts get a clear 403 message.Export tools write a zip or a single
.md/.htmlfile tooutput_pathor a temp file and return the path.
Contributing
Bug reports and pull requests are welcome. See CONTRIBUTING.md; for questions, use Discussions. Release notes are in the CHANGELOG.
License
MIT. This package does not include Docmost AGPL or Enterprise source.
Available Tools
42 toolsadd_page_labelsA
Add one or more labels to a page. Names are normalized to lowercase kebab-case.
Inputs: names (required), page_id (required).
add_space_membersC
Add users and/or groups to a space with a role.
Inputs: role (required), space_id (required), user_ids, group_ids.
copy_page_to_spaceA
Copy a page and its accessible sub-pages into a different space.
Inputs: page_id (required), space_id (required), verbose.
create_commentA
Add a page-level comment. Inline selection comments are not supported.
Inputs: page_id (required), markdown (required), parent_comment_id.
create_pageB
Create a page in a space from Markdown, optionally under a parent.
Inputs: title (required), space_id (required), icon, verbose, +2 more.
create_spaceB
Create a space. Slug is generated from the name if omitted. Requires permission to manage spaces.
Inputs: name (required), slug, description.
delete_commentBDestructive
Delete a comment. Owners can delete their own; space admins can delete any comment.
Inputs: comment_id (required).
delete_pageADestructive
Move a page to trash, or permanently delete it. Permanent delete requires space admin.
Inputs: page_id (required), permanently.
delete_spaceADestructive
Delete a space and its pages. This cannot be undone.
Inputs: confirm (required), space_id (required).
duplicate_pageA
Duplicate a page and its accessible sub-pages within the same space.
Inputs: page_id (required), verbose.
edit_pageA
Edit parts of a page, leaving the rest as is. edits run in order, written once; if any fails nothing is written. Modes: replace_text (old_text must match once in one paragraph, or use replace_all), replace_section (keeps the heading, replaces what is under it), insert_after_section (after its subsections), insert_in_section (at=start, or at=end, the default: end of its own body before any subsection), delete_section. heading is the text, or '## Text' to pin the level. Table rows (row/after_row match a row's first cell; heading optionally scopes): update_row (values by column header, or cells for every cell), insert_row (cells, after after_row or at the table's end), delete_row.
Inputs: edits (required), page_id (required), expected_updated_at.
export_pageBRead-only
Export a page to output_path or a temp file and return the path. Without children usually .md/.html; include_children gives a zip.
Inputs: page_id (required), format, output_path, include_children, +1 more.
export_spaceBRead-only
Export a whole space as a zip of Markdown or HTML. Writes to output_path or a temp file.
Inputs: space_id (required), format, output_path, include_attachments.
get_attachment_infoBRead-only
Get metadata for an uploaded attachment.
Inputs: attachment_id (required).
get_backlinksBRead-only
List incoming or outgoing page links.
Inputs: page_id (required), direction (required), limit, cursor.
get_breadcrumbsARead-only
Get the ancestor path from space root to a page.
Inputs: page_id (required), verbose.
get_commentsARead-only
List page-level comments. Content is returned as Markdown. Each comment is re-fetched so edits are not stale.
Inputs: page_id (required), limit, cursor.
get_current_userARead-only
Get the authenticated user and workspace context, detected Docmost version, and whether this session is read-only.
Inputs: verbose.
get_history_versionBRead-only
Get a specific page history version by history ID.
Inputs: history_id (required), offset, max_chars.
get_pageARead-only
Get page metadata and Markdown body (format=json for ProseMirror). To read less: outline=true lists headings, heading returns one section, max_chars+offset page the body (follow next_offset).
Inputs: page_id (required), format, offset, heading, +2 more.
get_page_historyCRead-only
List revision history for a page.
Inputs: page_id (required), limit, cursor.
get_spaceARead-only
Get details for a space, including the current user's membership.
Inputs: space_id (required).
list_child_pagesARead-only
List direct child pages of a page, in sidebar order. Omit page_id and pass space_id for space-root pages.
Inputs: limit, cursor, page_id, verbose, +1 more.
list_page_labelsCRead-only
List labels on a page.
Inputs: page_id (required), limit, cursor.
list_pagesARead-only
List pages in a space. view=recent (default) is recently updated pages, not the sidebar tree; view=tree is space-root pages in sidebar order. Use list_child_pages for children.
Inputs: space_id (required), view, limit, cursor, +1 more.
list_space_membersBRead-only
List members and groups in a space.
Inputs: space_id (required), limit, cursor, verbose.
list_spacesBRead-only
List spaces the authenticated user can access.
Inputs: limit, cursor.
list_trashBRead-only
List soft-deleted pages in a space.
Inputs: space_id (required), limit, cursor, verbose.
list_workspace_membersCRead-only
List workspace members.
Inputs: limit, query, cursor, verbose.
move_pageA
Move a page under a new parent or to the space root. Position is computed unless you pass an explicit 5-12 character key.
Inputs: page_id (required), root, position, after_page_id, +1 more.
move_page_to_spaceA
Move a page and its accessible sub-pages to a different space.
Inputs: page_id (required), space_id (required).
remove_page_labelB
Remove a label from a page by label ID.
Inputs: page_id (required), label_id (required).
remove_space_memberCDestructive
Remove a user or group from a space.
Inputs: space_id (required), user_id, group_id.
restore_pageA
Restore a soft-deleted page from trash.
Inputs: page_id (required), verbose.
search_attachmentsARead-only
Search attachments by name or text. Enterprise only: Community gets 403. Prefer get_attachment_info when you have an id.
Inputs: query (required), limit, space_id.
search_pagesARead-only
Full-text search for pages the authenticated user can access. Optionally scope to a space.
Inputs: query (required), limit, offset, verbose, +1 more.
search_suggestCRead-only
Typeahead suggestions. Pages are included by default (set include_pages=false to skip). Users and groups default to off.
Inputs: query (required), limit, verbose, space_id, +3 more.
update_commentB
Replace a comment body. You can update your own comments.
Inputs: markdown (required), comment_id (required).
update_pageA
Update a page title, icon, and/or Markdown body (operation: replace default, append, prepend). For partial edits use edit_page.
Inputs: page_id (required), icon, title, verbose, +2 more.
update_spaceC
Update a space name, slug, or description.
Inputs: space_id (required), name, slug, description.
update_space_member_roleB
Change a space member or group's role.
Inputs: role (required), space_id (required), user_id, group_id.
upload_attachmentA
Upload a local file to a page. Returns attachment metadata including the /api/files/:id/:name URL path.
Inputs: page_id (required), file_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Most tools target a distinct resource+action, and close pairs like update_page vs edit_page, move_page vs move_page_to_space, and duplicate_page vs copy_page_to_space are explicitly clarified in their descriptions. A few boundaries (get_page_history vs get_history_version, search_pages vs search_suggest vs list_pages) still require reading descriptions carefully, but no true duplicates exist.
Nearly all tools follow a verb_noun snake_case pattern (create_page, list_spaces, delete_comment, export_space). Minor deviations exist in pluralization, e.g. create_comment vs get_comments, add_page_labels vs remove_page_label, which slightly weakens predictability.
42 tools is well beyond a comfortable surface for an agent, even for a full wiki platform. Many low-frequency operations (move_page_to_space, copy_page_to_space, search_suggest, get_history_version) inflate the set and increase selection cost.
Pages have full CRUD plus history, trash/restore, labels, comments, attachments, links, breadcrumbs, and export; spaces have CRUD plus member management. Gaps remain around attachment deletion/updating and inline/selection comments (explicitly unsupported), but core workflows are covered.
Maintenance
Related MCP Connectors
Hosted markdown project wikis your team's AI assistants read, search, and update over MCP.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
Shared project wiki for AI agents: read and write pages, next actions, and activity logs over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to self-hosted Docmost documentation through tools for listing spaces, searching content, and retrieving pages in Markdown format. It facilitates seamless documentation lookup and content retrieval within MCP-compatible clients.5MIT
- AlicenseAqualityDmaintenanceBuilt in rust, feature complete MCP server for self-hosted Docmost (Community Edition) — read & write your wiki from Claude, Cursor & VS2016MIT
- AlicenseNot gradedqualityDmaintenanceGives AI agents read/write access to a self-hosted Docmost wiki through its REST API.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to search, read, write, and organize pages, spaces, comments, attachments, labels, and member access in self-hosted Docmost Community Edition wikis via its internal HTTP API, using Markdown for page and comment bodies.41MIT