docmost-mcp
docmost-mcp
自己ホスト型の Docmost ウィキに、通常の REST API 経由で AI エージェントに読み書きアクセスを提供する MCP サーバー。
存在理由
Docmost には独自の MCP エンドポイントが同梱されていますが、有料ライセンスの後ろにゲートされています。設定 UI では API 管理について "Available with a paid license" と表示され、Community Edition では /api/mcp は 404 を返します。API キーの発行も同様にゲートされています。
ただし、通常の REST API は Community Edition で完全に利用可能です。このサーバーはその REST API の薄いラッパーであり、同じ操作を API キーではなくセッション認証で実行します。
Related MCP server: MediaWiki MCP Server
要件
Python 3.11+
HTTP(S) 経由で到達可能な Docmost インスタンス
エージェント専用の Docmost ユーザーアカウント
インストール
git clone https://github.com/<you>/docmost-mcp.git
cd docmost-mcp
python3 -m venv venv
./venv/bin/pip install -r requirements.txt設定
サンプル設定をコピーして記入してください:
cp config.example.json config.json
chmod 600 config.json{
"url": "https://docmost.example.com",
"api_key": "",
"email": "agent@example.com",
"password": "..."
}2 つの認証モードがサポートされています:
モード | 使用する場面 |
| Docmost Enterprise ライセンスをお持ちの場合。Bearer トークンとして送信されます。 |
| Community Edition の場合。サーバーがログインし、セッションの有効期限が切れると自動的に再認証します。 |
api_key が設定されている場合はそれが優先され、それ以外の場合は資格情報が使用されます。
設定パスは DOCMOST_MCP_CONFIG 環境変数で上書きできます。
専用アカウントを作成する
ワークスペース所有者の資格情報を使用しないでください。別のユーザーを招待し (Settings → Members → Invite)、エージェントが必要とするスペースにのみアクセスを許可してください。Docmost のスペースへのアクセスは通常、デフォルトの Everyone グループから継承されるため、エージェントが制限されていると想定する前に、そのグループがアクセスできる範囲を確認してください。
2 つ目のメールボックスを作成したくない場合は、Gmail 形式のプラスアドレス (you+agent@gmail.com) を使用できます。
動作確認
selftest.py はチェーン全体 (ログイン、読み取り、書き込み、読み返し、削除) を実行します:
./venv/bin/python selftest.pyエージェントの接続
サーバーは stdio 上で MCP を通信します。
Claude Code
claude mcp add docmost -- /path/to/docmost-mcp/venv/bin/python /path/to/docmost-mcp/server.pyまたは手動で ~/.claude.json に追加します:
{
"mcpServers": {
"docmost": {
"type": "stdio",
"command": "/path/to/docmost-mcp/venv/bin/python",
"args": ["/path/to/docmost-mcp/server.py"],
"env": {}
}
}
}その後 Claude Code を再起動してください。設定は起動時に読み込まれます。
Claude Desktop
同じブロックを claude_desktop_config.json に追加します:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
プロジェクト内の .cursor/mcp.json またはグローバルの ~/.cursor/mcp.json に、同じ mcpServers の形式で追加します。
その他の MCP クライアント
virtualenv の Python で server.py を起動し、stdin と stdout で JSON-RPC を送受信します。最小限のハンドシェイク:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}便利なラッパーを使うとコマンドを短くできます:
#!/bin/sh
exec /path/to/docmost-mcp/venv/bin/python /path/to/docmost-mcp/server.py "$@"ツール
ツール | 引数 | 動作 |
|
| ワークスペースのスペースを一覧表示します |
|
| ページ全体を全文検索します |
|
| ID または slugId でページを取得します |
|
| 最近変更されたページを取得します |
|
| ページを作成します |
|
| タイトルや本文を更新します |
|
| ページの親を変更します |
|
| ページをゴミ箱に入れます (または完全に削除します) |
fmt は markdown (デフォルト)、html、json のいずれかです。
Docmost API の注意点
このサーバーを拡張する場合に知っておくと役立つこと:
読み取りを含むすべてのエンドポイントが
POSTです。/pages/createと/pages/updateはformatフィールド (json|markdown|html) が 必須 です。省略すると400が返ります。レスポンスはペイロードを
{"data": ...}でラップします。クライアント側でそれをアンラップします。Community Edition では
/api/api-keysは空のリストで200を返します。一覧表示は開放されており、キーの 作成 のみがライセンスで制限されています。エンドポイントのパスとペイロードの構造は、推測ではなく Docmost クライアントのソース (
apps/client/src/features/*/services/*.ts) から取得したものです。
セキュリティ
config.jsonには平文のパスワードが含まれます。パーミッションを600に保ち、バージョン管理の対象外にしてください。.gitignoreに含まれています。エージェントアカウントには、作業に必要な最小限のスペースアクセスのみを付与してください。
アカウントの操作は Docmost 上でそのアカウントの名前で表示されるため、ページ履歴は誰の操作か追跡可能です。
互換性
Docmost 0.95.0 と Python MCP SDK 2.0 を対象に構築されています。SDK 2.0 では FastMCP が MCPServer に名前変更され、mcp.server に移動したことに注意してください。2.0 より前のインポートパス mcp.server.fastmcp は機能しません。
ライセンス
MIT — LICENSE を参照してください。
このプロジェクトは Docmost とは提携関係にありません。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI models to interact with BookStack wiki instances through a comprehensive API interface. Supports content management (books, chapters, pages), user administration, search functionality, and content export in multiple formats.4112MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM clients to interact with any MediaWiki wiki, supporting page creation/editing, search, file uploads, category browsing, and page history retrieval. Supports multiple wikis with OAuth2 or bot password authentication for both public and private wikis.910MIT
- 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.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, retrieve, and optionally edit pages in a WikiJS knowledge base via the Model Context Protocol.231MIT
Related MCP Connectors
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Self-hostable team wiki; agents read & write it via MCP; Atlas turns your repo into a cited wiki.
AgentDocs (agentdocs.eu) MCP: read, search, write, comment, share & attach images to Markdown docs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NeerdOnerT/docmost-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server