MkDocs MCP Server
A generic, configurable MCP server that makes any MkDocs documentation site searchable and explorable from MCP clients.
README
MkDocs MCP Server
A generic, configurable Model Context Protocol server that makes any MkDocs documentation site searchable and explorable from MCP clients (Claude CLI, IDEs, …).
Nothing is organization- or project-specific: the docs repo, URLs, tenants, topic taxonomy, and server identity are all supplied via configuration.
- Transport: streamable-http
- Search: BM25 (
rank-bm25) with an optional self-hosted semantic/hybrid layer (sentence-transformers, fused with Reciprocal Rank Fusion) - Source of truth: the docs git repo (with a
search_index.jsonand alocalfallback) - Built on established libraries — FastMCP (auth, middleware, transport),
markdown-it-py+python-markdown+python-frontmatter(parsing),pydantic-settings,structlog,prometheus-client.
Quick start (local)
uv pip install -e .
export MKDOCS_MCP_SOURCE_MODE=local
export MKDOCS_MCP_REPO_DIR=/path/to/your/mkdocs-repo
export MKDOCS_MCP_MKDOCS_CONFIG=mkdocs.yml
export MKDOCS_MCP_BASE_URL=https://docs.example.com
export MKDOCS_MCP_AUTH_MODE=none
mkdocs-mcp # serves http://0.0.0.0:8000/mcp
Health: GET /health, readiness: GET /ready, metrics: :9000/metrics.
Connect from Claude CLI (HTTP)
{
"mcpServers": {
"mkdocs-docs": {
"type": "http",
"url": "https://mkdocs-mcp.example.com/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
Configuration
All settings are env vars prefixed MKDOCS_MCP_ (see src/mkdocs_mcp/config.py).
| Var | Default | Notes |
|---|---|---|
MKDOCS_MCP_SOURCE_MODE |
local |
git | search_index | local |
MKDOCS_MCP_GIT_URL |
— | docs repo to clone (when git) |
MKDOCS_MCP_MKDOCS_CONFIG |
mkdocs.yml |
supplies the nav tree |
MKDOCS_MCP_BASE_URL |
http://localhost:8000 |
used for deep-links |
MKDOCS_MCP_TENANTS |
[] |
restrict tenant segments (else first path segment) |
MKDOCS_MCP_TOPICS_FILE |
— | YAML topic taxonomy (else vendor-neutral default) |
MKDOCS_MCP_FEATURED_TOPICS |
k8s/argocd/terraform/vault/gitlab | topics that get a find_<topic>_docs alias |
MKDOCS_MCP_EMBEDDINGS_ENABLED |
false |
needs the vectors extra |
MKDOCS_MCP_AUTH_MODE |
bearer |
none | bearer |
MKDOCS_MCP_BEARER_TOKENS / _ADMIN_TOKENS |
— | comma-separated |
MKDOCS_MCP_REINDEX_INTERVAL_MINUTES |
30 |
0 disables |
Custom topic taxonomy
# topics.yml (MKDOCS_MCP_TOPICS_FILE=/path/topics.yml)
topics:
payments:
paths: ["/payments/"]
keywords: ["checkout", "billing", "invoice"]
Tools
Search: search_docs, search_section, semantic_search
Navigation: get_page, get_section, list_categories, list_pages, browse_tree
Knowledge: summarize_page, related_documents, suggest_reading
Discovery: recent_changes, find_runbooks, find_examples
Topics: find_by_topic (+ find_<topic>_docs aliases generated from FEATURED_TOPICS)
Admin: rebuild_index (admin scope), health_check, get_statistics
Auth
Static bearer tokens are verified by FastMCP's StaticTokenVerifier; admin
tokens carry the admin scope, required by rebuild_index. To use JWT or an
OAuth provider (Keycloak, GitHub, Google, …), change build_verifier in
src/mkdocs_mcp/auth.py to the matching FastMCP provider — the tools are
unaffected.
Semantic / hybrid search (optional)
uv pip install -e '.[vectors]'
export MKDOCS_MCP_EMBEDDINGS_ENABLED=true
export MKDOCS_MCP_EMBEDDINGS_MODEL=BAAI/bge-m3 # multilingual, self-hosted
Embeddings run in-process; no external embedding API is used.
Tests
uv pip install -e '.[dev]'
pytest
ruff check src tests
Contributing
See docs/CONTRIBUTING.md for development setup, validation, pull request expectations, and commit message rules.
Releases
This repository uses Semantic Versioning with semantic-release and
Conventional Commits.
When a branch is merged into main, the release workflow analyzes the commits
since the previous release, calculates the next version, creates the Git tag
automatically, builds Python and Helm package artifacts, publishes a GitHub
release with generated release notes, and pushes a GHCR image. The tag starts
with v (for example, v1.2.3).
The release image is published to ghcr.io/<owner>/<repo> with these tags:
<version>such as1.2.3<major>.<minor>such as1.2sha-<commit-sha>latest
Release notes are grouped into:
FeaturesBug FixesPerformanceRefactoring
Low-signal commit types such as docs:, test:, chore:, ci:, and
build: are hidden from published release notes unless they include a breaking
change.
Use standard Conventional Commit syntax:
feat: add source adapter-> minor releasefix: handle empty search index-> patch releaseperf: reduce indexing allocations-> patch releaserefactor: split parser metadata handling-> no version bump, but shown in release notesfeat!: change configuration names-> major releaseBREAKING CHANGE: configuration names changedin the commit footer -> major release
Deployment
Container + Helm chart for OKD/OpenShift live in charts/mkdocs-mcp/.
See charts/mkdocs-mcp/README.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。