Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Docmost MCP Serversearch for the API authentication guide"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
2. Create a virtual environment and install dependencies
This installs two dependencies:
3. Configure credentials
Copy the example config and fill in your details:
Edit config.json:
Parameter | Description |
| URL of your Docmost instance (no trailing slash) |
| Email address for Docmost authentication |
| Password for Docmost authentication |
| HTTP request timeout in seconds |
Note:
config.jsoncontains sensitive credentials and is excluded from version control via.gitignore.
4. Verify the setup
Expected output:
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:
Option 2: Project-level config
Create .claude/settings.json in your project root:
Option 3: CLI command
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.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
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/pythonArgs:
/absolute/path/to/docmost-mcp/mcp_server.pyTransport: 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
Search documentation
Search within a specific space
Get a specific page
How it works
The MCP client launches the server as a subprocess and communicates via stdio (stdin/stdout).
On the first API call, the server authenticates with your Docmost instance using email/password and receives a JWT token from the
Set-Cookieheader.The token is cached in
token.jsonfor subsequent requests. If a request returns 401, the server automatically re-authenticates and retries.Page content is stored in Docmost as ProseMirror JSON. The server converts it to clean Markdown (headings, lists, tables, code blocks, images, links, etc.) before returning it to the client.
Project structure
Security
config.jsoncontains your credentials — never commit it to gittoken.jsoncontains a JWT token — never commit it to gitBoth files are already listed in
.gitignore
Troubleshooting
"No authToken in response cookies"
Verify that
emailandpasswordinconfig.jsonare correctVerify that
base_urlpoints to your Docmost instance
"Connection refused"
Check that your Docmost instance is running and accessible
Check your network connection and firewall rules
"401 Unauthorized"
The token may have expired — delete
token.jsonand it will be recreated automatically on the next request
MCP tools not appearing in the client
Ensure you used absolute paths to
venv/bin/pythonandmcp_server.pyCheck that the virtual environment has all dependencies installed (
pip install -r requirements.txt)Restart your MCP client after changing the config
License
MIT