Are you the author? Sign in to claim
MCP server for self-hosted Docmost (Community Edition) — read & write your wiki from Claude, Cursor & VS Code
MCP server for Docmost that is built for self-hosted instances, especially deployments that do not have an enterprise license but still want reliable MCP access from local IDEs and AI tools.
The package is launched with npx, while the actual server is a Rust binary downloaded from GitHub Releases during install. That binary handles stdio MCP traffic, local authentication UX, session storage, and Docmost API access.
The main reason this project exists: bring MCP access to self-hosted Docmost setups without making an enterprise license a prerequisite.
Many MCP integrations are designed around hosted or enterprise assumptions. This project is intentionally optimized for self-hosted Docmost:
npx entrypoint for easy IDE integrationIf you run your own Docmost and want it available inside Cursor, Claude Desktop, or another MCP client, this package is the straightforward path.
list_spaces: list available Docmost spacesget_space: fetch details for a specific spacesearch_docs: search documentation, optionally scoped to a spacesearch_pages: backward-compatible alias for search_docsget_page: fetch a page and return its content as Markdownlist_pages: list recent pages in a spacelist_child_pages: list child pages for a parent page IDget_comments: list comments for a pagelist_workspace_members: list workspace membersget_current_user: fetch the authenticated user and workspace contextcreate_page: create a new page in a space from Markdown contentupdate_page: update an existing page's title and/or Markdown contentduplicate_page: duplicate a page (and its sub-pages) within its spacecopy_page_to_space: copy a page (and its sub-pages) into a different spacemove_page: move a page under a new parent page, or to the space rootmove_page_to_space: move a page (and its sub-pages) to a different spacecreate_space: create a new space with a name and URL slugupdate_space: update a space's name, slug, and/or descriptioncreate_comment: add a page-level comment to a page from Markdownupdate_comment: replace an existing comment's body with new MarkdownAll planned read and write tools are now implemented. create_comment adds
page-level comments; comments anchored to a specific text selection (inline
comments) require the collaborative editor's cursor positions and are out of
scope for this REST-based server.
Targets Docmost from roughly the last year of releases (v0.22+); older
servers work best-effort. The server detects the Docmost version (via
POST /api/version) once per session and adapts where behaviour differs:
update_page can only change an existing page's body
on Docmost v0.70.0+. On older servers the body lives in the collaborative
editor and a REST body update is ignored — update_page says so explicitly and
suggests create_page (which persists bodies on every version via the import
endpoint). Title updates work everywhere.Page and comment bodies are written in Markdown (headings, bold/italic/strike, inline code, links, lists, task lists, blockquotes, code blocks; pages also support tables and external-URL images). Comments support a smaller set — no tables, task lists, or images.
Mentions (@tagging): in any Markdown body, a link with a user: or page:
URL becomes a mention — [Display Name](user:USER_UUID) tags a user (find the
UUID with list_workspace_members) and [Page Title](page:PAGE_UUID) links a
page. Tagged users are notified by Docmost.
Attaching uploaded files/images (as opposed to referencing an image URL) is not supported.
npxRun the server directly with npx:
npx -y @wisflux/docmost-local-mcp --base-url=https://docs.example.com
You can also provide the base URL with an environment variable:
DOCMOST_BASE_URL=https://docs.example.com npx -y @wisflux/docmost-local-mcp
Most MCP clients launch the server directly with npx. Add this to your client's MCP config, replacing the base URL with your own Docmost instance:
{
"mcpServers": {
"docmost": {
"command": "npx",
"args": ["-y", "@wisflux/docmost-local-mcp", "--base-url=https://docs.example.com"]
}
}
}
Where that config lives, per client:
Claude Desktop — claude_desktop_config.json (Settings → Developer → Edit Config)
Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project)
Claude Code — one command, no file editing:
claude mcp add docmost -- npx -y @wisflux/docmost-local-mcp --base-url=https://docs.example.com
VS Code (GitHub Copilot) — .vscode/mcp.json, using a top-level servers key instead of mcpServers:
{
"servers": {
"docmost": {
"command": "npx",
"args": ["-y", "@wisflux/docmost-local-mcp", "--base-url=https://docs.example.com"]
}
}
}
This setup works well when you want a fixed Docmost instance per client configuration. If --base-url or DOCMOST_BASE_URL is set, the login page shows that URL prefilled and locks the field. If no base URL is configured, the login flow asks for it during interactive sign-in.
Once connected, ask your AI client things like:
127.0.0.1.--base-url or DOCMOST_BASE_URL is set, the Docmost URL is prefilled and locked./api/auth/login, extracts the authToken cookie, stores the session, and optionally stores credentials for automatic re-login.The server stores local state in:
~/.docmost-local-mcp/
Files used there:
config.json: last base URL and emailsession.json: saved auth token and expiryCredentials are stored in the OS keychain when available, which is the preferred path on supported platforms.
If secure OS credential storage is unavailable, the server falls back to encrypted local credential storage so it can still support login reuse without writing plain-text credentials. That fallback is intentionally secondary to keychain-backed storage.
The native auth window uses the system webview on each platform:
WKWebViewWebView2WebKitGTKImportant caveats:
native-webview feature, browser fallback is always usedlist_spacesReturns Docmost space names, slugs, and IDs.
search_docsInputs:
query: required search textspace_id: optional Docmost space IDsearch_pagesInputs:
query: required search textspace_id: optional Docmost space IDThis is a backward-compatible alias for page search. search_docs remains available.
get_spaceInputs:
space_id: required Docmost space IDget_pageInputs:
slug_id: the page slug ID returned by search_docslist_pagesInputs:
space_id: required Docmost space IDlimit: optional page count limitcursor: optional pagination cursorlist_child_pagesInputs:
page_id: required parent page IDlimit: optional page count limitcursor: optional pagination cursorget_commentsInputs:
page_id: required page IDlimit: optional comment count limitcursor: optional pagination cursorlist_workspace_membersInputs:
limit: optional member count limitcursor: optional pagination cursorquery: optional member search textadmin_view: optional admin visibility flagget_current_userInputs:
create_pageInputs:
space_id: required Docmost space ID (UUID) to create the page intitle: required page titlemarkdown: optional page body as Markdownparent_page_id: optional parent page ID to nest under (title-only pages only)When markdown is provided, the page body is sent through Docmost's import endpoint
(POST /api/pages/import), which is the only mechanism that reliably persists page body
content across Docmost versions (including older self-hosted servers). Pages created with
a body land at the space root — parent_page_id is honored only for title-only pages.
update_pageInputs:
page_id: required Docmost page ID or slug IDtitle: optional new title (omit to leave unchanged)markdown: optional new body as Markdown; replaces the existing content (omit to leave unchanged)Updating a page title works on all Docmost versions. Updating an existing page's
body via REST works only on newer Docmost; on older self-hosted servers (e.g. v0.25.x)
the body is edited solely through the collaborative editor and a REST body update is not
applied. To set body content reliably there, create a new page with create_page instead.
For the full design, Markdown→ProseMirror conversion details, verified Docmost API fields, and version caveats, see docs/write-tools.md.
For maintainer and contributor workflow details, see CONTRIBUTING.md.
MIT
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows