jgravelle/jcodemunch-mcp
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
2,518 ★337 forksPythonUpdated 21h ago
What you need to know
Token-efficient MCP server for precise source code retrieval via tree-sitter AST parsing. It indexes a codebase once and serves exact symbol implementations (functions, classes, outlines) instead of whole files, cutting code-reading tokens 86-99% (benchmarked 27.9x fewer tokens than a grep-and-read agent).
Install
pip install jcodemunch-mcp jcodemunch-mcp init pipx install jcodemunch-mcp or uv tool install jcodemunch-mcp (Ubuntu 24.04+/Debian 12+, PEP 668)
Usage
- •Run `jcodemunch-mcp init` to auto-detect MCP clients (Claude Code, Claude Desktop, Cursor, Windsurf, Continue), write config entries, and install the prompt policy
- •Add to CLAUDE.md: 'Call the jcodemunch_guide tool and strictly follow its instructions.'
- •Ask the agent to index the repo, then use search_symbols and get_symbol_source; verify with get_session_stats
- •Manual Claude Code: pip install jcodemunch-mcp; claude mcp add -s user jcodemunch jcodemunch-mcp
Key features
- ✓90+ tools: search_symbols, get_symbol_source, get_file_outline, find_importers, get_blast_radius, get_call_hierarchy, find_dead_code, get_hotspots, search_ast
- ✓assemble_task_context and plan_turn scope a whole task's context under one token budget
- ✓Preflight tools: check_edit_safe, check_delete_safe, get_pr_risk_profile, plan_refactoring with edit-ready {old_text, new_text} blocks
- ✓MUNCH compact wire encoding trims a median 45.5% more bytes off responses
- ✓70+ languages via tree-sitter; monorepo support with incremental indexing; watch modes and agent hooks keep the index fresh
Best for
Large repositories, unfamiliar codebases, agent-driven exploration, refactoring and impact analysis, and teams cutting AI token costs without making agents dumber.
Caveats
- ⚠Free for personal/non-commercial use; commercial use requires a paid one-time license (jCodeMunch-only Builder $79 / Studio $349 / Platform $1,999)
- ⚠Edits that genuinely require the entire file (restructuring file-level state, reordering logic across hundreds of lines) see no advantage
- ⚠Local-first: indexes live at ~/.code-index/; base package's only default network behavior is an anonymous savings counter (opt out with share_savings: false)
- ⚠Installation makes tools available but does not break the agent's brute-reading habit — the prompt policy matters
Clients: Claude Code · Claude Desktop · Cursor · Windsurf · Continue · VS Code · Codex CLI · Zed · Cline · Goose · Gemini CLI · Qwen Code · Kiro · Antigravity
Documentation ↗Reviewed 2026-08-07
Topics
ai-codingai-toolsastclaudeclaude-codecode-intelligencecode-retrievalcontext-windowcursordeveloper-toolsgithubllmmcpmcp-servermodel-context-protocolstructured-retrievaltoken-efficienttoken-optimizationtoken-savingstree-sitter
- Stars
- 2,518★
- Forks
- 337
- Language
- Python
- License
- NOASSERTION
- Created
- 2026-02-09
- Last push
- 2026-08-06