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.
Most AI agents still explore documentation the expensive way:
open file → skim hundreds of irrelevant paragraphs → open another file → repeat
That burns tokens, floods context windows with noise, and forces models to reason through a lot of text they never needed in the first place.
jDocMunch-MCP lets AI agents navigate documentation by section instead of reading files by brute force.
It indexes a documentation set once, then retrieves exactly the section the agent actually needs, with byte-precise extraction from the original file.
| Task | Traditional approach | With jDocMunch | | --- | ---: | ---: | | Find a configuration section | ~12,000 tokens | ~400 tokens | | Browse documentation structure | ~40,000 tokens | ~800 tokens | | Explore a full doc set | ~100,000 tokens | ~2,000 tokens |
Index once. Query cheaply forever.
Precision context beats brute-force context.
Commercial licenses
jDocMunch-MCP is free for non-commercial use.
Commercial use requires a paid license.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Want both code and docs retrieval?
1.x compatibility commitment
Every 1.x license entitles you to every future 1.x release. We will never ship a 1.x version that:
- removes or renames an MCP tool (deprecated tool names keep their aliases),
- drops a
Sectionfield from the response shape,- forces a reindex without auto-migrating your existing index on first load,
- changes the JSON wire format of any tool response in a way that breaks an existing consumer,
- or makes a previously-default behavior raise.
Anything that would require breaking these promises is reserved for a future major version (2.x). The full machine-checked contract is enforced via
tests/test_server.py(tool-name and required-field invariants) and the replay-fixture gate that runs on every release.
Stop dumping documentation files into context windows. Start navigating docs structurally.
jDocMunch indexes documentation once by heading hierarchy and section structure, then gives MCP-compatible agents precise access to the explanations they actually need instead of forcing them to brute-read files.
It is built for workflows where token efficiency, context hygiene, and agent reliability matter.
Large context windows do not fix bad retrieval.
Agents waste money and reasoning bandwidth when they:
jDocMunch fixes that by changing the unit of access from file to section.
Instead of handing an agent an entire document, it can retrieve exactly:
That makes documentation exploration cheaper, faster, and more stable.
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.
Indexes and raw docs are stored locally. No hosted dependency required.
Works with Claude Desktop, Claude Code, Google Antigravity, and other MCP-compatible clients.
Every section stores:
This allows agents to discover documentation structurally, then request only the specific section they need.
Traditional doc retrieval methods all break in different ways:
jDocMunch preserves the structure the human author intended:
Agents do not need bigger context windows.
They need better navigation.
jDocMunch implements jMRI-Full — the open specification for structured retrieval MCP servers. jMRI-Full covers the full stack: discover, search, retrieve, and metadata operations with batch retrieval, hash-based drift detection, byte-offset addressing, and a complete _meta envelope on every call.
Discovery GitHub API or local directory walk
Security filtering Traversal protection, secret exclusion, binary detection
Parsing Format-aware section splitting: heading-based (Markdown/MDX/HTML/RST/AsciiDoc), structure-based (OpenAPI tags, JSON keys, XML elements), or cell-based (Jupyter)
Hierarchy wiring Parent/child relationships established
Summarization Heading text → AI batch summaries → title fallback
Storage
JSON index + raw files stored locally under ~/.doc-index/
Retrieval O(1) byte-offset seeking via stable section IDs
{repo}::{doc_path}::{ancestor-chain/slug}#{level}
The slug is prefixed with the ancestor heading chain, making IDs both readable and stable. A new heading inserted in one branch of a document never renumbers IDs in another branch.
Examples:
owner/repo::docs/install.md::installation#1owner/repo::docs/install.md::installation/prerequisites#3owner/repo::README.md::usage/configuration/advanced-configuration#4local/myproject::guide.md::configuration#2IDs remain stable across re-indexing when the file path, heading text, heading level, and parent heading chain do not change.
pippip install jdocmunch-mcp
Verify:
jdocmunch-mcp --help
PATH note: MCP clients often run with a restricted environment where
jdocmunch-mcpmay not be found even if it works in your shell. Usinguvxis the recommended approach because it resolves the package on demand without relying on your system PATH. If you preferpip install, use the absolute path to the executable instead.
/home/<username>/.local/bin/jdocmunch-mcp/Users/<username>/.local/bin/jdocmunch-mcpC:\\Users\\<username>\\AppData\\Roaming\\Python\\Python3xx\\Scripts\\jdocmunch-mcp.exeConfig file location:
| OS | Path |
| ------- | ----------------------------------------------------------------- |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Linux | ~/.config/claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"jdocmunch": {
"command": "uvx",
"args": ["jdocmunch-mcp"]
}
}
}
{
"mcpServers": {
"jdocmunch": {
"command": "uvx",
"args": ["jdocmunch-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_...",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
For Anthropic or Gemini, the base uvx jdocmunch-mcp command is enough once the
corresponding API key is present. For OpenAI-compatible providers such as OpenAI,
MiniMax, or GLM-5, include the optional dependency in the launcher command:
{
"mcpServers": {
"jdocmunch": {
"command": "uvx",
"args": ["--with", "openai", "jdocmunch-mcp"],
"env": {
"MINIMAX_API_KEY": "mx-...",
"JDOCMUNCH_SUMMARIZER_PROVIDER": "minimax"
}
}
}
}
After saving the config, restart Claude Desktop / Claude Code.
jDocMunch ships enforcement hooks that keep your agent honest:
Read a large doc file, suggesting search_sections + get_sectionEdit/Write so the index never goes stale