papermoon-mkdocs-mcp
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., "@papermoon-mkdocs-mcpsearch for 'installation' in the docs"
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.
papermoon-mkdocs-mcp
A lightweight MCP server for MkDocs documentation sites. Reads markdown files directly from disk, provides full-text and optional semantic search, and exposes project structure through the Model Context Protocol.
Features
5 MCP tools -- search, read_document, list_documents, get_project_info, get_document_outline
SQLite FTS5 keyword search with BM25 ranking (zero external dependencies)
Optional semantic vector search via sentence-transformers
Hybrid search combining keyword + vector results with Reciprocal Rank Fusion
Incremental indexing -- fast updates when files change
Persistent SQLite index that survives server restarts
Navigation-aware -- parses
mkdocs.ymland.nav.ymlSecurity-first -- path traversal prevention, read-only search connections
Minimal dependencies -- 3 required, 2 optional
Related MCP server: mdbook-mcp-server
Installation
pip install papermoon-mkdocs-mcpTo enable vector search:
pip install papermoon-mkdocs-mcp[vector]Quick Start
Run from the root of any MkDocs project (where mkdocs.yml lives):
cd /path/to/your/mkdocs-project
papermoon-mkdocs-mcpOr point to a specific config file:
papermoon-mkdocs-mcp --config /path/to/mkdocs.ymlThe server auto-detects mkdocs.yml in the current directory when --config
is omitted.
Transport Options
By default the server uses stdio transport. You can switch to a network transport for remote or multi-client setups:
# Streamable HTTP (recommended for network access)
mkdocs-mcp --transport streamable-http --host 0.0.0.0 --port 9000
# SSE (legacy client compatibility)
mkdocs-mcp --transport sse --port 8080Flag | Default | Description |
|
|
|
|
| Bind address (network transports only) |
|
| Bind port (network transports only) |
Security note: When binding to a non-loopback address, place the server behind a reverse proxy (e.g. nginx, Caddy) that terminates TLS.
MCP Client Configuration
Claude Desktop
Add to your Claude Desktop configuration file:
{
"mcpServers": {
"mkdocs": {
"command": "papermoon-mkdocs-mcp",
"args": ["--config", "/path/to/mkdocs.yml"]
}
}
}Note: If Claude Desktop can't find the command (Failed to spawn process: No such file or directory), use the full path to the executable instead of just mkdocs-mcp:
{
"mcpServers": {
"mkdocs": {
"command": "/path/to/.venv/bin/mkdocs-mcp",
"args": ["--config", "/path/to/mkdocs.yml"]
}
}
}This is common when the package is installed in a virtual environment whose bin/ directory isn't in Claude Desktop's PATH.
Claude Code / VS Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"mkdocs": {
"command": "papermoon-mkdocs-mcp",
"args": ["--config", "/path/to/mkdocs.yml"]
}
}
}Available Tools
search
Search documentation using keyword, semantic, or hybrid search.
Parameter | Type | Default | Description |
| str | (required) | The search query string |
| str |
|
|
| int |
| Maximum results to return (1--100) |
Returns ranked results with path, title, relevance score (normalized 0.0--1.0), and text snippet.
read_document
Read a documentation file by its relative path.
Parameter | Type | Default | Description |
| str | (required) | Relative path from docs dir (e.g. |
Returns the markdown body (frontmatter stripped), parsed frontmatter as a separate field, heading structure, and file metadata.
list_documents
List all documentation files, optionally filtered by section.
Parameter | Type | Default | Description |
| str or null |
| Directory prefix to filter by (e.g. |
Returns document metadata (path, title, description, categories, size, mtime).
get_project_info
Get MkDocs project metadata. Takes no parameters.
Returns site name, site URL, docs directory, theme, navigation tree, document count, and index status.
get_document_outline
Get the heading structure (table of contents) for a document.
Parameter | Type | Default | Description |
| str | (required) | Relative path from docs dir (e.g. |
Returns the document title and a list of headings with level, text, and anchor.
Architecture
src/mkdocs_mcp/
config.py -- MkDocs config detection and nav parsing
repository.py -- SQLite schema and CRUD operations
indexer.py -- Index orchestration with incremental updates
searcher.py -- Keyword, vector, and hybrid search
server.py -- FastMCP server with 5 tool definitions
utils.py -- Path validation, frontmatter parsing, text extraction
models.py -- Pydantic response modelsAt startup the server reads mkdocs.yml, scans the docs directory, and
builds (or incrementally updates) a SQLite FTS5 index. Search queries hit the
index directly; vector search embeds the query with all-MiniLM-L6-v2 and
compares against stored document embeddings. Hybrid mode fuses both result
lists using Reciprocal Rank Fusion.
Development
git clone https://github.com/aspect-build/mkdocs-mcp.git
cd mkdocs-mcp
pip install -e ".[dev]"
pytestLinting and type checking:
ruff check .
mypy src/Requirements
Python >= 3.10
Required: fastmcp (>=3.0, <4), pydantic (>=2.0, <3), pyyaml (>=6.0), markdown (>=3.4)
Optional (vector search): sentence-transformers (>=3.0), numpy (>=1.24)
License
See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables interaction with MkDocs documentation through the MCP protocol, allowing AI assistants to read, search, and retrieve documentation content from MkDocs projects.9MIT
- Alicense-qualityCmaintenanceEnables MCP clients to access and read mdbook documentation, including structure, content, and search.123MIT
- Alicense-qualityDmaintenanceProvides semantic search over markdown documentation using RAG, allowing natural language queries and integration with MCP clients.1MIT
- Flicense-qualityDmaintenanceEnables searching documentation from GitHub repositories and web pages via MCP tools, with in-memory indexing and caching for fast retrieval.
Related MCP Connectors
Query any docs site via MCP. Submit a URL, ask questions, get cited answers.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Agentic search over your Dewey document collections from any MCP-compatible client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/papermoonio/mkdocs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server