
Docmost (self-hosted)
io.github.bbik52由 GitHub 账号 bbik52 发布v1.2.3更新于 Oct 29, 2026
Self-hosted remote MCP server for Docmost CE: members read and edit the wiki as themselves
概览
自托管的远程 MCP 服务器,让团队的 AI 助手以每位成员自己的 Docmost CE 账号和权限读取、搜索并编辑 wiki。
- 可以做什么
- 读取与浏览空间和页面:页面树、最近更新、大纲、单个章节、Markdown 或 ProseMirror 正文、评论与页面历史。
- 搜索 wiki:全文搜索、按标题、标签或自己的页面筛选,并快速查找页面、人员和群组。
- 写入页面:新建、追加、前置、替换正文或单个章节,重命名、移动、复制,以及恢复历史版本或快照。
- 管理标签、反向链接、带 @ 提及的评论、附件与导出,并检查空间健康状况、执行工作区管理(空间、群组、邀请、角色)。
- 提供资源和提示词,例如页面摘要、仅依据 wiki 的回答、近期变更,以及起草或整理页面的请求。
- 适用场景
- 适合团队把文档放在自托管的 Docmost Community Edition wiki 中,并希望 Claude、Cursor、VS Code 等客户端据此回答问题、编辑页面,同时保留每位成员自己的权限和审计记录,而不是共用一个账号。
- 运行要求
- 以容器(Docker Compose)或通过 PyPI 的 uvx/pip 运行,需与可从服务器访问的 Docmost CE 0.80.1 或更新版本配合。需要 Postgres 数据库和必填设置 PUBLIC_URL、DOCMOST_URL、DATABASE_URL、SECRET_KEY,并在 8000 端口前放置 https 反向代理。成员用 Docmost 邮箱和密码登录;仅支持 SSO 的账号无法使用。
安装
在 SourceWeft 中
- 打开 控制台中的 Docmost (self-hosted),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
来源:README.md,提交 a5e3624
工具
0版本历史
4- v1.2.3最新Oct 29, 2026
- v1.1.0Oct 26, 2026
- v1.0.2Oct 25, 2026
- v1.0.1Oct 25, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分