docmost-mcp-oss
This server exposes Docmost's workspace to AI assistants as MCP tools, letting them read, search, create, edit, and manage pages, spaces, and comments.
Explore the workspace:
get_workspace_overviewwalks every space and page, with activity summaries and recency rankings;list_spaces,get_space,list_child_pages,list_recent_pages, andsearch_pagesprovide targeted lookups.Read pages:
get_pagereturns metadata plus full content in Markdown or HTML, including breadcrumbs and version history.Create and edit pages:
create_pagecreates pages with content;update_page_contentreplaces, appends, or prepends page bodies via Yjs;update_pagerenames pages.Organize pages:
move_pagenests or reorders pages, anddelete_page/restore_pagemanage trash.Manage spaces: create spaces and fetch space details.
Handle comments: list, create (including replies), and update comments on pages.
User and workspace info: get the authenticated user and list workspace members.
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-mcp-oss search Docmost pages for 'Q3 planning' and summarize"
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-mcp-oss
An MCP server built with FastMCP that exposes the REST API of Docmost as tools for AI assistants (Claude Desktop, Claude Code, Cursor, VS Codeβ¦).
Managed with uv.
π Full API research:
docs/DOCMOST-API.md. Verified against a real Docmost instance (not just the documentation).
Why a custom MCP?
Docmost ships with an official MCP, but it requires a Business/Enterprise license and is enabled from Settings β AI settings β MCP. This project uses the internal API (the same one the web UI consumes), which is also available in the self-hosted OSS edition.
About the name: the -oss suffix distinguishes this package from the unrelated docmost-mcp already on PyPI. They are different projects by different authors, and they would collide if installed side by side (both used to ship the same import package). This one targets self-hosted Docmost and can edit page bodies; install it as docmost-mcp-oss.
Related MCP server: Docmost MCP Server
Exposed tools (21)
Category | Tools |
Pages |
|
Spaces |
|
Comments |
|
User |
|
Every tool declares the four MCP annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), so a client knows before calling whether it is about to read, write or delete.
Four things stand out:
get_workspace_overviewanswers "what is in my Docmost?" in a single call: every space and every page, walking the whole tree, plus who last touched each page and arecently_updatedranking so an agent knows what to read first. It also returns asummary: counts per space, tree shape, date ranges, recency buckets, pages never edited, top editors and orphaned pages. Theactivityargument trades cost for detail ("recent","full","none"), and the optionalcheck_emptymeasures page bodies to find the empty ones.get_pagereturns metadata and content in Markdown (it combines/pages/infowith/pages/export, because the former does not return the body).move_pagetakes a destination, not a position: nest it withparent_page_id, or sit it next to a sibling withafter/before. Docmost's position strings are generated for you.update_page_contentwrites the body of an existing page, with amodeof"replace","append"or"prepend". The REST API can't do this: it writes directly to the Yjs document over the collaboration WebSocket. Requires theyjsextra and takes ~13 s (Docmost persists with a 10 s debounce).
list_child_pageslists one level only (the direct children of a space or a page). Enumerating a space means walking its tree, which is whatget_workspace_overviewdoes for you.
Editing the body of an existing page
Docmost's REST API ignores the content field in /pages/create and /pages/update (they respond 200 but save nothing): the body lives in the Yjs collaboration server.
That's why there are two distinct paths:
Operation | How |
Read content |
|
Create page with content |
|
Replace the body of an existing page |
|
Rename |
|
Delete / restore / move | β |
update_page_content opens the wss://<host>/collab WebSocket, syncs the document, replaces the content and waits for it to persist. Markdown is converted using Docmost's own converter, so it supports the full schema (tables, lists, code, quotes, imagesβ¦).
uv sync --extra yjs # enables update_page_contentTechnical details of the protocol: docs/YJS-EDITING.md.
Installation
As a tool, from PyPI (no clone needed)
uvx docmost-mcp-oss # stdio, for MCP clients
uvx docmost-mcp-oss --check # verify the connection to your instanceAdd --with pycrdt --with websockets (or install docmost-mcp-oss[yjs]) to enable update_page_content, the tool that edits existing page bodies.
From source (for development)
uv creates the virtual environment and installs the dependencies (pinned in uv.lock):
uv syncNo need to activate the environment: use uv run β¦.
Configuration
cp .env.example .env # then edit the valuesDOCMOST_URL=https://docmost.example.com
# Option A β API Key
DOCMOST_API_KEY=dm_xxx
# Option B β login (works on OSS)
DOCMOST_EMAIL=you@example.com
DOCMOST_PASSWORD=your-passwordVerify the connection:
uv run docmost-mcp-oss --check
# -> OK: authenticated as you@example.com (https://docmost.example.com)Usage
stdio (recommended for local use)
uv run docmost-mcp-ossHTTP (for remote access)
uv run docmost-mcp-oss --http --port 8000
# MCP endpoint: http://127.0.0.1:8000/mcpConnecting to MCP clients
Every client below launches the same stdio command. The examples install from PyPI with uvx; to run from a clone instead, replace uvx docmost-mcp-oss with uv --directory /path/to/docmost-mcp-oss run docmost-mcp-oss.
To enable update_page_content (editing existing page bodies), use the yjs extra β replace docmost-mcp-oss with --from "docmost-mcp-oss[yjs]" docmost-mcp-oss, or see the note at the end of this section.
Claude Code
claude mcp add docmost \
-e DOCMOST_URL=https://docmost.example.com \
-e DOCMOST_EMAIL=you@example.com \
-e DOCMOST_PASSWORD=your-password \
-- uvx docmost-mcp-ossEquivalent JSON, in .mcp.json at the root of your project (or under mcpServers in ~/.claude.json for a user-wide server):
{
"mcpServers": {
"docmost": {
"type": "stdio",
"command": "uvx",
"args": ["docmost-mcp-oss"],
"env": {
"DOCMOST_URL": "https://docmost.example.com",
"DOCMOST_EMAIL": "you@example.com",
"DOCMOST_PASSWORD": "your-password"
}
}
}
}Codex
β οΈ Codex configures MCP servers in TOML, not JSON. Add this to ~/.codex/config.toml:
[mcp_servers.docmost]
command = "uvx"
args = ["docmost-mcp-oss"]
[mcp_servers.docmost.env]
DOCMOST_URL = "https://docmost.example.com"
DOCMOST_EMAIL = "you@example.com"
DOCMOST_PASSWORD = "your-password"Or let the CLI write it for you:
codex mcp add docmost \
--env DOCMOST_URL=https://docmost.example.com \
--env DOCMOST_EMAIL=you@example.com \
--env DOCMOST_PASSWORD=your-password \
-- uvx docmost-mcp-ossphoson-cli
phoson reads JSON from the file named by mcp_config_file in ~/.phoson/config.toml (defaults to ~/.phoson/mcps.json). Entries need an explicit "enabled": true:
{
"mcpServers": {
"docmost": {
"command": "uvx",
"args": ["docmost-mcp-oss"],
"env": {
"DOCMOST_URL": "https://docmost.example.com",
"DOCMOST_EMAIL": "you@example.com",
"DOCMOST_PASSWORD": "your-password"
},
"enabled": true
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"docmost": {
"command": "uvx",
"args": ["docmost-mcp-oss"],
"env": {
"DOCMOST_URL": "https://docmost.example.com",
"DOCMOST_EMAIL": "you@example.com",
"DOCMOST_PASSWORD": "your-password"
}
}
}
}Cursor (.cursor/mcp.json)
Same shape as Claude Desktop, inside the mcpServers key.
Enabling body editing
update_page_content needs the yjs extra, which is optional to keep the base install small. Point the client at the extra instead of the bare package:
Client | Launcher to use |
|
|
Any |
|
For example, in Claude Code:
claude mcp add docmost \
-e DOCMOST_URL=https://docmost.example.com \
-e DOCMOST_EMAIL=you@example.com \
-e DOCMOST_PASSWORD=your-password \
-- uvx --from "docmost-mcp-oss[yjs]" docmost-mcp-ossTests
Command | What it validates | Needs instance |
| Client against a mocked Docmost (12 cases) | No |
| MCP tool registry | No |
| Read-only against a real instance | Yes |
| Tools through the MCP layer | Yes |
| Body editing via Yjs (7 checks) | Yes |
| Lint | No |
The live tests read credentials from .docmost-creds.json (ignored by git):
{
"url": "https://docmost.example.com",
"email": "you@example.com",
"password": "your-password"
}--write adds a create β update β get β delete cycle over a test page (use --write keep to keep it).
Implementation notes
Things that are not obvious and that the client already handles:
All endpoints are
POSTand respond with{data, success, status}; the client unwrapsdata.Content does not come from
/pages/info: it is fetched via/pages/export(markdown|html), which responds with the raw file, no wrapper.Only
/pages/importpersists content over REST;/pages/createand/pages/updateignorecontent. To edit the body of an already-created page you must write to the Yjs document (see above).Authentication: both real variants are supported β the
authTokencookie (httpOnly) anddata.tokens.accessTokenforwarded asBearer./searchrequiresqueryandspaceId; if you don't provide a space, it fans out across all accessible spaces and merges byrank./pages/sidebar-pagesrequiresspaceId; if you only provide a page, its space is resolved first.Lexical search (PostgreSQL FTS): stopwords ("a", "de", "the") return 0 results.
Heterogeneous response shapes: some builds return
{items, meta}and others raw lists; the client normalizes both.Permissions: the MCP acts as the authenticated user; it can never do more than the user can.
Structure
docmost-mcp-oss/
βββ docmost_mcp_oss/
β βββ __init__.py
β βββ client.py # async HTTP client for the Docmost REST API
β βββ collab.py # Yjs WebSocket: read/write page bodies
β βββ position.py # fractional indexing within Docmost's 5-12 chars
β βββ server.py # FastMCP server + tools
βββ docs/
β βββ DOCMOST-API.md # API research (OSS + real instance)
β βββ YJS-EDITING.md # collaboration WebSocket protocol
βββ tests/
β βββ test_client.py # mocked, no network
β βββ test_tools.py # MCP tool registry, no network
β βββ smoke_live.py # real instance, read-only
β βββ smoke_mcp_live.py # MCP layer against a real instance
β βββ smoke_yjs_live.py # body editing via Yjs
βββ .github/workflows/
β βββ ci.yml # lint, tests and packaging
β βββ release.yml # tag -> build -> PyPI -> GitHub Release
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ LICENSE # MIT
βββ pyproject.toml # metadata, dependencies and ruff config
βββ uv.lock # reproducible resolution (it is versioned)
βββ .env.exampleLicense
MIT Β© 2026 Abel Santillan Rodriguez
Available Tools
21 toolscreate_commentCreate CommentB
Adds a comment to a page.
Inputs: content (required), page_id (required), parent_comment_id. Returns: object
create_pageCreate PageA
Creates a new page in a space, with or without content.
If you provide content, the page is uploaded through the import endpoint
(/pages/import), which is the only REST way that persists the page body
in Docmost. The title is taken from the first heading; if you also provide
title, that one is used.
Inputs: space_id (required), title, format, content, +1 more. Returns: object
create_spaceCreate SpaceB
Creates a new space.
Inputs: name (required), slug, description. Returns: object
delete_pageDelete PageA
Moves a page to the trash (recoverable with restore_page).
Inputs: page_id (required). Returns: object
get_commentsGet CommentsA
Gets the comments of a page.
Inputs: page_id (required), limit. Returns: result
get_current_userGet Current UserA
Returns the authenticated user and workspace information.
Inputs: no named parameters. Returns: object
get_pageGet PageA
Fetches a page: metadata and content.
Returns the page's metadata plus the content field with the full text.
Internally it combines /pages/info with /pages/export.
Inputs: page_id (required), format. Returns: object
get_page_breadcrumbsGet Page BreadcrumbsA
Returns the ancestor path (breadcrumbs) of a page.
Inputs: page_id (required). Returns: result
get_page_historyGet Page HistoryC
Lists the version history of a page.
Inputs: page_id (required). Returns: result
get_spaceGet SpaceC
Gets the details of a space.
Inputs: space_id (required). Returns: object
get_workspace_overviewGet Workspace OverviewA
Start here. Lists everything in the workspace: every space and every page.
Use this to answer questions like "what do I have in Docmost?", to take an
inventory, or to find a page by title before reading it with get_page.
Unlike list_child_pages, it walks the whole page tree, so nested pages are
included.
Each page carries id, slug_id, title, parent_page_id and depth,
which is enough to rebuild the tree or to list everything flat.
With an activity level above "none" each page also carries updated_at
and updated_by, and the result includes recently_updated: the most
recently touched pages, newest first. Use it to decide what is worth reading
first instead of walking the inventory blindly.
It also returns a summary with counts per space, tree shape (roots,
containers, leaves, max depth), date ranges and recency buckets, pages never
edited after creation, top editors and any orphaned pages. Every figure comes
from data already gathered, so it costs nothing extra; summary.date_coverage
states how much of the workspace the date-based numbers actually cover.
Inputs: activity, space_id, max_pages, check_empty. Returns: object
list_child_pagesList Child PagesA
Lists only the direct children of a space or a page.
This is one level, not the whole tree. To enumerate everything in the
workspace, use get_workspace_overview instead.
Inputs: limit, page_id, space_id. Returns: object
list_recent_pagesList Recent PagesB
Lists recently updated pages.
Inputs: limit, space_id. Returns: result
list_spacesList SpacesB
Lists the spaces the user has access to.
Inputs: limit. Returns: result
list_workspace_membersList Workspace MembersB
Lists the members of the workspace.
Inputs: limit. Returns: result
move_pageMove PageA
Moves or reorders a page. Say where it should go; the position is computed.
Three ways to place a page, in order of preference:
Nest it: pass
parent_page_idand the page becomes a child of that page (appended at the end of its children by default).Reorder it: pass
afterorbeforewith the id of a sibling to sit next to.Neither: the page is appended at the end of its current parent.
You never have to invent a position. Docmost orders pages with fractional indexing β a base62 string it compares lexicographically, which must be 5-12 characters β and that is fiddly to get right by hand. This tool reads the neighbouring positions and generates a valid one in between.
Inputs: page_id (required), after, before, parent_page_id. Returns: object
restore_pageRestore PageA
Restores a page that is in the trash.
Inputs: page_id (required). Returns: object
search_pagesSearch PagesA
Searches pages by keyword (full-text search).
It is a lexical search (PostgreSQL FTS): use meaningful words. Empty-meaning terms ("a", "de", "the") are stopwords and return no results.
Inputs: query (required), limit, space_id. Returns: object
update_commentUpdate CommentB
Updates the content of a comment.
Inputs: content (required), comment_id (required). Returns: object
update_pageUpdate PageA
Renames a page.
To change the content, use update_page_content.
Inputs: page_id (required), title. Returns: object
update_page_contentUpdate Page ContentA
Writes into the body of an already-created page.
Docmost's REST API cannot do this β the body lives in the Yjs collaboration server β so this tool opens the collaboration WebSocket, edits the document and waits for it to be persisted (~13 s).
Unlike /pages/update, which accepts an operation field and ignores it,
mode genuinely works here:
"replace"(default): the page ends up with exactly this Markdown."append": keeps what is there and adds this at the end."prepend": keeps what is there and adds this at the start.
The Markdown is converted with Docmost's own converter, so it supports its whole schema: headings, bold, italics, code, lists, tables, blockquotes, code blocks, etc.
Requires the yjs extra (uv sync --extra yjs).
Inputs: page_id (required), markdown (required), mode. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 21 tools
Each tool targets a distinct resource and action: pages (get/create/update/delete/restore/move/history/breadcrumbs), spaces (list/get/create), comments (get/create/update), and workspace overviews. The only potential overlap between update_page and update_page_content is clearly resolved by descriptions stating one renames and the other edits content. No tools appear to do the same thing.
All 21 tools follow a consistent verb_noun pattern in snake_case: get_page, create_comment, list_spaces, update_page_content, delete_page, restore_page, move_page, etc. Verbs like get/list/create/update/delete/restore/move are used predictably, and even compound nouns like workspace_overview and child_pages maintain the pattern. No mixing of conventions.
21 tools is slightly above the typical 3-15 ideal range, but the server covers a broad domain (spaces, pages, comments, workspace info) and each tool has a clear role. While a few could be merged (e.g., get_workspace_overview could subsume list_child_pages), the count is not excessive and fits the scope of a wiki/documentation server.
The tool surface covers the full lifecycle for pages (create, get, update content, rename, delete, restore, move, history), spaces (create, list, get), and comments (create, get, update), plus search, breadcrumbs, recent pages, and workspace overview. Missing operations like comment deletion or space updates are minor and can be worked around. Overall, it covers the core domain without dead ends.
Maintenance
Related MCP Connectors
Find, write, publish and check pages and API references in your DeveloperHub docs from an AI client
Persistent docs and memory for AI agents β read, write, organize & search a shared workspace.
Create interactive lessons, training guides, client plans, and feedback forms with your AI assistant. Search and update Docmino documents, organize projects, and publish guides you can share through one live link. Connect your Docmino account with OAuth.
Docs, tables, issues, projects, calendar and designs of an Airsurf workspace: search, read, write.
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
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search, create, modify, and organize documentation pages and spaces in Docmost.34MIT
- AlicenseNot gradedqualityDmaintenanceGives AI agents read/write access to a self-hosted Docmost wiki through its REST API.MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to search, read, write, and organize content in self-hosted Docmost Community Edition wikis through MCP clients like Cursor and Claude.42191 npm4MIT