MCP Server for Code Retrieval · v1.108.402 · 2.7k+ ★
Your agents get the one function, not the whole file.
jCodeMunch indexes your code so your agent can ask for exactly the symbol it needs, then see who calls it and what a change would break. On our benchmark that's 96.2% fewer tokens per lookup than grep-and-read (15 lookups on express, fastapi and gin at pinned commits, cl100k).
Starred by engineers at
Microsoft, Anthropic, OpenAI, NASA, IBM, Intel, Red Hat, Shopify, Siemens, Epic Games, Alibaba, ByteDance, Stanford,
and thousands of others.
Estimated tokens saved, from 423,597 reporting installs since 3 March 2026
~$7.0 MILLION IN ESTIMATED SAVINGS
~$6,571 estimated avg per install · top 1,000 installs
How this is measured
Tokens are counted. Dollars are modelled: retrieved tokens vs.
the file-read baseline, priced at $5.00/1M (Claude Opus input).
A “reporting install” is one anonymous install ID that has sent
counters at least once, not a star, not a customer, not a person.
What we collect & how to opt out →
AT LEAST 168,565 kg (371,623 lbs) of CO2 kept out of the atmosphere
jCodeMunch is a local MCP server that indexes a codebase's symbols, so coding agents fetch one function instead of whole files. It's for developers and teams using AI coding agents on large codebases. It's free for non-commercial use; work use needs a one-time license, with prices on the Pricing page.
jCodeMunch serves anyone whose AI agents read code: from solo developers to platform teams managing token budgets across entire organizations.
⚡
AI Engineers Using Claude Code
Build with MCP-native code retrieval instead of reading entire files into context. Ship faster with precise symbol access.
🔨
Teams Using MCP Clients
Works with Antigravity, Cursor, Gemini, and any MCP-compatible client. Drop-in setup; every lookup your agent sends to the index costs a fraction of a file read.
📚
Developers Onboarding to Large Repos
Navigate unfamiliar codebases by searching for symbols directly: no need to read through thousands of lines to find what matters.
💰
Organizations Managing LLM Token Costs
Each lookup returns the symbol instead of the file: 96.2% fewer tokens per lookup than grep-and-read on our 15-lookup benchmark.
🌐
Open-Source Maintainers
Enable contributors to explore your codebase efficiently with AI agents. Lower the barrier to meaningful contributions.
Target Codebase
Benchmark Codebase: fastapi/fastapi
A production Python web framework with 80k+ GitHub stars (routing, dependency injection, automatic OpenAPI generation, and security middleware) indexed directly from GitHub and queried verbatim for this benchmark. Measured at commit a64dfbbd.
📁
48
Library .py files The fastapi/ package; tests and docs excluded
📝
761 KB
Library source 760,749 bytes
🪙
151,227
Tokens to read all 48 files tiktoken cl100k_base
🏗️
a64dfbbd
Pinned commit Every figure below is from this commit
⚙️
1.108.391
jCodeMunch version The release that was measured
Benchmark
AI Code Retrieval Benchmark: File Reads vs Symbol Retrieval
A standard agent's grep-and-read against jCodeMunch's symbol retrieval, for the question "how does fastapi dependency injection work". Measured at a pinned commit, on today’s release.
Standard Agent (File-based)
// Iterating through likely files...
jCodeMunch MCP (Symbol-based)
// Querying symbol index...
0
Tokens Consumed (Old Way)
0
Tokens Consumed (jCodeMunch)
101,778
Tokens: grep, then read the top 3 files
3,469
Tokens: jCodeMunch
96.6%
Token Reduction
Real Query Results
Real AI Code Retrieval Results from fastapi/fastapi
Measured results from jCodeMunch 1.108.391 on fastapi at commit a64dfbbd.
Querysearch_symbols("how does fastapi dependency injection work")
Without MCP: grep, then read the top files101,778 tokens
GREP: grep -rl "dependency injection" .
→ matches in 907 files: file list 9,902 tokens
READ: fastapi/routing.py
→ 48,246 tokens consumed
READ: fastapi/applications.py
→ 34,089 tokens consumed
READ: tests/test_frontend.py
→ 9,541 tokens consumed
TOTAL: 101,778 tokens used
With jCodeMunch MCP3,469 tokens
→ search_symbols({
repo: "fastapi/fastapi",
query: "how does fastapi dependency injection work"
})
1. _html_safe_json [openapi/docs.py]
2. _FASTAPI_SCOPE_KEY [routing.py]
3. Depends [param_functions.py] ← the public dependency-injection API
→ Depends is the public API; the agent follows up from there to the code that resolves it.
TOTAL: 3,469 tokens used
Token Usage by File
Where the Tokens Go: File-by-File Breakdown
Each file read floods the context window. jCodeMunch retrieves only the symbol requested.
File
Tokens (Traditional)
Tokens (jCodeMunch)
Savings
grep file list (907 files)
9,902
0 (not needed)
100%
fastapi/routing.py
48,246
219 (_FASTAPI_SCOPE_KEY)
99.5%
fastapi/applications.py
34,089
0 (not needed)
100%
tests/test_frontend.py
9,541
0 (not needed)
100%
jCodeMunch also fetched Depends (param_functions.py, 1,791 tokens) and _html_safe_json (openapi/docs.py, 344), plus 1,115 for the search: 3,469 in all.
Economics
What One Lookup Costs
The modeled cost of this one lookup, at $5 per million input tokens. It covers the lookup itself, not your bill.
Traditional Way
$0.509
per lookup
101,778 tokens × $5.00/1M
100 lookups like it = $50.89
jCodeMunch MCP
$0.017
per lookup
3,469 tokens × $5.00/1M
100 lookups like it = $1.73
Difference
$0.49
per lookup (96.6%)
Modeled cost of the lookup itself,
not of the whole session
$0.49
Modeled difference for this one FastAPI lookup at $5 per million input tokens. It covers the code the lookup reads. A whole session also pays for everything else the agent reads and writes, so it isn't a forecast of your bill.
How jCodeMunch Indexes Code and Retrieves Exact Symbols
A pre-built symbol index lets the MCP server answer code queries in milliseconds with surgical precision.
1
Index Once
Run index_folder(path) to index code symbols, or index_local(path) (jDocMunch) to index documentation sections. Both build a persistent local index: happens once per project.
2
AI Queries by Intent
Instead of reading files, the AI calls search_symbols(query) or get_symbol_source(id). The MCP server performs semantic + keyword search against the index in milliseconds.
3
Surgical Retrieval
Only the matching symbol's source code and metadata is returned, not the surrounding file, not unrelated classes. A 6,000-token file read is replaced by a 400-token symbol pull.
Model-agnostic in the strongest sense.
Symbol summaries fall through a 4-tier chain, Anthropic → Gemini → OpenAI-compatible (Ollama, LM Studio, OpenRouter) → signature-only fallback, so it works with whatever LLM you have a key for, or none. Embeddings ship with a bundled ONNX local model (all-MiniLM-L6-v2, 384-dim) for zero-config semantic search out of the box.
17 generations of index format.
Use Cases
Common Use Cases for MCP Code Retrieval
Symbol-level retrieval changes how AI agents interact with code. Here are the workflows where jCodeMunch and jDocMunch deliver the most value.
🔍
Onboarding to an Unfamiliar Codebase
Search for key symbols and retrieve their implementations directly. Understand architecture without reading every file in the repo.
🔒
Tracing Authentication Flows
Find auth middleware, token validators, and permission checks by symbol search. Follow the call chain through exact function bodies.
🔄
Understanding Dependency Injection
Retrieve DI containers, providers, and resolver functions by name. See how dependencies wire together without reading framework internals.
💡
Impact Analysis Before Refactoring
Search for all references to a symbol before changing it. Understand the blast radius of a refactor with precise, low-token lookups.
🎯
Retrieving Exact Implementation Details
When an AI agent needs the body of a specific function, it retrieves just that function: 400 tokens instead of 6,000 for the full file.
📃
Documentation Retrieval with jDocMunch
Pair jCodeMunch with jDocMunch to give AI agents surgical access to both code and documentation. Search sections, not files.
Instant Framework Context
Starter Packs: Query Frameworks You've Never Cloned
Pre-built symbol indexes for popular frameworks. A 932 MB React repo becomes a 3 MB pack. A 1.4 GB Node.js monorepo becomes 10.6 MB. Install a pack and your AI agent gets symbol-level access, without cloning the repo or waiting for an index build.
📚
Learn Without Cloning
Explore React's fiber reconciler or Django's query compiler. Your agent searches thousands of symbols: no git clone, no local checkout.
🔎
Debug From Stack Traces
Got a confusing framework error? Search the pack for that symbol, read the implementation, understand the call path. Faster than GitHub search.
🔗
Cross-Repo Analysis
Install a framework pack + index your app. Now find_importers and get_blast_radius trace across the boundary into framework code.
⚡
Zero-Config Trial
No API key. No repo. No config. The free Node.js pack (76,700+ symbols) lets you experience real symbol retrieval in under 60 seconds.
10 packs available.
Node.js (free), FastAPI, Django, Flask, React, LangChain, Anthropic SDK, MCP SDK, Laravel, and Spring Boot.
Indexes are rebuilt weekly from the latest tagged release: always current, always stable API surfaces.
jCodeMunch munches code. jDocMunch munches documentation: the same surgical retrieval approach, applied to Markdown, READMEs, specs, and any text-based docs in your repo.
📚
index_local()
Index any local folder of Markdown, RST, or plain-text docs. One call, persistent index.
🔍
search_sections()
Semantic search across headings and content. Returns only the matching section, not the whole file.
📋
get_section()
Pull a specific doc section by ID. Same O(1) byte-offset retrieval as jCodeMunch symbols.
🗺
get_toc_tree()
Retrieve the full table of contents structure without loading any content: orient first, fetch later.
Same philosophy, different domain.
When an AI agent needs to answer “how does the auth flow work?” it shouldn’t read 40 README files.
jDocMunch gives it search_sections(“auth flow”): one call, the right section, nothing else.
No code required. jDataMunch indexes your spreadsheets, databases, and data files so AI assistants can answer data questions precisely, without reading entire files or guessing at column names.
📊
describe_dataset()
Get an instant summary of any CSV or Excel file: row counts, column names, types, and nulls. No formulas needed.
🔍
search_data()
Search across column values to find matching rows instantly, without opening the file or writing a filter.
📈
describe_column()
Distribution, min/max, top values, histogram: everything about a column, retrieved surgically.
🔗
join_datasets()
Server-side SQL JOIN across two indexed datasets: inner, left, right, cross. Per-side filters and column projection.
Σ
aggregate()
GROUP BY with count, sum, avg, min, max, count_distinct, median. Pre-filter support, 1,000-group cap.
📈
get_correlations()
Pairwise Pearson correlations across numeric columns, sorted by strength. Detects relationships your agent would otherwise miss.
🛡
get_data_hotspots()
Rank columns by data-quality risk: null rate, cardinality anomalies, numeric outlier spread. Quality triage in one call.
39 tools. 4 formats. SQLite-backed.
Built for data people, not just developers. Supports CSV, Excel, Parquet, and JSONL: index once, then ask questions. If you want your AI assistant to actually understand your data, not hallucinate column names or miss rows, jDataMunch is the missing piece.
·
See pricing & license details ↗
Open Standard
Built on jMRI: an open retrieval spec
jCodeMunch, jDocMunch, and jDataMunch all conform to jMRI v1.0: the
Munch Retrieval Interface, a published Apache-2.0 spec for token-efficient retrieval. That means deterministic
payload shapes, per-tool token budgets, and a stable contract that tools, dashboards, and agents can rely on. No black-box behavior,
no breaking changes between minor versions.
Why an open spec?
Imitators ship proprietary protocols and break agents on every release. jMRI is versioned, public, and Apache-2.0.
If we ever stop maintaining it, the spec doesn't go with us.
·
Read the spec on GitHub ↗
Drop-in for Claude Code
One command sets up the config and the hooks.
Run jcodemunch-mcp init and the onboarding pipeline detects your MCP clients,
writes the config, installs the Claude Code hooks and indexes your repo. Every Edit re-indexes the touched file.
Add --guidance and a Read on a large code file suggests symbol retrieval, and each spawned subagent gets a condensed repo briefing.
Add --policy to write the rules into CLAUDE.md, AGENTS.md and the Cursor and Windsurf rules files.
🛡
PreToolUse
Opt-in with init --guidance. Notices Read on large code files in an indexed repo and suggests the index’s outline and symbol tools instead; init --strict makes it block the Read.
🔄
PostToolUse
Auto-reindexes any file the agent edits or writes: the index is never stale across a session.
📂
PreCompact
Generates a session snapshot before context compaction so the next turn picks up with full state.
✅
TaskCompleted
Post-task diagnostics: dead code, untested symbols, dangling references. Surfaced before you ship.
🤖
SubagentStart
Opt-in with init --guidance. Injects a condensed repo orientation into every spawned agent.
⚡
Groq Remote MCP
Cloud-hosted, low-latency option for teams that don't want a local Python runtime: ships with the gcm CLI.
One more thing: the embedding-drift canary.check_embedding_drift pins canary embeddings on first index, then re-checks them periodically. When your provider silently
swaps models (Gemini, OpenAI, bundled ONNX), we catch it before your retrieval quality quietly degrades.
No competitor advertises this. Ours does it by default.
FAQ
Frequently Asked Questions
Common questions about jCodeMunch, jDocMunch, and MCP-based code retrieval.
How is jCodeMunch different from RepoMapper?
Short version: RepoMapper is a ranked repository "map" (great for orientation and "what matters?"), while jCodeMunch is symbol-accurate retrieval (great for "show me the exact code" with tiny token spend). They overlap, but they're optimized for different jobs.
RepoMapper generates a "repo map" that highlights important files/definitions and relationships using Tree-sitter parsing plus a PageRank-like importance ranking. Best for first-pass orientation: "Which files matter for this task?"
jCodeMunch is symbol-first, not file-first: agents search and retrieve functions/classes/methods/constants directly via byte-offset seeking in O(1) time. File reads become the exception, not the default.
Scaling: maps get bigger as repos grow; targeted symbol pulls stay tiny even in massive repos.
If you want a fast, ranked breadcrumb trail across a new codebase, RepoMapper is a solid compass. If you need precise, repeatable, low-token code retrieval for AI agents, jCodeMunch is the right tool.
How does jCodeMunch compare with caveman, Ponytail, RTK and Headroom?
They do different jobs, and you can run all of them together. caveman shortens what the model says back and, since 4.0, compresses noisy logs and data on the way in. Ponytail keeps it from writing more code than the task needs. RTK trims what terminal commands print. Headroom compresses everything flowing into the prompt. jCodeMunch covers the code the agent reads.
Real ones. The more code your agent has to wade through, the more jCodeMunch saves on every lookup, and it answers the questions that matter on a big codebase: who uses this, what breaks if I change it, where to start in code you don’t know. On a handful of files your agent’s built-in search is already quick.
Not sure where yours falls? You have 30 days to find out: the guarantee.
Which MCP clients does jCodeMunch work with?
jCodeMunch works with any client that supports the Model Context Protocol (MCP), including:
Claude Code: Anthropic's CLI for Claude, with native MCP support
Google Antigravity: Google's AI coding agent
Cursor: AI-native code editor
Gemini: Google's AI assistant with MCP integration
Any other MCP-compatible client or custom integration
Setup typically takes under a minute: install the server, add a config entry, and restart. See the README for client-specific instructions.
How do I integrate jCodeMunch with Google Antigravity?
Antigravity uses a standard MCP config file: setup takes about a minute.
Install the server: pip install jcodemunch-mcp
In Antigravity, open the Agent pane → click the ⋮ menu → MCP Servers → Manage MCP Servers
Click View raw config to open mcp_config.json
Add the entry below, save, then restart the MCP server from the Manage MCPs pane
Both env vars are optional. ANTHROPIC_API_KEY enables AI-generated symbol summaries; GITHUB_TOKEN raises GitHub API rate limits and unlocks private repos.
Why not just use a larger context window?
Larger context windows have diminishing returns for code retrieval:
Cost scales linearly: in the demo above, grep-and-read costs about $0.51 a query and jCodeMunch about $0.017, whatever the window size.
Signal-to-noise ratio drops: dumping entire files into context means the AI wades through thousands of irrelevant lines to find the one function it needs. Larger windows amplify the noise problem, they don't solve it.
Latency grows: more input tokens = slower time-to-first-token. Symbol retrieval returns results in milliseconds.
Attention degrades: research shows LLMs struggle with retrieval accuracy as context length increases. The "lost in the middle" effect. Smaller, precise context performs better.
A 1M-token context window doesn't help if you're paying to fill it with code the AI doesn't need. jCodeMunch gives the AI exactly what it asked for.
Can I use jCodeMunch and jDocMunch together?
Absolutely: they're designed as complementary tools. A typical pairing:
jCodeMunch for code retrieval: functions, classes, constants, methods. Any symbol in your codebase.
jDocMunch for documentation retrieval: README sections, API docs, specs, architecture guides.
Together, they give AI agents surgical access to both code and docs without reading entire files. When an agent needs to understand how authentication works, it can search code symbols for the implementation and search doc sections for the design rationale: all with minimal token spend.
Trio bundle pricing (all three tools) is available at all tiers. See pricing below.
How much does jCodeMunch cut the tokens spent reading code?
In benchmarks measured with tiktoken cl100k_base across 15 tasks on 3 real repositories, jCodeMunch retrieved 96.2% fewer tokens on average (26.5x fewer) than a grep-and-read agent: the baseline a competent agent without the tool actually uses.
fastapi/fastapi benchmark: 85,296 tokens (grep-and-read) → 2,556 tokens (symbol retrieval) = 33.4x. Against reading every file it is 322.9x, but nobody pays that ceiling.
Results vary by query type: retrieval of a single function body is near-zero cost, while broader searches return more symbols but still far less than full file reads.
Per-query results range from 7.6x to 77.2x (median 19.1x): no single multiple describes every query.
That’s per lookup, under benchmark conditions. Your mileage depends on your codebase and your work, which is what the 30-day guarantee is for.
Daily intelligence on AI token cost, the tokenmaxxing backlash, and the rise of tokenminimizing, the column jCodeMunch sits in. Updated October 29, 2026.
Choose a single-product license for code, docs, or data, or get all three in a Munch Trio bundle. All licenses are commercial-use licenses for the specified tier.
Save $148 over buying all three separately ($597). $449 one-time, up to 5 developers at one organization, jCodeMunch + jDocMunch + jDataMunch. Card checkout by Stripe.
Save $498 over buying all three separately ($2,997). $2,499 one-time, unlimited internal use in one organization, jCodeMunch + jDocMunch + jDataMunch. Card checkout by Stripe.