
Docmost (self-hosted)
io.github.bbik52Published by GitHub account bbik52v1.2.3Updated Oct 29, 2026
Self-hosted remote MCP server for Docmost CE: members read and edit the wiki as themselves
Overview
Self-hosted remote MCP server that lets a team's AI assistants read, search and edit a Docmost CE wiki, each member acting with their own account and rights.
- What you can do
- Read and browse spaces and pages: page trees, recent pages, outlines, single sections, Markdown or ProseMirror bodies, comments and page history.
- Search the wiki by full text, title, labels or own pages, and look up pages, people and groups.
- Write pages: create, append, prepend, replace bodies or single sections, rename, move, duplicate, and restore versions or snapshots.
- Manage labels, backlinks, comments with @-mentions, attachments and exports, plus space health checks and workspace administration (spaces, groups, invitations, roles).
- Offer resources and prompts such as page summaries, wiki-only answers, what's new and draft or tidy page requests.
- When to use it
- Useful when a team keeps documentation in a self-hosted Docmost Community Edition wiki and wants Claude, Cursor, VS Code or similar clients to answer from it and edit it, with each member's own permissions and an audit trail instead of one shared account.
- Requirements
- Runs as a container (Docker Compose) or from PyPI with uvx/pip, next to a Docmost CE 0.80.1 or newer reachable from the server. Needs a Postgres database and the required settings PUBLIC_URL, DOCMOST_URL, DATABASE_URL and SECRET_KEY, plus an https reverse proxy in front of port 8000. Members sign in with their Docmost email and password; SSO-only accounts cannot be used.
Installation
In SourceWeft
- Open Docmost (self-hosted) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
docmost-mcp-remote
Let your team's AI assistants read and edit your Docmost wiki, each member as themselves.
A self-hosted remote MCP server for Docmost Community Edition.
[CI] [PyPI] [Python] [Container] [Docmost] [MCP Registry] [License] [GitHub stars]
English · Русский
Highlights · Comparison · Quick start · Connect a client · Tools · Security · Configuration · Feedback
Run it next to your Docmost, put it behind your domain, and connect Claude, Claude Code, Cursor, VS Code or any other MCP client. Every member signs in with their own Docmost account, so the assistant sees exactly what they can see and every change in Docmost carries their name.
Independent community project, not affiliated with or endorsed by Docmost, Inc. Docmost is a trademark of Docmost, Inc.; the name is used only to say which software this server works with.
✨ Highlights
- 👥 One server for the whole team. Each member signs in once in the browser with their own Docmost account. Everything their AI client does is done as them, with their Docmost rights.
- 🔐 Real authorization. OAuth 2.1 for remote connectors (Claude.ai, Claude Desktop, Claude Code, Cursor, VS Code) and personal tokens for scripts. There is no unauthenticated mode.
- 🛡️ Safe by default. Only
readis granted without asking;write,deleteandadminare opt-in per client. Nothing is deleted permanently, risky changes ask you first, and an encrypted snapshot of a page is saved before every change. - 🧰 62 tools. Read, search, write by section, comment with @-mentions, move, label, export, restore old versions, check a space's health and run the workspace: spaces, groups, invitations and roles.
- 📎 Files without burning tokens. The assistant gives you an upload link: drop files in the browser, put them in order, and they land in the right place of the page.
- 🐳 Easy to host. One container plus Postgres with a ready
compose.yaml, orpip install. Tested in CI against Docmost 0.80.1 to 0.97.
⭐ If this server is useful to you, please star the repository. It helps other Docmost users find it and tells us the work is worth continuing.
🆚 How it compares
There are several open-source MCP servers for Docmost Community Edition. Most of them run on one person's machine with one shared Docmost account. This one is built to be shared by a team.
Based on the public Docmost CE MCP servers we could find in October 2026. They are good choices for a single person working locally over stdio, and some offer things this server does not, such as permanent deletion.
🧭 How it works
The first time a client connects, the member signs in with their Docmost email and password and picks what the client may do. They can see and revoke every connected app and token on their account page.
🚀 Quick start
You need Docker with Compose, a Docmost reachable from the server, and a host
name with https for the server itself, for example mcp.example.com.
-
Download the compose file and the settings template:
-
Edit
.env: setPUBLIC_URL(the https URL of this server),DOCMOST_URL, a long randomPOSTGRES_PASSWORDandSECRET_KEY(openssl rand -hex 32gives a good value for both). ConsiderALLOWED_EMAILSto limit who can sign in. -
Start it and check that it is up:
-
Put a reverse proxy with https in front of
127.0.0.1:8000(see Reverse proxy) and openPUBLIC_URL/loginin a browser to check that you can sign in with your Docmost account. -
Connect a client (see Connecting a client).
The server applies its database migrations at startup. Back up the Postgres
volume like you back up Docmost: it holds the encrypted sessions, the
snapshots and the audit log. Losing SECRET_KEY signs every member out and
makes the snapshots unreadable.
The compose.yaml
The server is also on PyPI (pip install docmost-mcp-remote or
uvx docmost-mcp-remote) for setups without containers; it needs Postgres
and the same settings as environment variables.
Reverse proxy
The server listens on plain http and expects a reverse proxy that terminates https. Serve it at the root of its own host name; a sub-path is not supported. The proxy must not buffer responses, because MCP streams them.
Caddy (gets certificates by itself):
nginx
The server uses X-Forwarded-For for its per-IP rate limits. The proxy must
set the header to the address it sees, not pass on what the client sent: the
nginx example above does that with $remote_addr, and Caddy and Traefik do it
by default. The compose file trusts proxies on loopback and private networks
(FORWARDED_ALLOW_IPS); if your proxy reaches the server from a public
address, set it to that address.
🔌 Connecting a client
The MCP endpoint is PUBLIC_URL/mcp, for example
https://mcp.example.com/mcp. Clients that support MCP authorization open a
browser window: sign in with your Docmost email and password and choose what
the client may do. read is always granted; tick write, delete or
admin only for clients you trust.
Give clients the full endpoint, ending in /mcp. The server's base URL alone
is refused with invalid_target. After "Allow" a page sends you back to the
app; if the browser asks whether to open a desktop app such as Cursor, allow
it, or use the link on the page.
Claude.ai and Claude Desktop
Settings, Connectors, Add custom connector, then enter the endpoint URL. The server must be reachable from the internet over https for Claude.ai.
Claude Code
Then run /mcp in Claude Code to sign in.
Cursor
~/.cursor/mcp.json:
VS Code
.vscode/mcp.json:
Scripts and clients without OAuth (personal token)
-
Open
PUBLIC_URL/loginand sign in with your Docmost email and password. -
On the account page, create a personal token with the scopes you need. It expires after 90 days unless you pick another lifetime (7 days to a year, or never).
-
Configure the client with the endpoint and the header
Authorization: Bearer <token>:
Connected apps and tokens are listed and revoked on the account page,
PUBLIC_URL/account.
🧰 Tools
62 tools in groups. The scope is what a client needs to be granted to see the
tool: read is always granted, the others are opt-in.
Account and spaces
Browsing and reading pages
Search
Writing pages
Comments
History, snapshots and restore
Labels and links
Files and export
Trash
People and groups
Space administration
Workspace administration
People cannot be removed from the workspace or from groups, and groups cannot be deleted. Docmost has no way to create an account or edit someone else's profile: people join through an invitation and set their own password.
🛡️ Safety nets
- Snapshots. Before every body change the server saves the current body
as a snapshot in its own database, encrypted, for
SNAPSHOT_RETENTION_DAYS; if the snapshot cannot be saved, nothing is written. Snapshots can hold content of pages that were later deleted in Docmost until they expire. - Read-back. After a change the server reads the page back and reports an
error if Docmost did not apply it (this happens when Docmost runs with
COLLAB_DISABLE_REDIS). - Confirmation. Risky changes ask you first, in your client, where the client supports it (MCP elicitation): moving a page to the Trash, moving or copying a page to another space, giving people or groups a role in a space, inviting people, changing a workspace role and deactivating someone. The question goes to you, not to the model, so text in a page cannot answer it. If the client says it can ask but the question fails, nothing changes. Clients that cannot ask make these changes without the question, within the scopes you granted.
- Busy pages. A change that rewrites the whole body (a replace, a section, a JSON write, a restore) is refused while someone else is editing the page, that is when another person saved it in the last minute, because their typing would be lost. Appending and prepending merge with their edits and are not refused.
- Untrusted content. Page bodies, comments and snippets are returned
inside a
<docmost-untrusted-content>envelope so the model treats them as data.
📎 Adding files
Passing a file to the model costs tokens: as base64, about a million per
megabyte. So create_upload_link gives a one-time link to a page instead.
The person opens it, drops in one or more files (or picks them), puts them in
order and presses Done; the files appear in the page at the end, at the end
of a section (after_heading) or after a paragraph (after_text). An
assistant that can run commands sends files it has with curl to the same
link. Until Done the files are kept on this server, encrypted; the link works
for UPLOAD_RETENTION_MINUTES and whatever was not added by then is deleted.
upload_attachment takes the same place parameters.
💬 Resources and prompts
Besides tools, which the model picks itself, the server offers resources and prompts that you pick in your client, where the client supports them (Claude Desktop and Claude Code do; many clients only support tools).
A prompt only writes the request; the model does the work with the tools the
connection is allowed to use. Resource reads count against
TOOL_CALLS_PER_MINUTE and go to the audit log as read_resource.
📦 Supported Docmost versions
Docmost Community Edition 0.80.1 or newer. Older versions are refused at
sign-in and on every tool call: they have published security advisories that
the endpoints this server calls expose (CVE-2026-34212, fixed in 0.71.0, and
CVE-2026-48073, fixed in 0.80.1). CI runs the integration tests against
Docmost 0.80.1, 0.96.0 and 0.97.0; newer releases work in most cases and log a warning until they are
added to the tested range. Docmost users who sign in with SSO only (an
Enterprise feature) cannot use this server: it signs in with email and
password. Labels and backlinks need Docmost 0.90 or newer, and the
title_only and labels search filters and list_attachments need 0.96 or
newer; on older versions these tools answer that Docmost needs an upgrade.
🔐 Security model
Members sign in with their own Docmost account; everything a client does is
done as that member, with their Docmost rights. The server keeps the Docmost
session token encrypted with a key derived from SECRET_KEY and does not
store passwords unless RELOGIN_MODE=stored_password. Personal tokens are
stored as hashes, shown once and expire after 90 days by default. The
sign-in page has CSRF protection and per-IP and per-email rate limits, and
"Sign out everywhere" on the account page ends its sessions in every
browser.
The server is its own OAuth 2.1 authorization server, following the MCP
authorization spec: dynamic client registration (limited per IP, redirect
URIs must be https, loopback http or a native app scheme), authorization
code with PKCE (S256 only), exact redirect URI match, tokens bound to this
server's /mcp resource, one-hour access tokens and 30-day refresh tokens
that rotate on every use. A reused refresh token or a replayed code revokes
the whole grant. OAuth grants and personal tokens are listed and revoked on
the same account page.
Page content is treated as untrusted data and labelled as such for the model;
titles and names, which are returned as plain fields, lose hidden and control
characters and are cut at 300 characters.
Prompt injection in a page can still make a client act within the scopes the
member granted, so grant write, delete and admin only to clients you trust.
Tool calls and resource reads are limited per member and recorded in an
audit log.
Exports of several pages and file downloads are handed out as links to this server that are valid for ten minutes. A link carries, encrypted, who asked and what to download, so anyone holding it can download the file until it expires; the server streams the file from Docmost with that member's session and stores nothing. Links are kept out of the access log.
See the threat model, SECURITY.md for how to report a vulnerability and the design.
🛠️ Administration
The admin command runs where the server runs, with the same environment:
revoke-member revokes every grant of the member and drops their stored
Docmost session; disable-member blocks them until enable-member. Every
tool call and resource read is recorded in the audit log with the tool, the page or space id
and the outcome, never with content or arguments.
To rotate SECRET_KEY: set the old value as SECRET_KEY_PREVIOUS and a new
SECRET_KEY, restart, run admin rotate-key, then remove
SECRET_KEY_PREVIOUS and restart again.
⬆️ Upgrading
-
Read the changelog for "Upgrade notes".
-
Back up the database:
-
Pull the new image and restart:
The server upgrades its database schema at startup, in one transaction and
one process at a time, so a failed upgrade leaves the old schema in place.
docker compose exec server docmost-mcp-remote admin migrate shows the
schema revision.
The image tag 1 follows 1.x releases; set IMAGE_TAG in .env to pin a
version. Going back to an older version after its schema was upgraded is not
supported: an older server refuses to start on a newer schema. To roll back,
restore the backup with the old image:
⚙️ Configuration
🧑💻 Development
Tests that need Postgres are skipped without DATABASE_TEST_URL; for example
docker run -d -p 5433:5432 -e POSTGRES_USER=test -e POSTGRES_PASSWORD=test postgres:17-alpine.
Integration tests run against a real Docmost:
To run the compose stack with a local build:
docmost-mcp-remote --tool-catalog serves the tools, resources and prompts
over stdio without Docmost, a database or any configuration, and refuses
every call. MCP directories use it to list what the server offers, for
example docker run -i --rm ghcr.io/bbik52/docmost-mcp-remote --tool-catalog.
See CONTRIBUTING.md and the roadmap.
🙌 Feedback and support
⭐ Like it? Star the repository. Stars help other Docmost teams find the server and keep the project going.
Issues are not only for bugs. Ask for a new tool or feature, tell us what is awkward in your workflow, or ask a question: every request is read. For a security problem, follow SECURITY.md instead of opening an issue.
📄 License
Apache License 2.0. The license does not cover the project name: forks are welcome under another name. This project is an independent implementation and is not affiliated with Docmost. It was inspired by docmost-mcp-oss.
Source: README.md at commit a5e3624
Tools
0Version history
4- v1.2.3LatestOct 29, 2026
- v1.1.0Oct 26, 2026
- v1.0.2Oct 25, 2026
- v1.0.1Oct 25, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts