Multi-tenant Model Context Protocol (MCP) server for documentation search and retrieval.
Use one server to index docs from websites, git repositories, and local markdown folders, then expose them to AI clients through a clean MCP toolset.
LLM answers are only as good as their context. docs-mcp-server makes your assistant query your real docs instead of relying on stale model memory.
- Run a single MCP endpoint for many documentation tenants.
- Keep sources fresh with scheduler-driven sync.
- Return ranked snippets and full documents with source URLs.
- Teams using MCP-compatible clients (Copilot, Claude, custom tools).
- Platform/dev experience teams curating internal + external docs.
- Engineers who want deterministic, inspectable doc retrieval.
git clone https://github.com/pankaj28843/docs-mcp-server.git
cd docs-mcp-server
uv sync
cp deployment.example.json deployment.json
uv run python deploy_multi_tenant.py --mode online
uv run python trigger_all_syncs.py --tenants drf --force
uv run python debug_multi_tenant.py --host localhost --port 42042 --tenant drf --test searchIf search returns ranked results with URLs/snippets, your tenant is live.
Add to ~/.config/Code/User/mcp.json:
{
"servers": {
"TechDocs": {
"type": "http",
"url": "http://127.0.0.1:42042/mcp"
}
}
}- Start here:
docs/index.md - First-time walkthrough:
docs/tutorials/getting-started.md - Operational recipes:
docs/how-to/ - API and config lookup:
docs/reference/ - Architecture and trade-offs:
docs/explanations/
Docs follow Divio quadrants: tutorials, how-to guides, reference, and explanations.
- Runtime modes (online vs offline):
docs/explanations/runtime-modes-and-starlette.md - Mode evaluation checklist:
docs/how-to/evaluate-runtime-modes.md - Entrypoint and startup flow:
docs/reference/entrypoint-walkthrough.md - Core library rationale and mapping:
docs/reference/core-library-map.md
list_tenantsfind_tenantdescribe_tenantroot_searchroot_fetch
See full contracts in docs/reference/mcp-tools.md.
- Process entrypoint:
src/docs_mcp_server/app.py - App composition:
src/docs_mcp_server/app_builder.py - Root MCP tool hub:
src/docs_mcp_server/root_hub.py - Tenant composition:
src/docs_mcp_server/tenant.py
Deep-dive guides that match these files:
docs/reference/entrypoint-walkthrough.mddocs/explanations/runtime-modes-and-starlette.mddocs/reference/mcp-tools.mddocs/reference/core-library-map.md
Development + CI validation loop:
uv run ruff format . && uv run ruff check --fix .
timeout 120 uv run pytest -m unit --cov=src/docs_mcp_server --cov-fail-under=95
timeout 120 uv run python integration_tests/ci_mcp_test.py
uv run mkdocs build --strictMore in docs/contributing.md.
MIT — see LICENSE.