Access your self-hosted Docmost documentation via AI assistants
Docmost MCP Server
An MCP server that gives AI assistants direct access to your self-hosted Docmost documentation via its API.
Works with any MCP-compatible client, including:
Features
| Tool | Description |
|---|---|
| list_spaces | List all available documentation spaces with names, slugs, and IDs |
| search_docs | Full-text search across all documentation, with optional space filtering |
| get_page | Retrieve full page content converted from ProseMirror JSON to Markdown |
Prerequisites
- Python 3.10+
- A running Docmost instance with valid user credentials
- An MCP-compatible client (Claude Code, Claude Desktop, Cursor, VS Code, etc.)
Installation
1. Clone the repository
git clone https://github.com/aleksvin8888/local-docmost-mcp.git
cd docmost-mcp
2. Create a virtual environment and install dependencies
python3 -m venv venv
source venv/bin/activate # Linux / macOS
# venv\Scripts\activate # Windows
pip install -r requirements.txt
This installs two dependencies:
- `mcp` — official Python SDK for building MCP servers
- `requests` — HTTP client for Docmost API calls
3. Configure credentials
Copy the example config and fill in your details:
cp config.example.json config.json
Edit config.json:
{
"base_url": "https://your-docmost-instance.example.com",
"email": "your-email@example.com",
"password": "your-password",
"timeout": 30
}
| Parameter | Description |
|---|---|
base_url |
URL of your Docmost instance (no trailing slash) |
email |
Email address for Docmost authentication |
password |
Password for Docmost authentication |
timeout |
HTTP request timeout in seconds |
Note:
config.jsoncontains sensitive credentials and is excluded from version control via.gitignore.
4. Verify the setup
source venv/bin/activate # if not already active
python docmost_client.py
Expected output:
=== Spaces ===
My Space (my-space) - 019a2a69-...
Another Space (another) - 019a5e21-...
...
=== Search 'example' ===
Example Page Title - abc123def
...
If you see your spaces and search results, the client is working correctly.
Connecting to an MCP client
The server uses stdio transport, which is supported by all major MCP clients. Below are setup instructions for the most popular ones.
Claude Code
Choose one of the following options.
Important: Use absolute paths to both the Python binary inside
venvandmcp_server.py.
Option 1: Global config (recommended)
Add to ~/.claude/settings.json:
{
"mcpServers": {
"docmost": {
"command": "/absolute/path/to/docmost-mcp/venv/bin/python",
"args": ["/absolute/path/to/docmost-mcp/mcp_server.py"]
}
}
}
Option 2: Project-level config
Create .claude/settings.json in your project root:
{
"mcpServers": {
"docmost": {
"command": "/absolute/path/to/docmost-mcp/venv/bin/python",
"args": ["/absolute/path/to/docmost-mcp/mcp_server.py"]
}
}
}
Option 3: CLI command
claude mcp add docmost \
-c "/absolute/path/to/docmost-mcp/venv/bin/python" \
-- /absolute/path/to/docmost-mcp/mcp_server.py
After adding the config, restart Claude Code or start a new session.
Claude Desktop
Add the server to your Claude Desktop config file:
- Linux:
~/.config/claude/claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"docmost": {
"command": "/absolute/path/to/docmost-mcp/venv/bin/python",
"args": ["/absolute/path/to/docmost-mcp/mcp_server.py"]
}
}
}
Restart Claude Desktop after saving the config.
Cursor / Windsurf / VS Code / Other clients
Most MCP clients use the same configuration format. Add the server with:
- Command:
/absolute/path/to/docmost-mcp/venv/bin/python - Args:
/absolute/path/to/docmost-mcp/mcp_server.py - Transport: stdio
Refer to your client's documentation for the exact config file location and format.
Usage
Once the MCP server is connected, your AI assistant can use the following tools:
List all spaces
Show me all available documentation spaces
Search documentation
Search the documentation for "user permissions"
Search within a specific space
``
Tools (3)
list_spacesList all available documentation spaces with names, slugs, and IDssearch_docsFull-text search across all documentation, with optional space filteringget_pageRetrieve full page content converted from ProseMirror JSON to MarkdownEnvironment Variables
base_urlrequiredURL of your Docmost instance (no trailing slash)emailrequiredEmail address for Docmost authenticationpasswordrequiredPassword for Docmost authenticationtimeoutHTTP request timeout in secondsConfiguration
{"mcpServers": {"docmost": {"command": "/absolute/path/to/docmost-mcp/venv/bin/python", "args": ["/absolute/path/to/docmost-mcp/mcp_server.py"]}}}