
Connects to your local codebase via tree-sitter AST parsing and exposes precise retrieval tools: fetch individual functions, classes, or methods by name instead of reading entire files. Supports 25+ languages and cuts token usage by 95%+ in retrieval-heavy workflows because your agent stops scanning thousands of irrelevant lines. Index once with stdio transport, then query symbols, outlines, references, and scoped context bundles with byte-level precision. Ships with a compact wire format (MUNCH) that shrinks responses by another 45% median. Reach for this when your agent burns tokens opening giant files just to find one implementation, or when you need structured code navigation without the brute-force tax.
claude mcp add jcodemunch-mcp -- uvx jcodemunch-mcpRun in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.
Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.
Verified live against the running server on Jun 10, 2026.
index_repoIndex a GitHub repository's source code. Fetches files, parses ASTs, extracts symbols, and saves to local storage. Set JCODEMUNCH_USE_AI_SUMMARIES=false to disable AI summaries globally.4 paramsIndex a GitHub repository's source code. Fetches files, parses ASTs, extracts symbols, and saves to local storage. Set JCODEMUNCH_USE_AI_SUMMARIES=false to disable AI summaries globally.
extra_ignore_patternsarrayincrementalbooleanurl*stringuse_ai_summariesbooleanindex_folderIndex a local folder of source code. Response surfaces `discovery_skip_counts` and `no_symbols_files` for diagnosing missing files.7 paramsIndex a local folder of source code. Response surfaces `discovery_skip_counts` and `no_symbols_files` for diagnosing missing files.
extra_ignore_patternsarrayfollow_symlinksbooleanidentity_modestringconfig · local · gitdefault: configincrementalbooleanpath*stringpathsarrayuse_ai_summariesbooleansummarize_repoRe-run AI summarization on all symbols in an existing index. Use this when index_folder completed but AI summaries are missing — e.g., the background summarization thread was interrupted, AI was disabled at index time, or the summarizer provider wasn't configured yet. With for...2 paramsRe-run AI summarization on all symbols in an existing index. Use this when index_folder completed but AI summaries are missing — e.g., the background summarization thread was interrupted, AI was disabled at index time, or the summarizer provider wasn't configured yet. With for...
forcebooleanrepo*stringindex_fileIndex a single file within an existing index. Surgical update after edits. The file must be under an already-indexed folder's source_root. Can also add new files.3 paramsIndex a single file within an existing index. Surgical update after edits. The file must be under an already-indexed folder's source_root. Can also add new files.
context_providersbooleanpath*stringuse_ai_summariesbooleanimport_runtime_signalIngest a runtime trace file into the runtime_* tables for the target repo. source='otel' takes OTel JSON / JSON-Lines / .gz and maps spans via (file_path, line_no, function_name); source='sql_log' takes pg_stat_statements CSV or a generic SQL JSON-Lines log and maps queries vi...4 paramsIngest a runtime trace file into the runtime_* tables for the target repo. source='otel' takes OTel JSON / JSON-Lines / .gz and maps spans via (file_path, line_no, function_name); source='sql_log' takes pg_stat_statements CSV or a generic SQL JSON-Lines log and maps queries vi...
path*stringredact_enabledbooleanrepostringsourcestringotel · sql_log · stack_log · apmdefault: otelget_runtime_coverageRuntime coverage histogram for a repo or a single file: count of indexed symbols with vs without runtime evidence, plus the diagnostic list of unmapped runtime spans (likely reflective dispatch the AST missed). Pairs with Phase 2's per-result _runtime_confidence stamping. Retu...3 paramsRuntime coverage histogram for a repo or a single file: count of indexed symbols with vs without runtime evidence, plus the diagnostic list of unmapped runtime spans (likely reflective dispatch the AST missed). Pairs with Phase 2's per-result _runtime_confidence stamping. Retu...
file_pathstringrepo*stringunmapped_limitintegerfind_hot_pathsTop-N symbols ranked by total runtime hit count across ingested traces, with per-symbol p50/p95 latency, sources contributing, and last_seen. Optionally filtered by a name substring. Pairs with get_blast_radius to answer 'is this PR touching code that runs 4M times/day?' Retur...3 paramsTop-N symbols ranked by total runtime hit count across ingested traces, with per-symbol p50/p95 latency, sources contributing, and last_seen. Optionally filtered by a name substring. Pairs with get_blast_radius to answer 'is this PR touching code that runs 4M times/day?' Retur...
querystringrepo*stringtop_nintegerfind_unused_pathsSymbols with zero (or stale) runtime hits over the look-back window. Distinct from find_dead_code: this surfaces code that's reachable on paper but never executed — only possible to detect with runtime data. Excludes test files and entry-point filenames by default. Returns an...5 paramsSymbols with zero (or stale) runtime hits over the look-back window. Distinct from find_dead_code: this surfaces code that's reachable on paper but never executed — only possible to detect with runtime data. Excludes test files and entry-point filenames by default. Returns an...
include_entry_pointsbooleaninclude_testsbooleanmax_resultsintegerrepo*stringsince_daysintegerget_redaction_logPer-pattern PII redaction counts from runtime_redaction_log. Operators run this to verify the redaction chokepoint is firing on production traffic — covers the OTel / SQL / stack ingest paths (file-based or HTTP live-ingest, Phase 6). Returns {patterns: [{source, pattern, coun...3 paramsPer-pattern PII redaction counts from runtime_redaction_log. Operators run this to verify the redaction chokepoint is firing on production traffic — covers the OTel / SQL / stack ingest paths (file-based or HTTP live-ingest, Phase 6). Returns {patterns: [{source, pattern, coun...
repo*stringsince_daysintegersourcestringotel · sql_log · stack_log · apmlist_reposList all indexed repositories. START HERE before using Grep/Read/search tools — check if the project is already indexed, then use search_symbols / get_symbol_source instead of native file reads. If jcodemunch tools appear as deferred in your tool list, call ToolSearch to load...List all indexed repositories. START HERE before using Grep/Read/search tools — check if the project is already indexed, then use search_symbols / get_symbol_source instead of native file reads. If jcodemunch tools appear as deferred in your tool list, call ToolSearch to load...
No parameters — call it with no arguments.
get_watch_statusReport watch-all daemon coverage: every locally-indexed repo, each repo's staleness / reindex-in-progress state, and the OS-level service status. Call before relying on index freshness when you suspect files may have changed since the last index.Report watch-all daemon coverage: every locally-indexed repo, each repo's staleness / reindex-in-progress state, and the OS-level service status. Call before relying on index freshness when you suspect files may have changed since the last index.
No parameters — call it with no arguments.
resolve_repoResolve a filesystem path to its indexed repo identifier. O(1) lookup — faster than list_repos for finding a single repo. Accepts repo root, worktree, subdirectory, or file path.1 paramsResolve a filesystem path to its indexed repo identifier. O(1) lookup — faster than list_repos for finding a single repo. Accepts repo root, worktree, subdirectory, or file path.
path*stringget_file_treeGet the file tree of an indexed repository, optionally filtered by path prefix. Results are capped at max_files (default 500) to prevent token overflow; use path_prefix to scope large trees.4 paramsGet the file tree of an indexed repository, optionally filtered by path prefix. Results are capped at max_files (default 500) to prevent token overflow; use path_prefix to scope large trees.
include_summariesbooleanmax_filesintegerpath_prefixstringrepo*stringget_file_outlineGet all symbols (functions, classes, methods) in a file with full signatures (including parameter names) and summaries. Use signatures to review naming at parameter granularity without reading the full file. Pass repo and file_path (e.g. 'src/main.py').3 paramsGet all symbols (functions, classes, methods) in a file with full signatures (including parameter names) and summaries. Use signatures to review naming at parameter granularity without reading the full file. Pass repo and file_path (e.g. 'src/main.py').
file_pathstringfile_pathsarrayrepo*stringget_symbol_sourceGet full source of one symbol (symbol_id → flat object) or many (symbol_ids[] → {symbols, errors}). Supports verify, context_lines, and fqn (PHP FQN via PSR-4).6 paramsGet full source of one symbol (symbol_id → flat object) or many (symbol_ids[] → {symbols, errors}). Supports verify, context_lines, and fqn (PHP FQN via PSR-4).
context_linesintegerfqnstringrepo*stringsymbol_idstringsymbol_idsarrayverifybooleanget_file_contentGet cached source for a file, optionally sliced to a line range.4 paramsGet cached source for a file, optionally sliced to a line range.
end_lineintegerfile_path*stringrepo*stringstart_lineintegersearch_symbolsSearch for symbols matching a query across the entire indexed repository. Returns matches with signatures and summaries.19 paramsSearch for symbols matching a query across the entire indexed repository. Returns matches with signatures and summaries.
debugbooleandecoratorstringdetail_levelstringcompact · standard · fulldefault: standardfile_patternstringfqnstringfusionbooleanfuzzybooleanfuzzy_thresholdnumberkindstringfunction · class · method · constant · type · templatelanguagestringada · al · ansible · apex · arduino · asmmax_edit_distanceintegermax_resultsintegerquery*stringrepo*stringsemanticbooleansemantic_onlybooleansemantic_weightnumbersort_bystringrelevance · centrality · combineddefault: relevancetoken_budgetintegerinvalidate_cacheDelete the index and cached files for a repository. Forces a full re-index on next index_repo or index_folder call.1 paramsDelete the index and cached files for a repository. Forces a full re-index on next index_repo or index_folder call.
repo*stringsearch_textFull-text search across indexed file contents. Useful when symbol search misses (e.g., string literals, comments, config values). Supports regex (is_regex=true) and context lines around matches (context_lines=N, like grep -C).6 paramsFull-text search across indexed file contents. Useful when symbol search misses (e.g., string literals, comments, config values). Supports regex (is_regex=true) and context lines around matches (context_lines=N, like grep -C).
context_linesintegerfile_patternstringis_regexbooleanmax_resultsintegerquery*stringrepo*stringget_repo_outlineGet a high-level overview of an indexed repository: directories, file counts, language breakdown, symbol counts. Lighter than get_file_tree.1 paramsGet a high-level overview of an indexed repository: directories, file counts, language breakdown, symbol counts. Lighter than get_file_tree.
repo*stringfind_importersFind all files that import a given file. Answers 'what uses this file?'. has_importers=false on a result means that importer is itself unreachable (dead code chain). Supports dbt {{ ref() }} edges. Use file_paths for batch queries. Set cross_repo=true to also find importers in...5 paramsFind all files that import a given file. Answers 'what uses this file?'. has_importers=false on a result means that importer is itself unreachable (dead code chain). Supports dbt {{ ref() }} edges. Use file_paths for batch queries. Set cross_repo=true to also find importers in...
cross_repobooleanfile_pathstringfile_pathsarraymax_resultsintegerrepo*stringfind_referencesFind all files that import or reference an identifier via the import graph. Answers 'where is this imported / re-exported?'. SCOPE: import sites + dbt `{{ ref() }}` edges + (when `include_call_chain=true`) symbols whose bodies textually mention the identifier. Does NOT exhaust...5 paramsFind all files that import or reference an identifier via the import graph. Answers 'where is this imported / re-exported?'. SCOPE: import sites + dbt `{{ ref() }}` edges + (when `include_call_chain=true`) symbols whose bodies textually mention the identifier. Does NOT exhaust...
identifierstringidentifiersarrayinclude_call_chainbooleanmax_resultsintegerrepo*stringcheck_referencesCheck if an identifier is referenced anywhere: imports + file content. Combines find_references and search_text into one call. Returns is_referenced (bool) for quick dead-code detection. Accepts multiple identifiers in one call via identifiers param.5 paramsCheck if an identifier is referenced anywhere: imports + file content. Combines find_references and search_text into one call. Returns is_referenced (bool) for quick dead-code detection. Accepts multiple identifiers in one call via identifiers param.
identifierstringidentifiersarraymax_content_resultsintegerrepo*stringsearch_contentbooleansearch_columnsSearch column metadata across indexed models. Works with any ecosystem provider that emits column data (dbt, SQLMesh, database catalogs, etc.). Returns model name, file path, column name, and description. Use instead of grep/search_text for column discovery — 77% fewer tokens.4 paramsSearch column metadata across indexed models. Works with any ecosystem provider that emits column data (dbt, SQLMesh, database catalogs, etc.). Returns model name, file path, column name, and description. Use instead of grep/search_text for column discovery — 77% fewer tokens.
max_resultsintegermodel_patternstringquery*stringrepo*stringget_context_bundleGet full source + imports for one or more symbols in one call. Multi-symbol bundles deduplicate shared imports. Set token_budget to cap response size; use budget_strategy to control what's kept. Supports fqn (PHP FQN via PSR-4) as alternative to symbol_id.9 paramsGet full source + imports for one or more symbols in one call. Multi-symbol bundles deduplicate shared imports. Set token_budget to cap response size; use budget_strategy to control what's kept. Supports fqn (PHP FQN via PSR-4) as alternative to symbol_id.
budget_strategystringmost_relevant · core_first · compactdefault: most_relevantfqnstringinclude_budget_reportbooleaninclude_callersbooleanoutput_formatstringjson · markdowndefault: jsonrepo*stringsymbol_idstringsymbol_idsarraytoken_budgetintegerget_session_statsGet token savings stats for the current MCP session. Returns tokens saved and cost avoided (this session and all-time), per-tool breakdown, session duration, and cumulative totals. Use to see how much jCodeMunch has saved you.Get token savings stats for the current MCP session. Returns tokens saved and cost avoided (this session and all-time), per-tool breakdown, session duration, and cumulative totals. Use to see how much jCodeMunch has saved you.
No parameters — call it with no arguments.
analyze_perfPer-tool latency telemetry: p50/p95/max in ms, error rate, plus cache hit-rate by tool. Defaults to the in-memory session ring; pass window=1h|24h|7d|all to query persisted telemetry.db (requires perf_telemetry_enabled). Useful for finding slow tools, cold caches, and regressi...5 paramsPer-tool latency telemetry: p50/p95/max in ms, error rate, plus cache hit-rate by tool. Defaults to the in-memory session ring; pass window=1h|24h|7d|all to query persisted telemetry.db (requires perf_telemetry_enabled). Useful for finding slow tools, cold caches, and regressi...
compare_releasestringledgerbooleantoolstringtopintegerwindowstringsession · 1h · 24h · 7d · alldefault: sessioncheck_embedding_driftPin (or re-check) a 16-string canary against the active embedding provider. On first run with capture=True (or force=True), embeds CANARY_STRINGS and persists the vectors to ~/.code-index/embed_canary.json. Subsequent calls re-embed those strings and report cosine drift; alarm...3 paramsPin (or re-check) a 16-string canary against the active embedding provider. On first run with capture=True (or force=True), embeds CANARY_STRINGS and persists the vectors to ~/.code-index/embed_canary.json. Subsequent calls re-embed those strings and report cosine drift; alarm...
capturebooleanforcebooleanthresholdnumbertune_weightsLearn per-repo retrieval weights from the v1.78.0 ranking ledger. Computes confidence correlations for the semantic and identity-match channels and writes overrides to ~/.code-index/tuning.jsonc. search_symbols reads those overrides at query time when the caller doesn't pass a...4 paramsLearn per-repo retrieval weights from the v1.78.0 ranking ledger. Computes confidence correlations for the semantic and identity-match channels and writes overrides to ~/.code-index/tuning.jsonc. search_symbols reads those overrides at query time when the caller doesn't pass a...
dry_runbooleanexplainbooleanmin_eventsintegerrepostringget_session_contextGet the current session context — files accessed, searches performed, and edits registered during this MCP session. Use to avoid re-reading the same files.2 paramsGet the current session context — files accessed, searches performed, and edits registered during this MCP session. Use to avoid re-reading the same files.
max_filesintegermax_queriesintegerget_session_snapshotGet a compact session snapshot for context continuity. Returns a ~200 token markdown summary of files explored, edits made, searches performed, and dead ends. Designed for injection after context compaction to restore session orientation.4 paramsGet a compact session snapshot for context continuity. Returns a ~200 token markdown summary of files explored, edits made, searches performed, and dead ends. Designed for injection after context compaction to restore session orientation.
include_negative_evidencebooleanmax_editsintegermax_filesintegermax_searchesintegerget_file_riskPer-symbol composite risk for one file. For each function or method, returns a 0-100 composite score (higher = healthier; lower = riskier) plus per-axis sub-scores (complexity, exposure, churn, test_gap). Powers the VS Code risk-density gutter. complexity is per-symbol (cyclom...2 paramsPer-symbol composite risk for one file. For each function or method, returns a 0-100 composite score (higher = healthier; lower = riskier) plus per-axis sub-scores (complexity, exposure, churn, test_gap). Powers the VS Code risk-density gutter. complexity is per-symbol (cyclom...
file_path*stringrepo*stringdiff_health_radarCompare two health-radar payloads (from get_repo_health.radar) and return axis-by-axis deltas, composite delta, grade movement, and a one-line verdict. Pure data transform — no index access, no I/O. Designed for PR-time diff-grade reports: run get_repo_health on the base branc...2 paramsCompare two health-radar payloads (from get_repo_health.radar) and return axis-by-axis deltas, composite delta, grade movement, and a one-line verdict. Pure data transform — no index access, no I/O. Designed for PR-time diff-grade reports: run get_repo_health on the base branc...
baseline*objectcurrent*objectdigestAgent stand-up briefing for a repo. Returns a tight (~200 token) markdown digest of (a) what changed since the agent's last session (by tracking git HEAD between calls), (b) the current risk surface (top hotspots by complexity × churn), and (c) dead-code candidates. Each item...5 paramsAgent stand-up briefing for a repo. Returns a tight (~200 token) markdown digest of (a) what changed since the agent's last session (by tracking git HEAD between calls), (b) the current risk surface (top hotspots by complexity × churn), and (c) dead-code candidates. Each item...
max_changed_filesintegermax_dead_codeintegermax_hotspotsintegerrepo*stringsince_shastringplan_turnPlan the next turn by analyzing query against the codebase. Returns confidence level (high/medium/low), recommended symbols/files, and guidance. Use as opening move for any task.4 paramsPlan the next turn by analyzing query against the codebase. Returns confidence level (high/medium/low), recommended symbols/files, and guidance. Use as opening move for any task.
max_recommendedintegermodelstringquery*stringrepo*stringregister_editRegister file edits to invalidate caches. Call after editing files to clear BM25 cache and search result cache for the repo.3 paramsRegister file edits to invalidate caches. Call after editing files to clear BM25 cache and search result cache for the repo.
file_paths*arrayreindexbooleanrepo*stringaudit_agent_configAudit agent configuration files (CLAUDE.md, .cursorrules, copilot-instructions.md, etc.) for token waste. Reports per-file token cost, stale symbol references, dead file paths, redundancy between global and project configs, bloat patterns, and scope leaks. Cross-references aga...2 paramsAudit agent configuration files (CLAUDE.md, .cursorrules, copilot-instructions.md, etc.) for token waste. Reports per-file token cost, stale symbol references, dead file paths, redundancy between global and project configs, bloat patterns, and scope leaks. Cross-references aga...
project_pathstringrepostringget_dependency_graphGet the file-level dependency graph for a given file. Traverses import relationships up to 3 hops. Use to understand what a file depends on ('imports'), what depends on it ('importers'), or both. Prerequisite for blast radius analysis. Set cross_repo=true to include cross-repo...5 paramsGet the file-level dependency graph for a given file. Traverses import relationships up to 3 hops. Use to understand what a file depends on ('imports'), what depends on it ('importers'), or both. Prerequisite for blast radius analysis. Set cross_repo=true to include cross-repo...
cross_repobooleandepthintegerdirectionstringimports · importers · bothdefault: importsfile*stringrepo*stringget_symbol_diffDiff symbol sets between two indexed snapshots. Shows added, removed, and changed symbols. Branch workflow: index branch A as repo-main, index branch B as repo-feature, then diff.2 paramsDiff symbol sets between two indexed snapshots. Shows added, removed, and changed symbols. Branch workflow: index branch A as repo-main, index branch B as repo-feature, then diff.
repo_a*stringrepo_b*stringget_class_hierarchyGet the full inheritance hierarchy for a class: ancestors (base classes via extends/implements) and descendants (subclasses/implementors). Works across Python, Java, TypeScript, C#, and any language where class signatures contain 'extends' or 'implements'.2 paramsGet the full inheritance hierarchy for a class: ancestors (base classes via extends/implements) and descendants (subclasses/implementors). Works across Python, Java, TypeScript, C#, and any language where class signatures contain 'extends' or 'implements'.
class_name*stringrepo*stringget_related_symbolsFind symbols related to a given symbol using heuristic clustering: same-file co-location (weight 3), shared importers (weight 1.5), and name-token overlap (weight 0.5/token). Useful for discovering what else to read when exploring an unfamiliar codebase.3 paramsFind symbols related to a given symbol using heuristic clustering: same-file co-location (weight 3), shared importers (weight 1.5), and name-token overlap (weight 0.5/token). Useful for discovering what else to read when exploring an unfamiliar codebase.
max_resultsintegerrepo*stringsymbol_id*stringsuggest_queriesSuggest search queries, entry-point files, and index stats. Good first call on an unfamiliar repo — surfaces most-imported files, top keywords, and ready-to-run example queries.1 paramsSuggest search queries, entry-point files, and index stats. Good first call on an unfamiliar repo — surfaces most-imported files, top keywords, and ready-to-run example queries.
repo*stringget_blast_radiusFind all files affected by changing a symbol. Returns confirmed files (import + name match) and potential files (import only, e.g. wildcard). Use before renaming or deleting a symbol. Set cross_repo=true to also find consumers in other indexed repos. Set include_source=true to...10 paramsFind all files affected by changing a symbol. Returns confirmed files (import + name match) and potential files (import only, e.g. wildcard). Use before renaming or deleting a symbol. Set cross_repo=true to also find consumers in other indexed repos. Set include_source=true to...
call_depthintegercross_repobooleandecorator_filterstringdepthintegerfqnstringinclude_depth_scoresbooleaninclude_sourcebooleanrepo*stringsource_budgetintegersymbol*stringget_call_hierarchyReturn incoming callers and outgoing callees for a symbol, N levels deep. Uses AST-derived call detection: callers = symbols in importing files that mention this name; callees = imported symbols mentioned in this symbol's body. Useful for understanding how a symbol fits into t...4 paramsReturn incoming callers and outgoing callees for a symbol, N levels deep. Uses AST-derived call detection: callers = symbols in importing files that mention this name; callees = imported symbols mentioned in this symbol's body. Useful for understanding how a symbol fits into t...
depthintegerdirectionstringcallers · callees · bothdefault: bothrepo*stringsymbol_id*stringget_impact_previewShow what breaks if a symbol is removed or renamed. Walks the call graph transitively to find every symbol that calls this one, returning affected symbols grouped by file with call-chain paths. Use this before deleting or renaming a symbol to understand full impact. For a stru...2 paramsShow what breaks if a symbol is removed or renamed. Walks the call graph transitively to find every symbol that calls this one, returning affected symbols grouped by file with call-chain paths. Use this before deleting or renaming a symbol to understand full impact. For a stru...
repo*stringsymbol_id*stringget_symbol_provenanceTrace the complete authorship lineage and evolution narrative of a symbol through git history. Returns every commit that touched the symbol (or its file), classified into semantic categories (creation, bugfix, refactor, feature, perf, rename, revert, etc.) with extracted commi...3 paramsTrace the complete authorship lineage and evolution narrative of a symbol through git history. Returns every commit that touched the symbol (or its file), classified into semantic categories (creation, bugfix, refactor, feature, perf, rename, revert, etc.) with extracted commi...
max_commitsintegerrepo*stringsymbol*stringget_pr_risk_profileProduce a unified risk assessment for all changes between two git refs (branch, PR, or SHA range). Fuses five signals — blast radius, complexity, churn, test gaps, and change volume — into a single composite risk_score (0.0–1.0) with actionable recommendations. Returns the top...4 paramsProduce a unified risk assessment for all changes between two git refs (branch, PR, or SHA range). Fuses five signals — blast radius, complexity, churn, test gaps, and change volume — into a single composite risk_score (0.0–1.0) with actionable recommendations. Returns the top...
base_refstringdaysintegerhead_refstringrepo*stringget_dependency_cyclesDetect circular import chains in a repository. Returns every strongly-connected component (set of files that mutually import each other, directly or transitively). Run this to identify architectural problems before a refactor, or to understand why a module is hard to test in i...1 paramsDetect circular import chains in a repository. Returns every strongly-connected component (set of files that mutually import each other, directly or transitively). Run this to identify architectural problems before a refactor, or to understand why a module is hard to test in i...
repo*stringget_coupling_metricsReturn afferent coupling (Ca), efferent coupling (Ce), and instability score for a file/module. Ca = files that import this module (dependents). Ce = files this module imports (dependencies). Instability I = Ce/(Ca+Ce): 0 = stable, 1 = unstable. Use to identify fragile modules...2 paramsReturn afferent coupling (Ca), efferent coupling (Ce), and instability score for a file/module. Ca = files that import this module (dependents). Ce = files this module imports (dependencies). Instability I = Ce/(Ca+Ce): 0 = stable, 1 = unstable. Use to identify fragile modules...
module_path*stringrepo*stringget_layer_violationsCheck whether imports respect declared architectural layer boundaries. Reports every import that crosses a forbidden layer boundary. Layer rules can be passed directly or defined in .jcodemunch.jsonc under 'architecture.layers'. Use to enforce clean architecture and detect dep...2 paramsCheck whether imports respect declared architectural layer boundaries. Reports every import that crosses a forbidden layer boundary. Layer rules can be passed directly or defined in .jcodemunch.jsonc under 'architecture.layers'. Use to enforce clean architecture and detect dep...
repo*stringrulesarraycheck_rename_safeCheck whether renaming a symbol to a new name would cause name collisions. Scans the symbol's own file and every file that imports it, looking for an existing symbol with the proposed new name. Returns safe=true when no collisions are found. Run this before any rename/refactor...3 paramsCheck whether renaming a symbol to a new name would cause name collisions. Scans the symbol's own file and every file that imports it, looking for an existing symbol with the proposed new name. Returns safe=true when no collisions are found. Run this before any rename/refactor...
new_name*stringrepo*stringsymbol_id*stringcheck_delete_safeComposite preflight: can this symbol be deleted safely? Combines find_importers (cross-repo), check_references, find_dead_code confidence, runtime evidence (Phase 7 traces when available), and entry-point heuristics into a single verdict + one-line recommended_action. Verdict...4 paramsComposite preflight: can this symbol be deleted safely? Combines find_importers (cross-repo), check_references, find_dead_code confidence, runtime evidence (Phase 7 traces when available), and entry-point heuristics into a single verdict + one-line recommended_action. Verdict...
cross_repobooleaninclude_runtimebooleanrepo*stringsymbol*stringfind_implementationsFind concrete implementations of an interface, abstract class, or method. Multi-source resolution with confidence scoring: LSP dispatch (1.0), AST class hierarchy (0.85), duck-typed name match (0.65), decorator handler (0.45). Classifies each impl (subclass_override / interfac...8 paramsFind concrete implementations of an interface, abstract class, or method. Multi-source resolution with confidence scoring: LSP dispatch (1.0), AST class hierarchy (0.85), duck-typed name match (0.65), decorator handler (0.45). Classifies each impl (subclass_override / interfac...
cross_repobooleaninclude_subclassesbooleanmax_resultsintegerrank_by_importancebooleanrelationship_kindsarrayrepo*stringsymbol*stringtoken_budgetintegerplan_refactoringGenerate edit-ready refactoring instructions for renaming, moving, extracting, or changing the signature of a symbol. Returns {old_text, new_text} blocks for every affected file — directly compatible with Edit tool. Handles import rewrites, collision detection, new file genera...7 paramsGenerate edit-ready refactoring instructions for renaming, moving, extracting, or changing the signature of a symbol. Returns {old_text, new_text} blocks for every affected file — directly compatible with Edit tool. Handles import rewrites, collision detection, new file genera...
depthintegernew_filestringnew_namestringnew_signaturestringrefactor_type*stringrename · move · extract · signaturerepo*stringsymbol*stringget_dead_code_v2Find likely-dead functions and methods using three independent evidence signals: (1) the symbol's file is not reachable from any entry point via the import graph (filename heuristic + package.json main/module/exports/bin), (2) no indexed symbol calls this symbol in the call gr...5 paramsFind likely-dead functions and methods using three independent evidence signals: (1) the symbol's file is not reachable from any entry point via the import graph (filename heuristic + package.json main/module/exports/bin), (2) no indexed symbol calls this symbol in the call gr...
file_patternstringinclude_testsbooleanmax_resultsintegermin_confidencenumberrepo*stringget_extraction_candidatesIdentify functions in a file that are good candidates for extraction to a shared module. A candidate must have high cyclomatic complexity (doing a lot) AND be called from multiple other files (already implicitly shared). Results are ranked by score = complexity × caller_file_c...4 paramsIdentify functions in a file that are good candidates for extraction to a shared module. A candidate must have high cyclomatic complexity (doing a lot) AND be called from multiple other files (already implicitly shared). Results are ranked by score = complexity × caller_file_c...
file_path*stringmin_callersintegermin_complexityintegerrepo*stringget_symbol_complexityReturn cyclomatic complexity, nesting depth, and parameter count for a single symbol. Complexity data is stored at index time (requires jcodemunch-mcp >= 1.16 / INDEX_VERSION 7). assessment field: 'low' (1-4), 'medium' (5-10), 'high' (11+). Re-index the repo if all metrics sho...2 paramsReturn cyclomatic complexity, nesting depth, and parameter count for a single symbol. Complexity data is stored at index time (requires jcodemunch-mcp >= 1.16 / INDEX_VERSION 7). assessment field: 'low' (1-4), 'medium' (5-10), 'high' (11+). Re-index the repo if all metrics sho...
repo*stringsymbol_id*stringget_churn_rateReturn git churn metrics for a file or symbol: commit count, unique authors, first_seen date, last_modified date, and churn_per_week over a configurable window. assessment: 'stable' (<=1/week), 'active' (<=3/week), 'volatile' (>3/week). Requires a locally indexed repo (index_f...3 paramsReturn git churn metrics for a file or symbol: commit count, unique authors, first_seen date, last_modified date, and churn_per_week over a configurable window. assessment: 'stable' (<=1/week), 'active' (<=3/week), 'volatile' (>3/week). Requires a locally indexed repo (index_f...
daysintegerrepo*stringtarget*stringget_hotspotsReturn the top-N highest-risk symbols ranked by hotspot score = cyclomatic_complexity x log(1 + commits_last_N_days). Identifies code that is both complex and frequently changed — the highest bug-introduction risk in the codebase. Methodology matches CodeScene/Adam Tornhill. R...4 paramsReturn the top-N highest-risk symbols ranked by hotspot score = cyclomatic_complexity x log(1 + commits_last_N_days). Identifies code that is both complex and frequently changed — the highest bug-introduction risk in the codebase. Methodology matches CodeScene/Adam Tornhill. R...
daysintegermin_complexityintegerrepo*stringtop_nintegerget_repo_healthReturn a one-call triage snapshot of the entire repository: symbol counts, dead code %, average cyclomatic complexity, top 5 hotspots, dependency cycle count, and unstable module count. Designed to be the first tool called in any new session — one call gives a complete picture...2 paramsReturn a one-call triage snapshot of the entire repository: symbol counts, dead code %, average cyclomatic complexity, top 5 hotspots, dependency cycle count, and unstable module count. Designed to be the first tool called in any new session — one call gives a complete picture...
daysintegerrepo*stringget_untested_symbolsFind functions and methods with no evidence of being exercised by any test file. Uses import-graph reachability + name matching (AST call_references when available, word-boundary text heuristic as fallback). Returns symbols classified as 'unreached' (no test file imports the s...4 paramsFind functions and methods with no evidence of being exercised by any test file. Uses import-graph reachability + name matching (AST call_references when available, word-boundary text heuristic as fallback). Returns symbols classified as 'unreached' (no test file imports the s...
file_patternstringmax_resultsintegermin_confidencenumberrepo*stringsearch_astCross-language AST pattern matching. Finds structural code patterns across all 70+ indexed languages using a single query — no need to know language-specific AST node types. Two modes: (1) preset anti-patterns (empty_catch, bare_except, deeply_nested, nested_loops, god_functio...6 paramsCross-language AST pattern matching. Finds structural code patterns across all 70+ indexed languages using a single query — no need to know language-specific AST node types. Two modes: (1) preset anti-patterns (empty_catch, bare_except, deeply_nested, nested_loops, god_functio...
categorystringfile_patternstringlanguagestringmax_resultsintegerpatternstringrepo*stringget_symbol_importanceReturn the most architecturally important symbols in a repo, ranked by PageRank or in-degree centrality on the import graph. Useful for orientation: surfaces the symbols that most of the codebase depends on. New tool: use after indexing to understand repo architecture at a gla...4 paramsReturn the most architecturally important symbols in a repo, ranked by PageRank or in-degree centrality on the import graph. Useful for orientation: surfaces the symbols that most of the codebase depends on. New tool: use after indexing to understand repo architecture at a gla...
algorithmstringpagerank · degreedefault: pagerankrepo*stringscopestringtop_nintegerfind_similar_symbolsFind clusters of similar functions/methods/classes — consolidation candidates. Blends three signals: semantic (embedding cosine when embed_repo has run), structural (signature-token Jaccard + size ratio), and behavioral (callee-set Jaccard). Runs union-find clustering, classif...9 paramsFind clusters of similar functions/methods/classes — consolidation candidates. Blends three signals: semantic (embedding cosine when embed_repo has run), structural (signature-token Jaccard + size ratio), and behavioral (callee-set Jaccard). Runs union-find clustering, classif...
include_kindsarrayinclude_testsbooleanmax_clustersintegermin_sizeintegerrepo*stringscopestringsemantic_weightnumberthresholdnumbertoken_budgetintegerget_repo_mapQuery-less, token-budgeted, signature-level overview of a repository. Groups symbols by file, ranks files by PageRank on the import graph, and greedy-packs signatures (not bodies) under token_budget. Designed for cold-start orientation — 'I just cloned this repo, what matters...5 paramsQuery-less, token-budgeted, signature-level overview of a repository. Groups symbols by file, ranks files by PageRank on the import graph, and greedy-packs signatures (not bodies) under token_budget. Designed for cold-start orientation — 'I just cloned this repo, what matters...
include_kindsarraymax_per_fileintegerrepo*stringscopestringtoken_budgetintegerfind_dead_codeFind dead code — files and symbols with zero importers and no entry-point role. Uses the import graph to identify unreachable code. Returns confidence scores (1.0 = provably unreachable, 0.7 = all importers are themselves dead). Set granularity='file' for file-level results only.5 paramsFind dead code — files and symbols with zero importers and no entry-point role. Uses the import graph to identify unreachable code. Returns confidence scores (1.0 = provably unreachable, 0.7 = all importers are themselves dead). Set granularity='file' for file-level results only.
entry_point_patternsarraygranularitystringsymbol · filedefault: symbolinclude_testsbooleanmin_confidencenumberrepo*stringget_ranked_contextAssemble the best-fit context for a query within a token budget. Ranks all symbols by relevance (BM25) and/or centrality (PageRank), loads source for the top candidates, and packs greedily until token_budget is exhausted. Use when you want 'the best N tokens of context for thi...7 paramsAssemble the best-fit context for a query within a token budget. Ranks all symbols by relevance (BM25) and/or centrality (PageRank), loads source for the top candidates, and packs greedily until token_budget is exhausted. Use when you want 'the best N tokens of context for thi...
fusionbooleaninclude_kindsarrayquery*stringrepo*stringscopestringstrategystringcombined · bm25 · centralitydefault: combinedtoken_budgetintegerassemble_task_contextTask-aware single-call orchestrator. Auto-classifies task into explore/debug/refactor/extend/audit/review intent, runs the right sub-tools, returns one source-attributed capsule under token_budget.7 paramsTask-aware single-call orchestrator. Auto-classifies task into explore/debug/refactor/extend/audit/review intent, runs the right sub-tools, returns one source-attributed capsule under token_budget.
cross_repobooleanincludearrayintentstringexplore · debug · refactor · extend · audit · reviewrepo*stringsymbolsarraytask*stringtoken_budgetintegerget_changed_symbolsMap a git diff to affected symbols: given two commits, returns which symbols were added, removed, modified, or renamed. Useful after merging a PR to answer 'what actually changed?' for code review or regression triage. Requires a locally indexed repo (index_folder). Defaults t...5 paramsMap a git diff to affected symbols: given two commits, returns which symbols were added, removed, modified, or renamed. Useful after merging a PR to answer 'what actually changed?' for code review or regression triage. Requires a locally indexed repo (index_folder). Defaults t...
include_blast_radiusbooleanmax_blast_depthintegerrepo*stringsince_shastringuntil_shastringembed_repoPrecompute and cache symbol embeddings for semantic search. Optional warm-up: search_symbols with semantic=true lazily embeds missing symbols on first use, but embed_repo warms the cache upfront so the first semantic query returns immediately. Requires an embedding provider (J...3 paramsPrecompute and cache symbol embeddings for semantic search. Optional warm-up: search_symbols with semantic=true lazily embeds missing symbols on first use, but embed_repo warms the cache upfront so the first semantic query returns immediately. Requires an embedding provider (J...
batch_sizeintegerforcebooleanrepo*stringget_cross_repo_mapReturn which indexed repos depend on which other indexed repos at the package level. Shows the full cross-repository dependency map based on package names extracted from manifest files (pyproject.toml, package.json, go.mod, Cargo.toml, etc.). Use to visualize how your indexed...1 paramsReturn which indexed repos depend on which other indexed repos at the package level. Shows the full cross-repository dependency map based on package names extracted from manifest files (pyproject.toml, package.json, go.mod, Cargo.toml, etc.). Use to visualize how your indexed...
repostringget_group_contractsSurface the de-facto API contracts across a group of indexed repos. Walks each member's named imports, resolves them to symbols in other members via the package registry, and classifies each shared symbol into one of four verdict tiers: 'de_facto_api' (used by ≥min_importers e...8 paramsSurface the de-facto API contracts across a group of indexed repos. Walks each member's named imports, resolves them to symbols in other members via the package registry, and classifies each shared symbol into one of four verdict tiers: 'de_facto_api' (used by ≥min_importers e...
churn_daysintegerclassifybooleaninclude_dead_contractsbooleaninclude_internalbooleanmax_contractsintegermin_importersintegerrepos*arraytoken_budgetintegerget_tectonic_mapDiscover the logical module topology of a codebase by fusing three coupling signals: structural (import edges), behavioral (shared symbol references), and temporal (git co-churn). Returns tectonic plates (auto-detected file clusters), each with an anchor file, cohesion score,...3 paramsDiscover the logical module topology of a codebase by fusing three coupling signals: structural (import edges), behavioral (shared symbol references), and temporal (git co-churn). Returns tectonic plates (auto-detected file clusters), each with an anchor file, cohesion score,...
daysintegermin_plate_sizeintegerrepo*stringget_signal_chainsDiscover how external signals (HTTP requests, CLI commands, scheduled tasks, events) propagate through the codebase via the call graph. Each signal chain traces a path from a gateway (entry point) through its callees to leaf symbols. Two modes: (1) Discovery — omit symbol to m...5 paramsDiscover how external signals (HTTP requests, CLI commands, scheduled tasks, events) propagate through the codebase via the call graph. Each signal chain traces a path from a gateway (entry point) through its callees to leaf symbols. Two modes: (1) Discovery — omit symbol to m...
include_testsbooleankindstringhttp · cli · event · task · main · testmax_depthintegerrepo*stringsymbolstringrender_diagramRender any graph-producing tool's output as rich, annotated Mermaid markup. Pass the raw output dict from get_call_hierarchy, get_signal_chains, get_tectonic_map, get_dependency_cycles, get_impact_preview, get_blast_radius, or get_dependency_graph. Auto-detects the source tool...3 paramsRender any graph-producing tool's output as rich, annotated Mermaid markup. Pass the raw output dict from get_call_hierarchy, get_signal_chains, get_tectonic_map, get_dependency_cycles, get_impact_preview, get_blast_radius, or get_dependency_graph. Auto-detects the source tool...
max_nodesintegersource*objectthemestringflow · risk · minimaldefault: flowget_project_intelAuto-discover and parse non-code knowledge files (Dockerfiles, CI configs, docker-compose, K8s manifests, .env templates, Makefiles, package.json scripts) and cross-reference them to indexed code symbols. Returns structured intelligence grouped by category: infra, ci, config,...3 paramsAuto-discover and parse non-code knowledge files (Dockerfiles, CI configs, docker-compose, K8s manifests, .env templates, Makefiles, package.json scripts) and cross-reference them to indexed code symbols. Returns structured intelligence grouped by category: infra, ci, config,...
categorystringall · infra · ci · config · deps · apidefault: allrepo*stringscope_pathstringlist_workspacesEnumerate monorepo workspace members for an indexed repo. Detects pnpm (pnpm-workspace.yaml), yarn/npm (package.json workspaces), turborepo (turbo.json), lerna (lerna.json), rush (rush.json), Go (go.work), and Cargo ([workspace] members). Returns [{path, package_name, manager}...1 paramsEnumerate monorepo workspace members for an indexed repo. Detects pnpm (pnpm-workspace.yaml), yarn/npm (package.json workspaces), turborepo (turbo.json), lerna (lerna.json), rush (rush.json), Go (go.work), and Cargo ([workspace] members). Returns [{path, package_name, manager}...
repo*stringwinnow_symbolsRun a multi-axis constraint query against the index in a single round trip. Accepts an ordered list of criteria (AND) intersecting signals no other tool composes: kind, language, name (regex), file glob, cyclomatic complexity, decorator, direct call references, summary/docstri...5 paramsRun a multi-axis constraint query against the index in a single round trip. Accepts an ordered list of criteria (AND) intersecting signals no other tool composes: kind, language, name (regex), file glob, cyclomatic complexity, decorator, direct call references, summary/docstri...
criteria*arraymax_resultsintegerorderstringasc · descdefault: descrank_bystringimportance · complexity · churn · namedefault: importancerepo*stringset_tool_tierExplicit tier override for the current session. Narrows or widens the exposed tool list to 'core' / 'standard' / 'full'. Prefer plan_turn(model=...) for routine per-task use; use set_tool_tier only when you need an explicit override (e.g. escalate mid-task to 'full' after a ca...1 paramsExplicit tier override for the current session. Narrows or widens the exposed tool list to 'core' / 'standard' / 'full'. Prefer plan_turn(model=...) for routine per-task use; use set_tool_tier only when you need an explicit override (e.g. escalate mid-task to 'full' after a ca...
tier*stringcore · standard · fullannounce_modelAgent self-reports its active model identifier. Server resolves to a tier via model_tier_map (fuzzy: normalize → exact → glob → substring → '*' → 'full') and narrows the exposed tool list accordingly. Idempotent: a second call with the same model is a cheap no-op. Prefer calli...1 paramsAgent self-reports its active model identifier. Server resolves to a tier via model_tier_map (fuzzy: normalize → exact → glob → substring → '*' → 'full') and narrows the exposed tool list accordingly. Idempotent: a second call with the same model is a cheap no-op. Prefer calli...
model*stringThe most token-efficient MCP server for precise source code retrieval via tree-sitter AST parsing. Cut AI token costs 86-99% on code exploration (96% average, benchmarked at 28.3x fewer tokens than a grep-and-read agent) and stop burning your context window reading entire files.
Real results, live from production 838B+ tokens saved · 136,000+ reporting installs · $4.2M+ in AI spend avoided · 100,000+ kg CO₂ prevented Counter figures as of 2026-08-17, valued at the $5/MTok Claude Opus input rate. All four only grow, so read them as floors. Live at jcodemunch.com.
Works with Claude Code, Cursor, VS Code, Codex CLI, Windsurf, Continue, and any MCP-compatible client.
Install now · Quickstart · See the evidence · Pricing
Free for personal use. Use it to make money, and Uncle J. gets a taste. Fair enough? Commercial licenses below. Our guarantee: if jCodeMunch doesn't pay for itself, you don't pay for jCodeMunch.
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. It parses source with tree-sitter, stores structured symbol metadata (signature, kind, qualified name, summary, byte offsets) alongside raw file content in a local index, and fetches exact implementations on demand instead of re-reading files over and over.
| 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 |
| "What breaks if I change X?" | Not possible | get_blast_radius |
Index once. Query cheaply. Keep moving. Precision context beats brute-force context.
Measured with tiktoken cl100k_base across three public repos pinned to upstream commits, run 2026-09-03 on v1.108.316. Workflow: search_symbols (top 5) + get_symbol_source × 3 per query. Two baselines, same run, same corpus, same file reader:
rg -l the query terms, rank files by match count, open the top 3 whole. This is what a competent agent without the tool actually does, and it is the number to quote.| Repository | Files | Symbols | Grep-top-3 baseline | jCodeMunch | vs grep | vs read-all |
|---|---|---|---|---|---|---|
| expressjs/express | 186 | 455 | 15,724 avg | 1,007 avg | 15.6x | 153.5x |
| fastapi/fastapi | 1,186 | 13,240 | 85,296 avg | 2,149 avg | 39.7x | 384.1x |
| gin-gonic/gin | 98 | 1,451 | 31,975 avg | 1,537 avg | 20.8x | 98.8x |
| Grand total (15 task-runs) | 664,975 | 23,467 | 28.3x | 241.1x |
Against a grep-and-read agent: 96.5% reduction, 28.3x fewer tokens. No single multiple describes every query; the per-repo rows above are the spread. Against read-all the figure is 99.6%, but nobody pays that ceiling. Compact MUNCH wire encoding then trims a median 45.5% more bytes off responses.
Full methodology, pinned commits, harness, and known caveats: benchmarks/METHODOLOGY.md · Reproduce it yourself · TOKEN_SAVINGS.md
50-iteration A/B test on a real Vue 3 + Firebase production codebase, jCodeMunch vs native tools (Grep/Glob/Read), Claude Sonnet 4.6, fresh session per iteration: success rate 80% vs 72%, timeout rate 32% vs 40%, mean cache creation down 10.5%. Tool-layer savings isolated from fixed overhead: 15-25%. One finding category appeared exclusively in the jCodeMunch variant: orphaned file detection via find_importers, a structural query native tools cannot answer without scripting. Full report: benchmarks/ab-test-naming-audit-2026-03-18.md
uv tool install jcodemunch-mcp
jcodemunch-mcp init
No virtualenv to manage, nothing written into system Python, and it works as-is on PEP 668 distros (Ubuntu 24.04+, Debian 12+) where bare pip install is refused. Don't have uv yet?
init auto-detects your MCP clients (Claude Code, Claude Desktop, Cursor, Windsurf, Continue), writes their config entries, installs the CLAUDE.md prompt policy so your agent actually uses jCodeMunch, optionally installs enforcement hooks, optionally indexes your project, and audits your agent config files for token waste.
| Command | Use it when |
|---|---|
uvx jcodemunch-mcp | Zero install. Runs from an ephemeral environment — nothing lands on disk permanently. The client entries init writes already invoke the server this way, so for most setups this is all that ever runs. ⚠ Enforcement hooks are the exception: they're spawned by a minimal-PATH subshell and resolve the executable by name, so they need uv tool install (or pipx/pip) to work. |
pipx install jcodemunch-mcp | You already standardise on pipx |
pip install jcodemunch-mcp | Inside a virtualenv you manage yourself |
Verify:
jcodemunch-mcp --version
claude mcp add -s user jcodemunch -- uvx jcodemunch-mcp
No install step — uvx fetches and runs the server on demand. Prefer it on your PATH (and required for enforcement hooks)? uv tool install jcodemunch-mcp, then claude mcp add -s user jcodemunch jcodemunch-mcp.
Then tell the agent to prefer the tools. This matters more than people think; installation makes the tools available but does not break the agent's brute-reading habit. One line in your CLAUDE.md does it:
Call the jcodemunch_guide tool and strictly follow its instructions.
Using Cursor, Windsurf, Codex CLI, Antigravity, Gemini CLI, Qwen Code, Kiro, Cline, Zed, Goose, Hermes, Odysseus, or Paperclip? Every tested client configuration lives in CLIENTS.md. Optional extras (local semantic search, AI summaries per provider) are in QUICKSTART.md; the system surfaces each extra pulls in are documented in SECURITY.md.
Full walkthrough: QUICKSTART.md. The two-minute version, inside your agent after init:
The agent should answer via search_symbols and get_symbol_source, returning tens of lines instead of whole files. Confirm with get_session_stats: it reports tokens served and savings for the session. That is where the numbers on the meter come from.
Want to skip initial indexing for popular frameworks? Pre-built starter packs: jcodemunch-mcp install-pack --list (free packs need no license).
get_symbol_source returns the exact function body, byte-precise, for the majority of edits that touch one function in a 700-line file (~95% savings on that read).assemble_task_context classifies the task intent, extracts anchor symbols, and runs the right tool sequence under one token budget. plan_turn routes the turn before the first read.find_importers, get_blast_radius, get_call_hierarchy, find_dead_code, get_changed_symbols, get_hotspots, search_ast anti-pattern sweeps, and more. Two of them sound alike and are not: check_references answers where a name is used (import sites plus every file whose content mentions it), find_references answers who imports it, over the import graph alone, so a call site is invisible to it.check_edit_safe, check_delete_safe, get_pr_risk_profile, and plan_refactoring with edit-ready {old_text, new_text} blocks. The two safety checks return stop_rule.terminal: true means no further jcodemunch call moves the verdict, so re-running find_importers or check_references to be sure is wasted work. It means final, not safe. Hand the server your type checker's own output (jcodemunch-mcp import-trace --diagnostics <file>: mypy --output json, pyright --outputjson, tsc --pretty false, ruff --output-format json) and check_edit_safe, get_changed_symbols, get_pr_risk_profile and get_symbol_provenance say which symbols the checker already flags, as of which commit. Nothing runs a checker for you. False names the specific thing that would change the answer.That's the highlight reel. The complete tour of 90+ tools, the MUNCH compact wire format, evidence receipts, offloadable-work annotation, and the session-economics instrumentation is in CAPABILITIES.md, with internals in UNDER_THE_HOOD.md.
| Scenario | Native tool | jCodeMunch | Savings |
|---|---|---|---|
| Edit one function (700-line file) | Read → 700 lines | get_symbol_source → 30 lines | ~95% |
| Understand a file's structure | Read → full content | get_file_outline → names + signatures | ~80% |
| Find which file to edit | Grep many files | search_symbols → exact match | comparable |
| Edit requires whole-file context | Read → full content | get_file_content → full content | ~0% |
| "What breaks if I change X?" | not possible | get_blast_radius | unique capability |
It helps most on targeted edits (one function, one method, one class), which is the majority of real editing work. Edits that genuinely require the entire file (restructuring file-level state, reordering logic spanning hundreds of lines) see no advantage. Best fits: large repositories, unfamiliar codebases, agent-driven exploration, refactoring and impact analysis, and teams cutting AI token costs without making agents dumber.
Languages: 70+ via tree-sitter, including Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, C#, PHP, Ruby, Swift, and Kotlin. Full matrix: LANGUAGE_SUPPORT.md. Monorepos: yes; incremental indexing, workspace-member detection, subpath scoping.
If you reach jCodeMunch through the MCP connector on a model that supports tool search, you can keep our schemas out of your context prefix entirely and let Claude load only the two or three tools a request needs. You do not set defer_loading per tool — set it once for the whole server:
{
"mcp_servers": [
{ "type": "url", "url": "https://your-host/mcp", "name": "jcodemunch" }
],
"tools": [
{ "type": "tool_search_tool_bm25_20251119", "name": "tool_search_tool_bm25" },
{
"type": "mcp_toolset",
"mcp_server_name": "jcodemunch",
"default_config": { "defer_loading": true },
"configs": {
"resolve_repo": { "defer_loading": false },
"search_symbols": { "defer_loading": false },
"get_ranked_context": { "defer_loading": false }
}
}
]
}
Send it with the beta header mcp-client-2025-11-20. Both halves are required — mcp_servers alone is a validation error, and so is mcp_toolset without the matching mcp_server_name.
⚠ The MCP connector takes a URL, so this applies to jCodeMunch served over sse or streamable-http (jcodemunch-mcp serve --transport streamable-http), not to the default local stdio setup. On stdio, whether schemas are deferred is up to your client, and tool_surface: "counter" below is the lever you control.
The configs block above follows Anthropic's own advice — keep your 3–5 most-used tools resident so common requests skip the search round trip — and per-tool configs overrides default_config.
Deferred definitions are excluded from the system-prompt prefix and appended inline as tool_reference blocks when Claude discovers them, so prompt caching is preserved — this is not the cache-invalidating kind of dynamic tool list. At least one tool in the request must stay non-deferred, or the API returns a 400.
⚠ This is a different mechanism from our own tool_surface: "counter", and you do not need both. Tool search is host-side and works across every MCP server you have connected; the Counter is server-side, works on any host including ones with no tool-search support, and is what init configures on a first-ever install. Pick whichever your host supports — see CONFIGURATION.md for the Counter and jcodemunch-mcp surface for what your install actually advertises.
Local-first by design: indexes live at ~/.code-index/, and the base package's only default network behavior is an anonymous savings counter (random ID plus aggregate token counts, no code, no paths, no PII; opt out with share_savings: false). Everything the server does beyond answering a tool call (file watching, the opt-in login service, license validation, model downloads, org reporting) is opt-in or opt-out, visible, and reversible, and every item is enumerated in SECURITY.md alongside the path-traversal, symlink, and secret-redaction controls.
Grammar pack override (#608). The dependency tree-sitter-language-pack is pinned <1.0.0 because the 0.x wheels bundle every grammar and parsing stays local. You can override it with pip install -U tree-sitter-language-pack after installing; nothing in the code refuses it. What you accept, measured against 1.17.0 on 2026-09-11: the 1.x pack ships no grammars and fetches each one over the network into its cache directory (measured on Windows: %LOCALAPPDATA%\tree-sitter-language-pack\v<version>\libs; jcodemunch-mcp install-status prints the path on any platform) the first time a language is parsed, so an airgapped install parses nothing, and the nim grammar changed upstream, so nim files yield no symbols (the manifest also lacks autohotkey, ejs and verse, which costs nothing here: those three are parsed by jCodeMunch's own extractors, not by tree-sitter). An install on a 1.x pack says so: every index_folder result carries a grammar_pack block and a warning naming the version, the cache directory and each language whose grammar failed, and jcodemunch-mcp install-status prints the same. Dropping the pin is a separate decision that needs the offline story first.
Most settings live in the global ~/.code-index/config.jsonc, but any of them can be overridden for a single repository by dropping a .jcodemunch.jsonc at its root. It is an overlay: keys it declares win, keys it omits fall through to global and then to the built-in default, so it only needs to contain what differs.
// <your-repo>/.jcodemunch.jsonc
{
"max_file_size": 1048576,
"languages": ["python", "typescript", "racket"]
}
Racket projects routinely define their own defining forms with define-syntax, and a static parser cannot know what those bind — (defstep (check-admin) ...) is indistinguishable from a function call. Declaring them makes their bindings searchable:
{
"racket_definition_forms": {
"defstep": "function",
"defstudy": "constant",
"defvar": "constant",
"define-schema": "class"
}
}
Each entry maps a form name to what it binds: function, constant, class or type. Where the name sits is read from the source rather than declared — (defstep (check-admin) ...) takes the head of the parameter list, (defstudy consent ...) takes the bare symbol — so a form that appears in both shapes works either way.
⚠ This is an assertion, not something jCodeMunch can verify. A wrong declaration puts a name in the index that Racket does not actually bind. Declarations are also matched only after every built-in form, so declaring define or struct has no effect — the built-in handling wins.
#lang looks likeA #lang line names a reader, and jCodeMunch's Racket parser reads S-expressions. The distribution's langs are built in (racket/*, typed/racket*, s-exp, info, at-exp …, and the document langs scribble/*, pollen, punct, markdown …), but a project's own lang is unknown to it and is treated as a document — no symbols, still text-searchable — until you say what its syntax is:
{
"racket_langs": {
"conscript": "at-exp",
"mylang": "sexp"
}
}
sexp is plain S-expressions; at-exp is at-exp text bodies over Racket (read with @ as the command character, exactly as #lang at-exp reads them, so prose containing ; " # or | is prose); text is a document language that is never walked. A key also covers its sub-langs (conscript matches conscript/with-require), and a project may demote a lang as well as promote one. An at-exp lang whose reader uses another command character declares it with the object form — "mylang": {"tier": "at-exp", "command_char": "◊"} — the way Racket's make-at-readtable takes #:command-char.
Both keys change what the parser emits for unchanged files, so a change to either is stamped on the index and forces one full re-parse on the next index (rebuild_reason: "racket_config_changed"); you do not need to touch the files or clear the index. An index holding Racket files that was built before this stamp existed re-parses once the same way (rebuild_reason: "racket_index_predates_gate").
| Doc | What it covers |
|---|---|
| QUICKSTART.md | Zero-to-indexed in three steps |
| CLIENTS.md | Tested configuration for every MCP client |
| USER_GUIDE.md | Full tool reference, workflows, and best practices |
| CAPABILITIES.md | The complete capability reference beyond the highlight reel |
| CONFIGURATION.md | Config file reference, token-control levers, tool tiering, the Counter |
| UNDER_THE_HOOD.md | The technical manual: verdicts, ranking internals, provenance contracts |
| ARCHITECTURE.md | Internal design, storage model, and extension points |
| GROQ.md | Groq Remote MCP, the gcm CLI, speedreview GitHub Action |
| HEADLESS.md | Using jCodeMunch with claude -p |
| AGENT_HOOKS.md | Agent hooks and prompt policies |
| LANGUAGE_SUPPORT.md | Supported languages and parsing details |
| SECURITY.md | Security controls, data movement, background behavior |
| TROUBLESHOOTING.md | Common issues and fixes |
| CHANGELOG.md · ROADMAP.md | Release history and what's next |
jCodeMunch-MCP is released under the jCodeMunch-MCP Dual-Use License (full terms). Free for non-commercial use. Commercial use requires a paid license, one-time, sold by jMunch LLC via Stripe:
jCodeMunch-only: Builder, $79 (1 developer) · Studio, $349 (up to 5) · Platform, $1,999 (org-wide internal deployment)
Full jMunch suite (code + docs + data): Trio Builder, $99 · Trio Studio, $449 · Trio Platform, $2,499
Not sure it's worth it? Run your own numbers through the ROI calculator, or forward the finance-team version to whoever signs off. The guarantee stands: if jCodeMunch doesn't pay for itself, you don't pay for jCodeMunch.
Conditions on all uses: retain the copyright notice, clearly mark modifications and keep the original author's name intact (he's kinda full of himself), and include a prominent modification notice in source redistributions. The Software may not be renamed, rebranded, or published to any public package registry, and is provided "AS IS" without warranty. LICENSE controls.
How much can I save on Claude / Opus tokens? In retrieval-heavy workflows, code-reading tokens typically drop 86-99%, benchmarked at 96.5% average (28.3x) against a grep-and-read agent across 15 tasks and 3 repositories. Per-query results span 7.6x to 81.2x. Methodology: TOKEN_SAVINGS.md and benchmarks/.
How is this different from RAG or grep-based tools? jCodeMunch retrieves at the symbol level with byte-level precision (functions, classes, importers, blast radius, hierarchies) rather than fuzzy chunks (RAG) or raw line matches (grep) the agent still has to read and reason over.
Is it free for personal use? Yes. Commercial use needs a license; see above.
Where's the deep-dive on X? Capabilities: CAPABILITIES.md. Config: CONFIGURATION.md. Clients: CLIENTS.md. Internals: UNDER_THE_HOOD.md. Or the firehose: jcodemunch.com.
Extras: OSS code-health observatory (weekly six-axis snapshots of Express, FastAPI, Gin, Django, and friends) · Token Cost Radar (daily AI token cost intelligence) · jMunch Console (free MIT GUI for one-click upgrades)