MCPcopy
hub / github.com/jgravelle/jcodemunch-mcp

github.com/jgravelle/jcodemunch-mcp @v1.108.94 sqlite

repository ↗ · DeepWiki ↗ · release v1.108.94 ↗
8,125 symbols 33,131 edges 507 files 3,848 documented · 47%
README

jCodeMunch MCP

The leading, most token-efficient MCP server for precise GitHub source code retrieval via tree-sitter AST parsing. Cut AI token costs 95%+ on code exploration — stop burning your context window reading entire files.

Real results, live from production 313B+ tokens saved · 45,000+ developers · $1.58M+ in AI spend avoided · 37,500+ kg CO₂ prevented Live telemetry at jcodemunch.com — benchmark: 95% average token reduction (15 tasks / 3 repos, 99.8% peak).

Works with Claude Code, Cursor, VS Code, Codex CLI, Continue, Windsurf, and any MCP-compatible client.


One-click installs:

Install in VS Code Install in VS Code Insiders Install in Cursor Claude Code Codex CLI

Prefer the command line?

pip install jcodemunch-mcp
uvx jcodemunch-mcp

For pinned/B2B deployments that want a version-stable install channel independent of PyPI, install straight from the repo (requires git, builds from source):

pip install git+https://github.com/jgravelle/jcodemunch-mcp.git
uvx --from git+https://github.com/jgravelle/jcodemunch-mcp.git jcodemunch-mcp

Quickstart - https://github.com/jgravelle/jcodemunch-mcp/blob/main/QUICKSTART.md

A crapload of detailed info: http://jcodemunch.com/

Live OSS code-health observatory — weekly six-axis health snapshots of Express, FastAPI, Gin, Pydantic, Django, Flask, NestJS, Cobra, and this very repo: https://jgravelle.github.io/jcodemunch-observatory/

Token Cost Radar — daily intelligence on AI token costs, minimization strategies, and budget trends for teams running Claude Code / Cursor / MCP: https://jcodemunch.com/radar/

FREE FOR PERSONAL USE

Use it to make money, and Uncle J. gets a taste. Fair enough? details

Our guarantee: If jCodeMunch doesn't pay for itself, you don't pay for jCodeMunch!


Cut code-reading token usage by 95% or more with precise symbol retrieval

Most AI agents explore repositories the expensive way:

open entire files → skim thousands of irrelevant lines → repeat.

That is not “a little inefficient.” That is a token incinerator.

jCodeMunch indexes a codebase once and lets agents retrieve only the exact code they need: functions, classes, methods, constants, outlines, and tightly scoped context bundles, with byte-level precision.

In retrieval-heavy workflows, that routinely cuts code-reading token usage by 95%+ because the agent stops brute-reading giant files just to find one useful implementation.

Task Traditional approach With jCodeMunch
Find a function Open and scan large files Search symbol → fetch exact implementation
Understand a module Read broad file regions Pull only relevant symbols and imports
Explore repo structure Traverse file after file Query outlines, trees, and targeted bundles

Index once. Query cheaply. Keep moving. Precision context beats brute-force context.


Documentation

Doc What it covers
QUICKSTART.md Zero-to-indexed in three steps
USER_GUIDE.md Full tool reference, workflows, and best practices
AGENT_HOOKS.md Agent hooks and prompt policies
CONFIGURATION.md JSONC config file reference, migration from env vars
GROQ.md Groq Remote MCP integration, deployment, gcm CLI
HEADLESS.md Using jCodeMunch with claude -p (and the jragmunch CLI)
ARCHITECTURE.md Internal design, storage model, and extension points
LANGUAGE_SUPPORT.md Supported languages and parsing details
CONTEXT_PROVIDERS.md dbt, Git, and custom context provider docs
TROUBLESHOOTING.md Common issues and fixes
AGENT_INSTALL_UNIVERSAL.md Paste-and-go prompt for installing jCodemunch guidance into agent/IDE clients without a first-class jcm install target (Codex CLI, Cline, JetBrains AI, Aider, etc.). For Claude Code, Cursor, Windsurf, Continue — use jcm install <client> instead.

Compact output — the second token axis (MUNCH)

Retrieval decides what to send. MUNCH decides how to pack it.

Every tool response can be emitted in a purpose-built compact wire format instead of verbose JSON. Path prefixes are interned to short handles, homogeneous lists of dicts pack into single-character-tagged CSV rows, and per-column types are preserved so the decode is lossless.

# any tool call accepts format=
find_references(identifier="get_user", format="auto")
# auto  — emit compact if savings ≥ 15%, otherwise JSON
# compact — always compact
# json    — never compact (back-compat passthrough)

Benchmark (v1.56.0): median 45.5% bytes saved across 6 representative tools, peaks at 55.4% on graph and outline responses. Full spec in SPEC_MUNCH.md; numbers and harness in TOKEN_SAVINGS.md.

Encoding savings stack on top of retrieval savings — every byte off the wire is a byte the agent doesn't pay to read.


Structured code retrieval for serious AI agents

What's new

  • v1.108.94 (2026-07-02) — New tool: index_dependency (index the libraries a repo actually uses)
  • v1.108.93 (2026-07-02) — Upstream exposure links (get_endpoint_impact include_infra exposes)
  • v1.108.92 (2026-07-02) — Progress-notification flood control + response drain (#359)

License MCP Local-first Polyglot jMRI DOI PyPI version PyPI - Python Version


Mentioned by

Full recognition page →


Commercial licenses

jCodeMunch-MCP is free for non-commercial use.

Commercial use requires a paid license.

jCodeMunch-only licenses

Want the full jMunch suite (code + docs + data)?

Stop paying your model to read the whole damn file.

jCodeMunch turns repo exploration into structured retrieval.

Instead of forcing an agent to open giant files, wade through imports, boilerplate, comments, helpers, and unrelated code, jCodeMunch lets it navigate by what the code is and retrieve only what matters.

That means:

  • 95%+ lower code-reading token usage in many retrieval-heavy workflows
  • less irrelevant context polluting the prompt
  • faster repo exploration
  • more accurate code lookup
  • less repeated file-scanning nonsense

It indexes your codebase once using tree-sitter, stores structured symbol metadata plus byte offsets into the original source, and retrieves exact implementations on demand instead of re-reading entire files over and over.

Recent releases have made that retrieval workflow sharper and more useful in real engineering work, with BM25-based symbol search, fuzzy matching, semantic/hybrid search (opt-in, zero mandatory dependencies), query-driven token-budgeted context assembly (get_ranked_context), dead code detection (find_dead_code), untested symbol detection (get_untested_symbols), git-diff-to-symbol mapping (get_changed_symbols), architectural centrality ranking (get_symbol_importance, PageRank), cold-start orientation maps (get_repo_map — query-less, token-budgeted, signature-only repo overview ranked by PageRank), consolidation candidate detection (find_similar_symbols — multi-signal duplicate finder blending semantic embeddings, structural signature, and behavioral callee Jaccard; union-find clustering with verdict tiers and PageRank-based canonical-pick), cross-repo API contract surfacing (get_group_contracts — group of indexed repos in, ranked shared-symbol contracts out, each classified as de_facto_api / leaky_internal / dead_contract / version_skew with stability + breaking-change history + runtime hits), concrete-implementation discovery (find_implementations — multi-source resolution across LSP dispatch / class hierarchy / duck-typed / decorator-handler with confidence scoring), deletion preflight (check_delete_safe — composite verdict from importers + references + dead-code + runtime evidence + entry-point heuristics, with ranked blockers and recommended action), edit-safety preflight (check_edit_safe — the companion that answers "can I modify this," fusing signature impact, cyclomatic complexity, test-coverage presence, and runtime traffic into a verdict + recommended action), task-aware single-call context orchestration (assemble_task_context — natural-language task in, source-attributed context capsule out; auto-classifies into one of six intents with explainable keyword matching, auto-extracts anchor symbols from the task, runs the intent-appropriate sub-tool sequence end-to-end under one token budget), blast-radius depth scoring with source snippets, context bundles with token budgets, AST-derived call graphs and call hierarchy traversal, decorator-aware search and filtering, hotspot detection (complexity x churn), dependency cycles and coupling metrics, session-aware routing (plan_turn, turn budgets, negative evidence), agent config auditing, complexity-based model routing (Agent Selector), enforcement hooks (PreToolUse/PostToolUse/PreCompact), dependency graphs, class hierarchy traversal, multi-symbol bundles, live watch-based reindexing, automatic Claude Code worktree discovery (watch-claude), registry-wide auto-reindexing with one-command login-service install (watch-all + watch-install / watch-uninstall / watch-status; also exposed as MCP tool get_watch_status), auto-watch on demand (when watch: true in config, the server automatically indexes and watches any repo a tool is called against — ensuring fresh results from the first call), trusted-folder access controls, edit-ready refactoring plans (plan_refactoring) for rename, move, extract, and signature change operations, symbol provenance archaeology (get_symbol_provenance — full git lineage, semantic commit classification, evolution narrative), unified PR risk profiling (get_pr_risk_profile — composite risk score fusing blast radius

Extension points exported contracts — how you extend this code

AxisScores (Interface)
(no doc)
vscode-extension/src/riskGutter.ts
User (Interface)
(no doc)
tests/fixtures/typescript/sample.ts
RiskInfo (Interface)
(no doc)
vscode-extension/src/riskGutter.ts
SymbolRisk (Interface)
(no doc)
vscode-extension/src/riskGutter.ts
FileMetrics (Interface)
(no doc)
vscode-extension/src/riskGutter.ts
FileRiskResponse (Interface)
(no doc)
vscode-extension/src/riskGutter.ts

Core symbols most depended-on inside this repo

get
called by 2404
src/jcodemunch_mcp/runtime/http_routes.py
get
called by 1273
src/jcodemunch_mcp/server.py
clear
called by 363
src/jcodemunch_mcp/tools/session_state.py
index_folder
called by 327
src/jcodemunch_mcp/tools/index_folder.py
parse_file
called by 294
src/jcodemunch_mcp/parser/extractor.py
get
called by 264
src/jcodemunch_mcp/storage/embedding_store.py
add
called by 247
src/jcodemunch_mcp/storage/token_tracker.py
update
called by 220
src/jcodemunch_mcp/progress.py

Shape

Method 3,582
Function 3,548
Class 943
Route 45
Interface 6
Struct 1

Languages

Python99%
TypeScript1%
Java1%
Go1%

Modules by API surface

src/jcodemunch_mcp/parser/extractor.py181 symbols
tests/test_config.py150 symbols
tests/test_plan_refactoring.py137 symbols
tests/test_watcher_serve.py115 symbols
tests/test_find_importers.py103 symbols
tests/test_security.py91 symbols
src/jcodemunch_mcp/server.py89 symbols
tests/test_project_intel.py82 symbols
tests/test_summarizer.py80 symbols
tests/test_cross_repo.py80 symbols
tests/test_laravel_provider.py77 symbols
tests/test_server.py74 symbols

Dependencies from manifests, versioned

@types/node20.0.0 · 1×
@types/vscode1.85.0 · 1×
typescript5.3.0 · 1×
faiss-cpu1.7.0 · 1×
httpx0.27.0 · 1×
langchain0.3.0 · 1×
langchain-community0.3.0 · 1×
langchain-huggingface0.1.0 · 1×
langchain-text-splitters0.3.0 · 1×
pathspec0.12.0 · 1×
pyyaml6.0 · 1×

Datastores touched

mydbDatabase · 1 repos

For agents

$ claude mcp add jcodemunch-mcp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact