
Docmost的模型上下文协议(MCP)服务器,允许AI代理管理文档空间和页面。
概览
Docmost的模型上下文协议(MCP)服务器,使AI代理能够搜索、创建、修改和组织文档页面和空间。 - : 智能创建工具。通过导入创建内容,同时一次性处理层级结构(嵌套在父页面下)。- : 更新页面内容和/或标题。更新通过实时协作(WebSocket)实现。- : 一次性删除单个或多个页面。- : 通过将页面按层次方式组织,将其迁移到新的父页面或根节点。 - : 带可选空间过滤功能(query, spaceId)的全文搜索。- : 获取当前 Docmost 工作区的信息。- : 查看当前工作区内的所有空间。- : 查看当前工作区内的所有组。- : 列出空间内的页面(按 updatedAt 降序排序)。- : 检索特定页面的完整内容和元数据。 - : 页面内容会自动从Docmost内部的ProseMirror/TipTap JSON格式转换,以清理Markdown,方便代理使用。
概述(AI 翻译)
Docmost的模型上下文协议(MCP)服务器,使AI代理能够搜索、创建、修改和组织文档页面和空间。
特色
核心管理
create_page:智能创建工具。通过导入创建内容,同时一次性处理层级结构(嵌套在父节点下)。update_page:更新页面内容和/或标题。更新通过实时协作(WebSocket)实现。delete_page/delete_pages:一次性删除单个或多个页面。move_page:通过将页面移动到新的父或根节点,按层次组织页面。
探索与回收
search:带可选空间过滤的全文搜索(query,spaceId)。get_workspace:获取当前 Docmost 工作区的信息。list_spaces:查看当前工作区内的所有空间。list_groups:查看当前工作区内的所有组。list_pages:列表页面(按updatedAt降序排列)。get_page:检索特定页面的完整内容和元数据。
技术细节
本页由 AI 翻译,技术细节请以原文为准。
README
Docmost MCP Server
A Model Context Protocol (MCP) server for Docmost, enabling AI agents to search, create, modify, and organize documentation pages and spaces.
Features
Core Management
create_page: Smart creation tool. Creates content (via import) AND handles hierarchy (nesting under a parent) in one go.update_page: Update a page’s content and/or title. Updates are performed via real-time collaboration (WebSocket).delete_page/delete_pages: Delete single or multiple pages at once.move_page: Organize pages hierarchically by moving them to a new parent or root.
Exploration & Retrieval
search: Full-text search across spaces with optional space filtering (query,spaceId).get_workspace: Get information about the current Docmost workspace.list_spaces: View all spaces within the current workspace.list_groups: View all groups within the current workspace.list_pages: List pages within a space (ordered byupdatedAtdescending).get_page: Retrieve full content and metadata of a specific page.
Technical Details
- Automatic Markdown Conversion: Page content is automatically converted from Docmost’s internal ProseMirror/TipTap JSON format to clean Markdown for easy agent consumption. Supports all Docmost extensions including callouts, task lists, math blocks, embeds, and more.
- Smart Import API: Uses Docmost’s import API to ensure clean Markdown-to-ProseMirror conversion when creating pages.
- Child Preservation: The
update_pagetool creates a new page ID but effectively simulates an in-place update by reparenting existing child pages to the new version. - Pagination Support: Automatically handles pagination for large datasets (spaces, pages, groups).
- Filtered Responses: API responses are filtered to include only relevant information, optimizing data transfer for agents.
Installation
npm install
npm run build
Configuration
This server requires the following environment variables to be set:
DOCMOST_API_URL: The full URL to your Docmost API (e.g.,https://docs.example.com/api).DOCMOST_EMAIL: The email address for authentication.DOCMOST_PASSWORD: The password for authentication.
usage with Claude Desktop / generic MCP Client
Add the following to your MCP configuration (e.g. claude_desktop_config.json):
{
"mcpServers": {
"docmost-local": {
"command": "node",
"args": ["./build/index.js"],
"env": {
"DOCMOST_API_URL": "http://localhost:3000/api",
"DOCMOST_EMAIL": "[email protected]",
"DOCMOST_PASSWORD": "test"
}
}
}
}
Development
# Watch mode
npm run watch
# Build
npm run build
License
MIT
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"docmost-local": {
"command": "node",
"args": ["./build/index.js"],
"env": {
"DOCMOST_API_URL": "http://localhost:3000/api",
"DOCMOST_EMAIL": "[email protected]",
"DOCMOST_PASSWORD": "test"
}
}
}
}