
Doctree Mcp
Gives Claude a navigable tree over your markdown, CSV, and JSONL docs instead of dumping everything into context. Exposes BM25 search, table-of-contents traversal, and node-by-node content retrieval so the agent can drill down breadcrumb-style rather than guess from flat chunks. No vector DB, no embeddings, no LLM calls at index time. The bundled skills teach procedural knowledge: search first, inspect the outline, navigate to specific sections, retrieve what you need. Also includes wiki write tools with duplicate detection and schema validation if you want the agent maintaining runbooks. Works over stdio for local dev or deploys as Streamable HTTP for team use. Think research librarian behavior, not keyword lottery.
- GitHub stars
- 1
- tools
- 8
- auth
- Required
- transport
- STDIO
- env vars
- 4
- last updated
- Feb 21, 2026
Tools
8 toolsPublic tool metadata for what this MCP can expose to an agent.
search_documentsBM25 keyword search + facet filters + glossary expansion (markdown · CSV · JSONL)
BM25 keyword search + facet filters + glossary expansion (markdown · CSV · JSONL)
No parameter schema in public metadata yet.
get_treeTable of contents — headings, word counts, summaries
Table of contents — headings, word counts, summaries
No parameter schema in public metadata yet.
get_node_contentFull text of a specific section by node ID
Full text of a specific section by node ID
No parameter schema in public metadata yet.
navigate_treeA section plus all descendants in one call
A section plus all descendants in one call
No parameter schema in public metadata yet.
lookup_rowO(1) exact-key lookup for structured data rows (e.g. PROJ-44)
O(1) exact-key lookup for structured data rows (e.g. PROJ-44)
No parameter schema in public metadata yet.
find_similarDuplicate detection with overlap ratios
Duplicate detection with overlap ratios
No parameter schema in public metadata yet.
draft_wiki_entryScaffold: suggested path, inferred frontmatter, glossary hits
Scaffold: suggested path, inferred frontmatter, glossary hits
No parameter schema in public metadata yet.
write_wiki_entryValidated write: path containment, schema, duplicate guards, dry-run
Validated write: path containment, schema, duplicate guards, dry-run
No parameter schema in public metadata yet.
Sponsors
Configuration
DOCS_ROOT*Path to your markdown repository root
DOCS_GLOBGlob pattern for finding markdown files (default: **/*.md)
DOCS_ROOTSMultiple weighted collections: ./docs:1.0,./api:0.8 (alternative to DOCS_ROOT)
GLOSSARY_PATHPath to glossary.json for query expansion (default: $DOCS_ROOT/glossary.json)
Readme
doctree-mcp
Agentic document retrieval over markdown, CSV, and JSONL. BM25 + tree navigation via MCP — no vector DB, no embeddings, no LLM calls at index time.
The pitch: MCP provides the structural primitives (a navigable tree, BM25, glossary, row lookup). The bundled skills provide the procedural knowledge (how to walk that tree). Together the agent behaves like a trained research librarian — not a one-shot searcher. See The Skill + MCP Pattern.
Quick Start
Have docs already? Point a client at them:
# In your AI tool's MCP config — see docs/CLIENTS.md for per-tool snippets
{ "mcpServers": { "doctree": {
"command": "bunx", "args": ["doctree-mcp"],
"env": { "DOCS_ROOT": "./docs", "WIKI_WRITE": "1" }
} } }
Restart the tool → ask "search the docs for X" or invoke the doc-read prompt.
Starting fresh? Scaffold a Karpathy-style LLM wiki:
bunx doctree-mcp init # configure current tool
bunx doctree-mcp init --all # configure every supported client
bunx doctree-mcp init --dry-run
Details
- Repository
- github.com/joesaby/doctree-mcp
- Categories
- AI & LLM Tools, Documents & Knowledge, Search & Web Crawling
- Package
doctree-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active