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.
What it solves
AI agents typically explore codebases by reading entire files, which wastes tokens and pollutes the context window with irrelevant code. jCodeMunch provides a structured way to retrieve only the specific code symbols (functions, classes, methods, constants) needed for a task, reducing token usage by 95% or more in retrieval-heavy workflows.
How it works
The project indexes a codebase once using tree-sitter AST parsing to store structured symbol metadata and byte offsets. Instead of brute-force reading, agents can query the index to find exact implementations and retrieve only the necessary snippets. It also features a compact wire format called "MUNCH" that further reduces the bytes sent to the agent by interning path prefixes and using a lossless compact encoding.
Who it’s for
Developers using MCP-compatible AI agents and IDEs (such as Claude Code, Cursor, Windsurf, and VS Code) who want to lower AI token costs, increase context accuracy, and speed up repository exploration.
Highlights
- Precision Retrieval: Fetches exact symbol implementations rather than full files.
- Task Orchestration: Tools like
assemble_task_contextandplan_turnallow agents to perform complex retrieval sequences in a single call under a token budget. - Structural Analysis: Provides capabilities native tools lack, such as finding importers, calculating blast radius for changes, and detecting dead code.
- Token Efficiency: Combines AST-based retrieval with a compact output format to maximize context window space.
- Broad Compatibility: Works with any MCP-compatible client and supports over 70 languages via tree-sitter.