mkdocs MCP server
Commit Oct 27, 2026Enables AI clients to search and retrieve content from published MkDocs sites using BM25 search over HTTP.
Also known as ehsanmsb/mkdocs-mcp
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 27, 2026
- License
- MIT
What is mkdocs MCP?
mkdocs enables AI clients to search and retrieve content from published MkDocs sites using BM25 search over HTTP.
Summary generated from the project's README
About mkdocs MCP server
Retrieving specific documentation sections from published MkDocs websites is what this server enables for AI clients. It works by accessing the public search_index.json file of one or more MkDocs sites via HTTP to perform BM25 searches. This allows an AI to find relevant page text and links without needing to clone a full documentation repository or manage complex authentication.
Developers set up the server locally using Python 3.14 and uv, configuring the MKDOCS_MCP_SITES environment variable with a list of site names and base URLs. Once running, the server hosts the MCP protocol at a local endpoint, which can be connected to clients through a standard JSON configuration. It is designed to handle multiple sites simultaneously by combining them into a single index, ensuring that if one site fails to refresh, the others remain available for searching.
What you can do with it
- 1Search multiple documentation sitesAsk the AI to find information across several different MkDocs-based documentation platforms at once.
- 2Retrieve specific page contentRequest that the AI find and read specific sections or full page text from a public documentation site.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
MKDOCS_MCP_SITES
| Name | Description | |
|---|---|---|
| MKDOCS_MCP_SITES | — |
README
View on GitHub
MkDocs MCP Server
A read-only Model Context Protocol server for
public MkDocs sites that publish a search index. It
searches the published search/search_index.json and returns relevant
sections, page text, and links over HTTP. It does not clone the documentation
repository or require MCP client authentication.
Quick start
Requires Python 3.14 and uv.
uv sync --locked --python 3.14
source .venv/bin/activate
export MKDOCS_MCP_SITES='[{"name":"docs","base_url":"https://docs.example.com"}]'
mkdocs-mcp
Replace the example URL with the public root of your MkDocs site. The server
fetches <base_url>/search/search_index.json on startup and serves MCP at
http://localhost:8000/mcp. If the index is elsewhere, add search_index_url
to that site's object. The index must be reachable when the server starts.
Opening / in a browser shows the server status and MCP connection URL.
Opening /mcp in a browser shows the same page; MCP clients continue to use
/mcp for protocol requests.
To search several sites through the same endpoint, add more entries to
MKDOCS_MCP_SITES. Search results identify their site and link to the original
pages:
export MKDOCS_MCP_SITES='[{"name":"atlas","base_url":"https://atlas.example.com"},{"name":"team","base_url":"https://team.example.com"}]'
The server searches all configured sites with one BM25 index. A site that fails to refresh keeps its last good content; other sites remain searchable.
For MCP clients that use an mcpServers JSON configuration:
{
"mcpServers": {
"mkdocs-docs": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}
Documentation
mkdocs MCP questions
Does this server require cloning the documentation repository?
No, the server does not clone the repository; it searches the published search index instead.
How can I search multiple MkDocs sites at once?
You can search multiple sites through a single endpoint by adding multiple entries to the MKDOCS_MCP_SITES environment variable.
What happens if one of the configured sites fails to refresh?
The server will keep the last successful content for the failing site while allowing other sites to remain searchable.
Where can I find the MCP connection URL?
Opening the root URL in a browser shows the server status and the MCP connection URL.