
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 分