by jgravelle
The leading, most token-efficient MCP server for documentation exploration and retrieval via structured section indexing
# Add to your Claude Code skills
git clone https://github.com/jgravelle/jdocmunch-mcpGuides for using mcp servers skills like jdocmunch-mcp.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:48:41.330Z",
"npmAuditRan": true,
"pipAuditRan": true
}jdocmunch-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by jgravelle. The leading, most token-efficient MCP server for documentation exploration and retrieval via structured section indexing. It has 200 GitHub stars.
Yes. jdocmunch-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/jgravelle/jdocmunch-mcp" and add it to your Claude Code skills directory (see the Installation section above).
jdocmunch-mcp is primarily written in Python. It is open-source under jgravelle on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh jdocmunch-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
jDocMunch is an MCP server for coding agents that retrieves the exact documentation section a task needs, without loading whole files into the context window.
Index a documentation set once by heading hierarchy, then fetch a single section, a heading subtree, or a ranked search result — extracted byte-precisely from the original file.
Install · Quickstart · Benchmarks · Commercial licensing
Free for personal use. Commercial use requires a paid license — terms below.
The problem. An agent asked "how do I configure authentication?" opens a documentation file, skims hundreds of paragraphs it does not need, opens another, and repeats. Large context windows do not fix this. They just make the waste affordable enough to ignore until the bill arrives, and they crowd out the context the model actually needed.
The mechanism. jDocMunch parses a documentation set into a section tree keyed by heading hierarchy, stores each section's byte offsets into the original file, and exposes retrieval over MCP. Sections keep durable identities across re-indexing as long as path, heading text, and heading level are unchanged.
The outcome. The unit of access changes from file to section. An agent retrieves the installation section, one configuration block, or a specific heading subtree — and nothing else.
Search and retrieve documentation by section, not just file path or keyword match.
Full content is pulled on demand from exact byte offsets into the original file.
Sections retain durable identities across re-indexing when path, heading text, and heading level remain unchanged.
Four benchmarks against public documentation corpora, each with the corpus, date, and per-query results recorded in benchmarks/.
| Corpus | Scale | Indexed in | Result |
|---|---|---|---|
Kubernetes (kubernetes/website, 2026-03-04) |
1,569 .md files, 4,355 sections, 16 MB |
3,352 ms | 27,285 tokens saved on a single node-affinity query; 100 ms latency |
| SciPy | 10,402 sections, ~855,000 corpus tokens | 2,247 ms | 135–152 ms per query across sparse-solver, FFT, and optimization lookups |
| LangChain (MDX) | 5,973 sections | 5,204 ms | MDX-aware sectioning found 754% more sections than the naive pass |
| Wiki | 7,449-token corpus | — | Search returns ranked metadata in ~190 tokens against a 7,449-token whole-corpus read |
Read these as per-corpus results, not as a single headline multiple. Savings depend on how large the containing file is relative to the section you needed: a small file with one heading saves almost nothing, and the Kubernetes corpus saves a great deal. The benchmark files record the queries that did poorly alongside the ones that did well.
A separate, measured result from the v1.121.0 projection work, on this repository's own docs at max_results=10: a search row went 1,989 chars → 319 with compact=true (−84%), or 431 with snippet_bytes=200 (−78%) while removing the follow-up get_section call entirely.
Retrieval quality is gated, not assumed. Every release runs a replay fixture over a frozen golden set and fails below nDCG 0.95. That gate has failed builds and blocked releases; it is not decorative.
Requirements: Python 3.10+, any MCP-compatible client.
pip install jdocmunch-mcp
jdocmunch-mcp init
init detects your MCP clients, writes their config entries, installs the doc-exploration prompt policy so your agent actually reaches for the tools, and optionally installs hooks and indexes your docs.
Ubuntu 24.04+ / Debian 12+: system Python is externally managed (PEP 668). Use
pipx install jdocmunch-mcporuv tool install jdocmunch-mcp.
Verify:
jdocmunch-mcp --version
Manual Claude Code setup:
pip install jdocmunch-mcp
claude mcp add -s user jdocmunch jdocmunch-mcp
Installing the server makes the tools available; it does not break an agent's habit of brute-reading files. One line in your CLAUDE.md does that:
Call the jdocmunch_guide tool and strictly follow its instructions.
Assumes: jDocMunch installed and registered with your client, and a folder of documentation.
Index a local documentation folder:
jdocmunch-mcp index-local --path ./docs
It prints JSON naming the corpus and what it found:
{
"success": true,
"repo": "local/docs",
"file_count": 1,
"section_count": 4,
"doc_types": { ".md": 1 },
"semantic_search": false
}
section_count greater than file_count is the whole point: the index addresses headings, not files.
Then, inside your agent:
Using jdocmunch, search the docs for "authentication configuration" and show me that section.
The agent should call search_sections, then get_section on the top hit — returning one section rather than a file. _meta.tokens_saved on the response reports what that cost versus reading the containing document.
Next step: get_toc_tree for a structural view of the whole corpus, or index_repo to index documentation straight from a GitHub repository.
get_section and get_sections pull byte-precise content from the original file; get_section_excerpt narrows further.search_sections fuses BM25 with semantic cosine when an embedding provider is configured. compact=true, fields=[...], and snippet_bytes=N cut the response further.get_toc, get_toc_tree, get_section_path, get_section_descendants, and section_neighbors traverse the heading tree without reading content.get_doc_coverage, get_undocumented_symbols, get_stale_pages, get_orphan_sections, get_broken_links, and doc_health_radar.find_endpoint, list_endpoints_by_tag, find_operations_using_schema, and get_schema_graph treat OpenAPI documents as first-class.check_section_delete_safe and get_section_blast_radius before you remove or restructure._meta.freshness, _meta.verdict, and which source layer answered.64 tools in total. The full reference is in USER_GUIDE.md.
Everything runs locally. Indexes live under your home directory; no hosted service is required for indexing or retrieval.
docs/ ──► parser (per format) ──► section tree ──► local index
│
MCP client ◄── retrieval ◄──┘
[office] extra — PDF, DOCX, PPTX, and EPUB.INDEX_VERSION = 3) that auto-migrates on first load. A 1.x release never forces a reindex.Deeper detail: ARCHITECTURE.md and SPEC.md.
Local-first by design. Your documentation is parsed and stored on your machine, and the base package's only default network behavior is an anonymous savings counter — a random ID plus aggregate token counts, no content, no paths, no PII.
Opt out completely:
JDOCMUNCH_SHARE_SAVINGS=0
Embedding and summarizer providers call their configured API only when you enable them, and never by default. watch-install registers a login service only when you run it yourself.
Path traversal prevention, symlink escape protection, secret exclusion, file-size limits, binary detection, and encoding safety are documented in SECURITY.md, along with how to report a vulnerability.
[office] extra and are supported for local indexing only.unknown rather than assumed current.