home / mcp / docmost mcp server

Docmost MCP Server

Provides direct access to Docmost documentation via an MCP server, enabling list, search, and page retrieval through MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aleksvin8888-local-docmost-mcp": {
      "command": "/absolute/path/to/docmost-mcp/venv/bin/python",
      "args": [
        "/absolute/path/to/docmost-mcp/mcp_server.py"
      ],
      "env": {
        "email": "[email protected]",
        "timeout": "30",
        "base_url": "https://your-docmost-instance.example.com",
        "password": "your-password"
      }
    }
  }
}

You can run a Docmost MCP Server locally to let AI assistants access your self-hosted Docmost documentation via its API. This server exposes a small, defined set of tools that let clients list spaces, search across docs, and retrieve full pages in Markdown format for seamless integration with MCP-compatible AIs.

How to use

You connect the MCP server to an MCP-compatible client (such as Claude Code, Cursor, Windsurf, VS Code, or similar) using a stdio transport. Once connected, your client can perform three core actions: list all spaces, search documentation, and fetch complete page content converted to Markdown. Use these practical patterns in your conversations with your AI assistant to access your documentation quickly.

How to install

Prerequisites: Python 3.10 or newer and a running Docmost instance with valid credentials. You also need an MCP-compatible client.

# 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

3. Configure credentials by copying the example and filling in your details.

cp config.example.json config.json
```

Edit `config.json` to include your Docmost instance URL and credentials.
{
  "base_url": "https://your-docmost-instance.example.com",
  "email": "[email protected]",
  "password": "your-password",
  "timeout": 30
}
```

Note: `config.json` contains sensitive credentials and should be excluded from version control.

4. Verify the setup by running the client script to ensure connectivity and available spaces and pages.

source venv/bin/activate   # if not already active

python docmost_client.py
```

Expected output shows available spaces and search results, confirming the client is working correctly.

Additional setup notes

The server uses stdio transport to communicate with MCP clients. On the first API call, it authenticates with your Docmost instance using the provided email and password, earning a JWT token that is cached for subsequent requests. If a request returns 401, the server re-authenticates automatically.

Page content in Docmost is stored as ProseMirror JSON. The server converts it to clean Markdown (including headings, lists, tables, code blocks, images, and links) before returning it to the client.

Troubleshooting tips

If you encounter issues, check that your credentials are correct and that your Docmost instance is reachable. If a token expires, delete token.json and it will be recreated automatically on the next request. Ensure you used absolute paths when configuring the MCP client and that the virtual environment has all dependencies installed.

Available tools

list_spaces

List all available documentation spaces with names, slugs, and IDs

search_docs

Perform full-text search across all documentation with optional space filtering

get_page

Retrieve full page content converted from ProseMirror JSON to Markdown