CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

jCodemunch MCP

jgravelle/jcodemunch-mcp
1.9k80 toolsSTDIOregistry active
Summary

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.

Install to Claude Code

verified
claude mcp add jcodemunch-mcp -- uvx jcodemunch-mcp

Run 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.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Verified live against the running server on Jun 10, 2026.

verified live80 tools
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 params

Index 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.

Parameters* required
url*string
GitHub repository URL or owner/repo string
incrementalboolean
When true and an existing index exists, only re-index changed files.default: true
use_ai_summariesboolean
Use AI to generate symbol summaries. Supports Anthropic, Gemini, OpenAI-compatible endpoints, MiniMax, and GLM-5 via env vars. When false, uses docstrings or signature fallback.default: true
extra_ignore_patternsarray
Additional gitignore-style patterns to exclude from indexing (merged with JCODEMUNCH_EXTRA_IGNORE_PATTERNS env var)
index_folderIndex a local folder of source code. Response surfaces `discovery_skip_counts` and `no_symbols_files` for diagnosing missing files.7 params

Index a local folder of source code. Response surfaces `discovery_skip_counts` and `no_symbols_files` for diagnosing missing files.

Parameters* required
path*string
Path to local folder (absolute or relative; ~ expands).
pathsarray
Optional explicit paths (absolute or relative to `path`). When set, skips the directory walk; directories in the list are recursed. Walk-path validation applies.
incrementalboolean
When an existing index exists, only re-index changed files.default: true
identity_modestring
Repo-identity strategy. `config` (default): respect existing index. `local`: path-keyed. `git`: git-root-keyed (monorepo subdir merging).one of config · local · gitdefault: config
follow_symlinksboolean
Include symlinked files. Symlinked directories are never followed.default: false
use_ai_summariesboolean
Generate symbol summaries via AI. When false, falls back to docstrings or signature.default: true
extra_ignore_patternsarray
Additional gitignore-style exclude patterns.
summarize_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 params

Re-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...

Parameters* required
repo*string
Repository identifier (owner/repo or local/hash)
forceboolean
If true, clear all existing summaries and re-summarize every symbol. Required when index_folder already applied signature fallbacks. If false, only process symbols with no summary at all.default: false
index_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 params

Index 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.

Parameters* required
path*string
Absolute path to the file to index.
use_ai_summariesboolean
Generate symbol summaries via AI. When false, falls back to docstrings or signature.default: true
context_providersboolean
Whether to run context providersdefault: true
import_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 params

Ingest 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...

Parameters* required
path*string
Absolute filesystem path to the trace file
repostring
Repository identifier (owner/name) — defaults to the current directory's resolved repo
sourcestring
Trace source format. Phases 1+4+5 accept 'otel', 'sql_log', and 'stack_log'.one of otel · sql_log · stack_log · apmdefault: otel
redact_enabledboolean
Override the runtime_redact_enabled config key. Disable ONLY for offline debugging on synthetic data.
get_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 params

Runtime 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...

Parameters* required
repo*string
Repository identifier (owner/name)
file_pathstring
Optional repo-relative file path. When set, scopes the histogram to this file.
unmapped_limitinteger
Cap on the unmapped_runtime list (default 50)default: 50
find_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 params

Top-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...

Parameters* required
repo*string
Repository identifier (owner/name)
querystring
Optional case-insensitive substring filter on symbol name
top_ninteger
Cap on returned rows (default 20, max 200)default: 20
find_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 params

Symbols 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...

Parameters* required
repo*string
Repository identifier (owner/name)
since_daysinteger
Look-back window in days (default 90)default: 90
max_resultsinteger
Cap on returned rows (default 200, max 1000)default: 200
include_testsboolean
Include symbols in test filesdefault: false
include_entry_pointsboolean
Include symbols in entry-point filenames (main.py, wsgi.py, etc.)default: false
get_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 params

Per-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...

Parameters* required
repo*string
Repository identifier (owner/name)
sourcestring
Optional filter to a single source labelone of otel · sql_log · stack_log · apm
since_daysinteger
Lookback window for last_redacted filter (default 30)default: 30
list_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 params

Resolve 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.

Parameters* required
path*string
Absolute filesystem path (repo root, worktree, subdirectory, or file)
get_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 params

Get 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.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
max_filesinteger
Maximum number of files to return (default 500). When truncated, response includes total_file_count and a hint to use path_prefix.default: 500
path_prefixstring
Optional path prefix to filter (e.g., 'src/utils')default:
include_summariesboolean
Include file-level summaries in the tree nodesdefault: false
get_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 params

Get 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').

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
file_pathstring
Path to the file within the repository (e.g., 'src/main.py')
file_pathsarray
List of file paths to query in batch mode. Returns a grouped results array.
get_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 params

Get 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).

Parameters* required
fqnstring
PHP fully-qualified class name (e.g. 'App\Models\User'). Resolves to symbol_id via PSR-4. Alternative to symbol_id.
repo*string
Repository identifier (owner/repo or just repo name)
verifyboolean
Verify content hash matches stored hash (detects source drift)default: false
symbol_idstring
Single symbol ID — returns flat symbol object
symbol_idsarray
Multiple symbol IDs — returns {symbols, errors}
context_linesinteger
Number of lines before/after symbol to include for contextdefault: 0
get_file_contentGet cached source for a file, optionally sliced to a line range.4 params

Get cached source for a file, optionally sliced to a line range.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
end_lineinteger
Optional 1-based end line (inclusive)
file_path*string
Path to the file within the repository (e.g., 'src/main.py')
start_lineinteger
Optional 1-based start line (inclusive)
search_symbolsSearch for symbols matching a query across the entire indexed repository. Returns matches with signatures and summaries.19 params

Search for symbols matching a query across the entire indexed repository. Returns matches with signatures and summaries.

Parameters* required
fqnstring
PHP fully-qualified class name (e.g. 'App\Models\User'). Resolves via PSR-4 and uses the class name as query. Alternative to query.
kindstring
Optional filter by symbol kindone of function · class · method · constant · type · template
repo*string
Repository identifier (owner/repo or just repo name)
debugboolean
When true, each result includes a score_breakdown showing per-field scoring contributions (name_exact, name_contains, name_word_overlap, signature_phrase, signature_word_overlap, summary_phrase, summary_word_overlap, keywords, docstring_word_overlap). Also adds candidates_scored to _meta.default: false
fuzzyboolean
Enable fuzzy matching. When true, uses trigram overlap + Levenshtein distance as fallback when BM25 scores are low. Fuzzy results include match_type, fuzzy_similarity, and edit_distance fields.default: false
query*string
Search query (matches symbol names, signatures, summaries, docstrings)
fusionboolean
Enable multi-signal fusion (Weighted Reciprocal Rank) across lexical, structural, similarity, and identity channels. Produces higher-quality ranking than linear score addition. When True, sort_by is ignored.default: false
sort_bystring
Ranking strategy. 'relevance' (default) = BM25 text match. 'centrality' = filter by query, rank by PageRank. 'combined' = BM25 + PageRank weighted.one of relevance · centrality · combineddefault: relevance
languagestring
Optional filter by languageone of ada · al · ansible · apex · arduino · asm
semanticboolean
Enable semantic (embedding-based) search. Requires an embedding provider: JCODEMUNCH_EMBED_MODEL (sentence-transformers), GOOGLE_API_KEY+GOOGLE_EMBED_MODEL (Gemini), or OPENAI_API_KEY+OPENAI_EMBED_MODEL (OpenAI). When false (default) there is zero performance impact.default: false
decoratorstring
Optional filter: only return symbols with this decorator (case-insensitive substring match, e.g. 'route', 'property', 'Deprecated')
max_resultsinteger
Maximum number of results to return (ignored when token_budget is set)default: 10
detail_levelstring
Controls result verbosity. 'compact' returns id/name/kind/file/line only (~15 tokens each, best for broad discovery). 'standard' returns signatures and summaries (default). 'full' inlines source code, docstring, and end_line — equivalent to search + get_symbol in one call.one of compact · standard · fulldefault: standard
file_patternstring
Optional glob pattern to filter files (e.g., 'src/**/*.py')
token_budgetinteger
Token budget cap. When set, results are sorted by score and greedily packed until the budget is exhausted. Overrides max_results. Reports token_budget, tokens_used, and tokens_remaining in _meta.
semantic_onlyboolean
Skip BM25 entirely and rank solely by embedding cosine similarity. Implies semantic=true.default: false
fuzzy_thresholdnumber
Minimum Jaccard trigram similarity (0.0–1.0) for fuzzy candidates. Lower values surface more candidates. Default 0.4.default: 0.4
semantic_weightnumber
Weight for semantic score in hybrid BM25+embedding ranking (0.0–1.0). BM25 receives 1-weight. Default 0.5. Set to 0.0 for identical results to pure BM25; set to 1.0 for pure semantic.default: 0.5
max_edit_distanceinteger
Maximum Levenshtein distance for direct name matching (catches typos). Default 2.default: 2
invalidate_cacheDelete the index and cached files for a repository. Forces a full re-index on next index_repo or index_folder call.1 params

Delete the index and cached files for a repository. Forces a full re-index on next index_repo or index_folder call.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
search_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 params

Full-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).

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
query*string
Text to search for. Case-insensitive substring by default. Set is_regex=true for full regex (e.g. 'estimateToken|tokenEstimat|\.length.*0\.25').
is_regexboolean
When true, treat query as a Python regex (re.search, case-insensitive). Supports alternation (|), character classes, lookaheads, etc.default: false
max_resultsinteger
Maximum number of matching lines to returndefault: 20
file_patternstring
Optional glob pattern to filter files (e.g., '*.py')
context_linesinteger
Lines of context to include before and after each match (like grep -C N). Essential for understanding code around matches.default: 0
get_repo_outlineGet a high-level overview of an indexed repository: directories, file counts, language breakdown, symbol counts. Lighter than get_file_tree.1 params

Get a high-level overview of an indexed repository: directories, file counts, language breakdown, symbol counts. Lighter than get_file_tree.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
find_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 params

Find 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...

Parameters* required
repo*string
Repository identifier
file_pathstring
Target file path within the repo (e.g. 'src/features/intake/IntakeService.js'). Use for single-file queries. Cannot be used together with file_paths.
cross_repoboolean
When true, also search other indexed repos for cross-repo importers. Default: false (or JCODEMUNCH_CROSS_REPO_DEFAULT env var).default: false
file_pathsarray
List of target file paths for batch queries. Returns a results array. Cannot be used together with file_path.
max_resultsinteger
Maximum results per filedefault: 50
find_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 params

Find 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...

Parameters* required
repo*string
Repository identifier
identifierstring
Symbol or module name to search for (e.g. 'bulkImport', 'IntakeService'). Use for single-identifier queries. Cannot be used together with identifiers.
identifiersarray
List of symbol or module names to search for (batch mode). Returns a results array. Cannot be used together with identifier.
max_resultsinteger
Maximum resultsdefault: 50
include_call_chainboolean
When true (singular mode only), each reference entry includes calling_symbols: symbols in that file whose bodies mention the identifier. Default false.default: false
check_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 params

Check 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.

Parameters* required
repo*string
Repository identifier
identifierstring
Single identifier to check
identifiersarray
Multiple identifiers to check in one call. Returns grouped results.
search_contentboolean
Also search file contents (not just imports). Set false for fast import-only check.default: true
max_content_resultsinteger
Max files to return per identifier for content search.default: 20
search_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 params

Search 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.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
query*string
Search query (matches column names and descriptions)
max_resultsinteger
Maximum number of results to returndefault: 20
model_patternstring
Optional glob to filter by model name (e.g., 'fact_*', 'dim_provider')
get_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 params

Get 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.

Parameters* required
fqnstring
PHP fully-qualified class name (e.g. 'App\Models\User'). Resolves to symbol_id via PSR-4. Alternative to symbol_id.
repo*string
Repository identifier (owner/repo or just repo name)
symbol_idstring
Single symbol ID (backward-compatible). Use symbol_ids for multi-symbol bundles.
symbol_idsarray
List of symbol IDs for a multi-symbol bundle. Imports are deduplicated across symbols that share a file.
token_budgetinteger
Max tokens to return. When set, symbols are ranked and trimmed to fit. Uses budget_strategy to prioritize.
output_formatstring
'json' (default) or 'markdown' — markdown renders a paste-ready document with imports, docstrings, and source blocks.one of json · markdowndefault: json
budget_strategystring
'most_relevant' (default) ranks by file centrality (import in-degree). 'core_first' keeps the primary symbol first, ranks rest by centrality. 'compact' strips source bodies — returns signatures only.one of most_relevant · core_first · compactdefault: most_relevant
include_callersboolean
When true, each symbol entry includes a 'callers' list of files that directly import its defining file.default: false
include_budget_reportboolean
When true, include a 'budget_report' field showing tokens used, symbols included/excluded, and strategy applied.default: false
get_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 params

Per-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...

Parameters* required
topinteger
Cap on slowest tools to return.default: 20
toolstring
Restrict the analysis to a single tool name.
ledgerboolean
Include ranking_ledger summary (per-repo and per-tool event counts, average confidence, identity hits, semantic usage). Reads telemetry.db ranking_events table populated since v1.78.0; requires perf_telemetry_enabled.default: false
windowstring
session = in-memory ring; others read telemetry.db.one of session · 1h · 24h · 7d · alldefault: session
compare_releasestring
Compare current session against a saved baseline at benchmarks/token_baselines/v{version}.json (e.g. "1.74.0"). Adds baseline_diff to the response with per-tool deltas in tokens_saved and latency.
check_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 params

Pin (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...

Parameters* required
forceboolean
Re-pin the canary before checking. Use after intentional provider/model upgrades.default: false
captureboolean
Pin a fresh canary instead of running the drift check. No-ops when a canary already exists unless force=True.default: false
thresholdnumber
Cosine-distance threshold above which the alarm fires (per-canary maximum, not mean).default: 0.05
tune_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 params

Learn 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...

Parameters* required
repostring
Limit tuning to a single repo. Default: every repo present in the ledger.
dry_runboolean
Compute proposed deltas without writing tuning.jsonc.default: false
explainboolean
Include per-signal correlations (mean confidence with/without semantic and identity channels) in the response.default: false
min_eventsinteger
Skip repos with fewer ledger events than this (defends against overfitting on small samples).default: 50
get_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 params

Get the current session context — files accessed, searches performed, and edits registered during this MCP session. Use to avoid re-reading the same files.

Parameters* required
max_filesinteger
Maximum number of files to return in files_accessed.default: 50
max_queriesinteger
Maximum number of queries to return in recent_searches.default: 20
get_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 params

Get 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.

Parameters* required
max_editsinteger
Maximum edited files to include.default: 10
max_filesinteger
Maximum focus files to include.default: 10
max_searchesinteger
Maximum key searches to include.default: 5
include_negative_evidenceboolean
Include dead-end searches (negative evidence) in snapshot.default: true
get_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 params

Per-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...

Parameters* required
repo*string
Repo identifier (owner/name, full id, or bare display name).
file_path*string
Path to the file within the indexed repo.
diff_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 params

Compare 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...

Parameters* required
current*object
Radar payload from current (e.g. PR branch). The `radar` field of a get_repo_health response.
baseline*object
Radar payload from baseline (e.g. base branch). The `radar` field of a get_repo_health response.
digestAgent 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 params

Agent 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...

Parameters* required
repo*string
Repo identifier (owner/name, full id, or bare display name).
since_shastring
Override the last-seen SHA (for re-running a delta).
max_hotspotsinteger
Cap on hotspot list (default 3).default: 3
max_dead_codeinteger
Cap on dead-code candidates (default 3).default: 3
max_changed_filesinteger
Cap on changed-files list (default 5).default: 5
plan_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 params

Plan 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.

Parameters* required
repo*string
Repository identifier.
modelstring
Optional. Your active model identifier (e.g. 'claude-haiku-4-5'). When supplied and adaptive_tiering is enabled, plan_turn invokes the tier-switch logic as a side effect — the exposed tool list is narrowed to the tier mapped to this model via config.jsonc:model_tier_map. Prefer this form over calling announce_model separately — it adds zero extra requests.
query*string
What you're looking for (task description or symbol name).
max_recommendedinteger
Maximum number of symbols to recommend.default: 5
register_editRegister file edits to invalidate caches. Call after editing files to clear BM25 cache and search result cache for the repo.3 params

Register file edits to invalidate caches. Call after editing files to clear BM25 cache and search result cache for the repo.

Parameters* required
repo*string
Repository identifier.
reindexboolean
If True, also reindex the files.default: false
file_paths*array
List of file paths that were edited.
audit_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 params

Audit 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...

Parameters* required
repostring
Repository identifier for cross-referencing symbols and files. If omitted, skips stale-reference and dead-path checks.
project_pathstring
Project directory to scan for config files. Defaults to cwd.
get_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 params

Get 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...

Parameters* required
file*string
File path within the repo (e.g. 'src/server.py')
repo*string
Repository identifier (owner/repo or just repo name)
depthinteger
Number of hops to traverse (1–3)default: 1
directionstring
'imports' (files this file depends on), 'importers' (files that depend on this file), or 'both'one of imports · importers · bothdefault: imports
cross_repoboolean
When true, include cross-repo edges (imports that resolve to packages in other indexed repos). Default: false.default: false
get_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 params

Diff 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.

Parameters* required
repo_a*string
First repo identifier (the 'before' snapshot)
repo_b*string
Second repo identifier (the 'after' snapshot)
get_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 params

Get 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'.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
class_name*string
Name of the class to analyse
get_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 params

Find 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.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
symbol_id*string
ID of the symbol to find relatives for
max_resultsinteger
Maximum results (default 10, max 50)default: 10
suggest_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 params

Suggest 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.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
get_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 params

Find 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...

Parameters* required
fqnstring
PHP fully-qualified class name (e.g. 'App\Models\User'). Resolves to symbol via PSR-4. Alternative to symbol.
repo*string
Repository identifier (owner/repo or just repo name)
depthinteger
Import hops to traverse (1 = direct importers only, max 3). Default 1.default: 1
symbol*string
Symbol name or ID to analyse (e.g. 'calculateScore' or a full symbol ID)
call_depthinteger
When > 0, also find symbols that *call* this symbol (call-level analysis). Returns a callers list alongside the import-level confirmed/potential. Max 3. Default 0 (disabled).default: 0
cross_repoboolean
When true, also find files in other indexed repos that consume this repo's package. Default: false.default: false
source_budgetinteger
Max tokens for source snippets across all files (default 8000). Files are prioritized by reference count.default: 8000
include_sourceboolean
When true, each confirmed file includes source_snippets (lines referencing the symbol) and symbols_in_file (nearby symbol signatures). Use for fix-ready context without extra tool calls. Default false.default: false
decorator_filterstring
Optional: filter confirmed results to only those containing symbols with this decorator (case-insensitive substring match)
include_depth_scoresboolean
When true, adds impact_by_depth (files grouped by hop distance) and per-depth risk scores. overall_risk_score and direct_dependents_count are always included. Default false.default: false
get_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 params

Return 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
depthinteger
Maximum hops to traverse (1–5). Default 3.default: 3
directionstring
'callers' = who calls this symbol; 'callees' = what this symbol calls; 'both' (default).one of callers · callees · bothdefault: both
symbol_id*string
Symbol name or full ID to analyse. Use search_symbols to find IDs.
get_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 params

Show 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
symbol_id*string
Symbol name or full ID to analyse. Use search_symbols to find IDs.
get_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 params

Trace 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
symbol*string
Symbol name or full ID as returned by search_symbols.
max_commitsinteger
Maximum commits to analyse (default 25, max 100).default: 25
get_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 params

Produce 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...

Parameters* required
daysinteger
Churn look-back window in days (default 90).default: 90
repo*string
Repository identifier (owner/repo or just repo name)
base_refstring
Base SHA/ref to compare from. Defaults to the SHA stored at index time.
head_refstring
Head SHA/ref to compare to (default 'HEAD').default: HEAD
get_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 params

Detect 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
get_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 params

Return 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
module_path*string
File path within the repo (e.g. 'src/utils.py')
get_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 params

Check 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
rulesarray
Layer definitions. Each entry: {name, paths: [...], may_not_import: [...]}. If omitted, reads from .jcodemunch.jsonc architecture.layers.
check_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 params

Check 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
new_name*string
Proposed new symbol name (not a full ID, just the name).
symbol_id*string
Symbol ID to rename (e.g. 'src/utils.py::helper#function'). Bare name accepted when unambiguous.
check_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 params

Composite 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...

Parameters* required
repo*string
Repository identifier
symbol*string
Symbol ID or name to evaluate for deletion safety.
cross_repoboolean
Include other indexed repos in the analysis (default true).default: true
include_runtimeboolean
Consult runtime_calls for production evidence (default true).default: true
find_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 params

Find 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...

Parameters* required
repo*string
Repository identifier
symbol*string
Symbol ID or name of the interface/abstract/method to analyse.
cross_repoboolean
Also search other indexed repos via the package registry (default false).default: false
max_resultsinteger
Cap on returned implementations (default 50).default: 50
token_budgetinteger
Hard cap on response payload (default 4000).default: 4000
include_subclassesboolean
Walk class hierarchy for class-kind targets (default true).default: true
rank_by_importanceboolean
Sort by confidence then PageRank × byte_length (default true).default: true
relationship_kindsarray
Optional whitelist: subclass_override, interface_impl, duck_typed, decorator_handler, subclass. Defaults to all.
plan_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 params

Generate 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
depthinteger
Import hops to traverse (1-3, default 2).default: 2
symbol*string
Symbol name or ID to refactor. For extract, comma-separated list (e.g. 'helper,process_data').
new_filestring
Destination file path for move/extract operations.
new_namestring
New name for rename operations.
new_signaturestring
New function signature (e.g. 'foo(x, y, z=0)').
refactor_type*string
Type of refactoring to plan.one of rename · move · extract · signature
get_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 params

Find 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
max_resultsinteger
Cap on returned dead symbols (default 100, 0 = unlimited). _meta.truncated + _meta.total_matches flag when capped.default: 100
file_patternstring
Optional glob (e.g. `src/**`, `*.py`) — only analyse symbols whose file matches.
include_testsboolean
Include test files in analysis (default false).default: false
min_confidencenumber
Minimum confidence threshold 0.0–1.0 (default 0.5 = at least 2/3 signals).default: 0.5
get_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 params

Identify 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
file_path*string
Relative file path within the repo (e.g. 'src/utils.py').
min_callersinteger
Minimum number of distinct caller files (default 2).default: 2
min_complexityinteger
Minimum cyclomatic complexity threshold (default 5).default: 5
get_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 params

Return 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
symbol_id*string
Full symbol ID as returned by search_symbols or get_file_outline.
get_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 params

Return 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...

Parameters* required
daysinteger
Look-back window in days (default 90).default: 90
repo*string
Repository identifier (owner/repo or just repo name)
target*string
Relative file path (e.g. 'src/utils.py') or a full symbol ID.
get_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 params

Return 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...

Parameters* required
daysinteger
Churn look-back window in days (default 90).default: 90
repo*string
Repository identifier (owner/repo or just repo name)
top_ninteger
Number of results to return (default 20).default: 20
min_complexityinteger
Minimum cyclomatic complexity to include (default 2).default: 2
get_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 params

Return 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...

Parameters* required
daysinteger
Churn look-back window for hotspot calculation (default 90).default: 90
repo*string
Repository identifier (owner/repo or just repo name)
get_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 params

Find 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
max_resultsinteger
Cap on returned symbols (default 100).default: 100
file_patternstring
Optional glob to narrow which source files are analysed (e.g. 'src/**/*.py').
min_confidencenumber
Minimum confidence to include (0.0–1.0, default 0.5).default: 0.5
search_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 params

Cross-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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
patternstring
Preset name (empty_catch, bare_except, deeply_nested, nested_loops, god_function, eval_exec, hardcoded_secret, todo_fixme, magic_number, reassigned_param) or custom query (call:NAME, string:/REGEX/i, comment:/REGEX/i, nesting:N+, loops:N+, lines:N+). Mutually exclusive with category.
categorystring
Run all presets in a category: security, error_handling, complexity, performance, maintenance, or all.
languagestring
Restrict scan to one language (e.g. 'python', 'typescript').
max_resultsinteger
Cap on total matches returned (default 50).default: 50
file_patternstring
Glob filter on file paths (e.g. 'src/**/*.py').
get_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 params

Return 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
scopestring
Limit to a subdirectory prefix (e.g. 'src/core')
top_ninteger
Number of top symbols to return (default 20, max 200)default: 20
algorithmstring
'pagerank' (default) = full PageRank on import graph; 'degree' = simple in-degree count (faster).one of pagerank · degreedefault: pagerank
find_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 params

Find 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
scopestring
Optional glob to limit to a subdirectory (e.g. 'src/core/*').
min_sizeinteger
Minimum byte_length per symbol (default 30; filters out getters/wrappers).default: 30
thresholdnumber
Minimum combined similarity to form a cluster edge (0.0–1.0). Default 0.80.default: 0.8
max_clustersinteger
Cap on clusters returned (default 25).default: 25
token_budgetinteger
Hard cap on the response's payload (default 4000).default: 4000
include_kindsarray
Symbol kind whitelist. Defaults to ['function', 'method', 'class'].
include_testsboolean
When False (default), test files are skipped — tests intentionally share shapes.default: false
semantic_weightnumber
Embedding weight when embeddings are present (0.0–1.0). Default 0.6.default: 0.6
get_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 params

Query-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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
scopestring
Optional glob to limit to a subdirectory (e.g. 'src/core/*').
max_per_fileinteger
Max signatures emitted per file (default 5, capped at 50).default: 5
token_budgetinteger
Hard cap on returned tokens (default 2048).default: 2048
include_kindsarray
Optional list of symbol kinds to restrict results (e.g. ['class', 'function']).
find_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 params

Find 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.

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
granularitystring
'symbol' (default) returns dead symbols; 'file' returns dead files only.one of symbol · filedefault: symbol
include_testsboolean
Treat test files as live roots (default false — test files are excluded from dead code candidates).default: false
min_confidencenumber
Minimum confidence threshold 0.0–1.0. Default 0.8. Use 1.0 for provably unreachable only.default: 0.8
entry_point_patternsarray
Additional glob patterns to treat as live roots (e.g. 'cli/*.py', 'scripts/*').
get_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 params

Assemble 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
query*string
Natural language or identifier describing the task (max 500 chars)
scopestring
Optional glob pattern to limit search to a subdirectory (e.g. 'src/core/*').
fusionboolean
Enable multi-signal fusion (Weighted Reciprocal Rank) for ranking. Combines lexical, structural, and identity channels.default: false
strategystring
'combined' (default) = BM25 + PageRank weighted sum. 'bm25' = pure text relevance. 'centrality' = PageRank only, filtered to query-matching symbols.one of combined · bm25 · centralitydefault: combined
token_budgetinteger
Hard cap on returned tokens (default 4000).default: 4000
include_kindsarray
Optional list of symbol kinds to restrict results (e.g. ['class', 'function']).
assemble_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 params

Task-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.

Parameters* required
repo*string
Repository identifier
task*string
Natural-language task description. Anchors auto-extracted from task text.
intentstring
Optional override; auto-detected from task when omitted.one of explore · debug · refactor · extend · audit · review
includearray
Optional whitelist of stages to run (e.g. ['anchor', 'blast', 'runtime']).
symbolsarray
Optional anchor symbol IDs or names; auto-extracted from task when omitted.
cross_repoboolean
When True, layer cross-repo signals (default false).default: false
token_budgetinteger
End-to-end hard cap on returned tokens (default 8000).default: 8000
get_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 params

Map 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...

Parameters* required
repo*string
Repository identifier — must be locally indexed with index_folder
since_shastring
Compare from this git SHA or ref. Defaults to the SHA stored at index time.
until_shastring
Compare to this git SHA or ref (default 'HEAD').default: HEAD
max_blast_depthinteger
Hop limit when include_blast_radius=true (default 3, max 5).default: 3
include_blast_radiusboolean
Also return downstream importers (blast radius) for each changed symbol (default false).default: false
embed_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 params

Precompute 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
forceboolean
Recompute all embeddings even if they already exist (default false).default: false
batch_sizeinteger
Symbols per embedding batch (default 50).default: 50
get_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 params

Return 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...

Parameters* required
repostring
Optional repo ID to filter. If omitted, returns the full cross-repo map.
get_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 params

Surface 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...

Parameters* required
repos*array
List of indexed repo IDs (owner/name or bare names). Must be ≥2.
classifyboolean
Attach verdict tier per contract. Default true.default: true
churn_daysinteger
Window for stability scoring (default 90).default: 90
token_budgetinteger
Hard cap on response payload (default 4000).default: 4000
max_contractsinteger
Cap on returned contracts (default 50).default: 50
min_importersinteger
Minimum distinct external repo importers to surface a contract (default 2).default: 2
include_internalboolean
Surface leaky_internal contracts (architecture violations). Default true.default: true
include_dead_contractsboolean
Surface public symbols with zero external importers. Default false.default: false
get_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 params

Discover 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,...

Parameters* required
daysinteger
Git co-churn look-back window in days (default 90)default: 90
repo*string
Repository identifier (owner/repo or just repo name)
min_plate_sizeinteger
Minimum files per plate to include; smaller groups go to isolated_files (default 2)default: 2
get_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 params

Discover 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...

Parameters* required
kindstring
Filter gateways by kind: http, cli, event, task, main, test.one of http · cli · event · task · main · test
repo*string
Repository identifier (owner/repo or just repo name)
symbolstring
Symbol name or ID for lookup mode. When provided, returns only chains containing that symbol. Omit for discovery mode (all chains).
max_depthinteger
BFS depth limit per chain (1–8, default 5).default: 5
include_testsboolean
Include test_* functions as gateways (default false).default: false
render_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 params

Render 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...

Parameters* required
themestring
Visual theme: 'flow' (architecture), 'risk' (impact), 'minimal' (docs). Default: flow.one of flow · risk · minimaldefault: flow
source*object
Raw output dict from any supported graph-producing tool.
max_nodesinteger
Maximum nodes before smart pruning (default 80, range 10–200).default: 80
get_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 params

Auto-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,...

Parameters* required
repo*string
Repository identifier (owner/repo or display name).
categorystring
Category to return: all, infra, ci, config, deps, api, data.one of all · infra · ci · config · deps · apidefault: all
scope_pathstring
Optional subpath (relative to source_root) to restrict intel discovery to a single workspace member — e.g. 'packages/api'. When omitted, the whole repo is scanned. Use `list_workspaces` to enumerate the available members. Cross-references still consult the global index so a package's container still resolves against repo-level code.
list_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 params

Enumerate 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}...

Parameters* required
repo*string
Repository identifier (owner/repo or display name).
winnow_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 params

Run 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...

Parameters* required
repo*string
Repository identifier (owner/repo or just repo name)
orderstring
one of asc · descdefault: desc
rank_bystring
Ranking axis for survivors.one of importance · complexity · churn · namedefault: importance
criteria*array
Ordered list of filters. Each item is {axis, op, value}. Supported axes: kind (in/eq), language (in/eq), name (eq/matches), file (matches - glob), complexity (>,<,>=,<=,==), decorator (contains), calls (contains - matches call_references), summary (contains), churn (>,<,>=,<=,== with optional window_days, default 90). All criteria must match (AND).
max_resultsinteger
Hard cap on returned results.default: 20
set_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 params

Explicit 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...

Parameters* required
tier*string
one of core · standard · full
announce_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 params

Agent 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...

Parameters* required
model*string
Your active model identifier, e.g. 'claude-haiku-4-5'.

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.

TaskTraditional approachWith jCodeMunch
Find a functionOpen and scan large filesSearch symbol → fetch exact implementation
Understand a moduleRead broad file regionsPull only relevant symbols and imports
Explore repo structureTraverse file after fileQuery outlines, trees, and targeted bundles

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


Documentation

DocWhat it covers
QUICKSTART.mdZero-to-indexed in three steps
USER_GUIDE.mdFull tool reference, workflows, and best practices
AGENT_HOOKS.mdAgent hooks and prompt policies
CONFIGURATION.mdJSONC config file reference, migration from env vars
GROQ.mdGroq Remote MCP integration, deployment, gcm CLI
HEADLESS.mdUsing jCodeMunch with claude -p (and the jragmunch CLI)
ARCHITECTURE.mdInternal design, storage model, and extension points
LANGUAGE_SUPPORT.mdSupported languages and parsing details
CONTEXT_PROVIDERS.mddbt, Git, and custom context provider docs
TROUBLESHOOTING.mdCommon issues and fixes
AGENT_INSTALL_UNIVERSAL.mdPaste-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.76 (2026-06-22) — Quality gates: CI lint (ruff) + coverage floor
  • v1.108.75 (2026-06-22) — Quality gates: live core_compact ceiling + schema/dispatch param parity
  • v1.108.74 (2026-06-22) — Harden: tool errors carry isError (MCP protocol conformance)

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


Mentioned by

  • Artur Skowroński (VirtusLab) — "roughly 80% fewer tokens, or 5× more efficient — index once, query cheaply forever" · GitHub All-Stars #15
  • Julian Horsey (Geeky Gadgets) — "3,850 tokens reduced to just 700 — a 5.5× improvement" · JCodeMunch AI Token Saver
  • Sion Williams — "preserving tokens for tasks that actually require reasoning rather than retrieval" · March 2026 AI Workflow Update
  • Traci Lim (AWS · ASEAN AI Lead) — "structural queries that native tools can't answer: find_importers, get_blast_radius, get_class_hierarchy, find_dead_code" · 5 Repos That Save Token Usage in Claude Code
  • Eric Grill — "context is the scarce resource. Cut it by 90% and the whole stack gets cheaper and more reliable" · jCodemunch: Context Engine for AI Agents

Full recognition page →


Commercial licenses

jCodeMunch-MCP is free for non-commercial use.

Commercial use requires a paid license.

jCodeMunch-only licenses

  • Builder — $79 — 1 developer
  • Studio — $349 — up to 5 developers
  • Platform — $1,999 — org-wide internal deployment

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

  • Munch Trio Builder Bundle — $99
  • Munch Trio Studio Bundle — $449
  • Munch Trio Platform Bundle — $2,499

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, complexity, churn, test gaps, and volume), automatic response secret redaction (AWS/GCP/Azure/JWT/GitHub tokens scrubbed before reaching the LLM context window), and cross-language AST pattern matching (search_ast — 10 preset anti-pattern detectors + custom mini-DSL for structural queries like call:*.unwrap, string:/password/i, nesting:5+; works across all 70+ languages with universal node-type mapping).


Real-world results

Reproducible token efficiency benchmark

Measured with tiktoken cl100k_base across three public repos. Workflow: search_symbols (top 5) + get_symbol_source × 3 per query. Baseline: all source files concatenated (minimum cost for an agent that reads everything). Full methodology and harness →

RepositoryFilesSymbolsBaseline tokensjCodeMunch tokensReduction
expressjs/express3411773,838~1,300 avg98.4%
fastapi/fastapi1561,359214,312~15,600 avg92.7%
gin-gonic/gin4080584,892~1,730 avg98.0%
Grand total (15 task-runs)1,865,21092,51595.0%

Per-query results range from 79.7% (dense FastAPI router query) to 99.8% (sparse context-bind query on Express). The 95% figure is the aggregate. Run python benchmarks/harness/run_benchmark.py to reproduce.

A/B test on production codebase

Independent 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:

MetricNativeJCodeMunch
Success rate72%80%
Timeout rate40%32%
Mean cost/iteration$0.783$0.738
Mean cache creation104,13593,178 (−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


Why agents need this

Most agents still inspect codebases like tourists trapped in an airport gift shop:

  • open entire files to find one function
  • re-read the same code repeatedly
  • consume imports, boilerplate, and unrelated helpers
  • burn context window on material they never needed in the first place

jCodeMunch fixes that by giving them a structured way to:

  • search symbols by name, kind, or language — with fuzzy matching and optional semantic/hybrid search
  • inspect file and repo outlines before pulling source
  • retrieve exact symbol implementations only
  • grab a token-budgeted context bundle or ranked context pack for a task
  • fall back to text search when structure alone is not enough
  • detect dead code, trace impact, rank by centrality, and map git diffs to symbols
  • plan the next turn with plan_turn — confidence-guided routing before the first read
  • assemble a whole task's context in one call with assemble_task_context — intent-classified, multi-tool, single token budget
  • track session state and avoid re-reading files the agent already explored

Agents do not need bigger and bigger context windows.

They need better aim.


What you get

Symbol-level retrieval

Find and fetch functions, classes, methods, constants, and more without opening entire files.

Faster repo understanding

Inspect repository structure and file outlines before asking for source.

Lower token spend

Send the model the code it needs, not 1,500 lines of collateral damage.

One-call task orchestration — the tools compose, they don't sit in isolation

The retrieval primitives below are not a disconnected bag of tools the agent has to wire together by hand. Two composition tools drive the rest:

  • assemble_task_context takes a natural-language task and returns a single source-attributed context capsule under a token budget. It auto-classifies the task into one of six intents (explore / debug / refactor / extend / audit / review), auto-extracts the anchor symbols, and runs the intent-appropriate sequence of the tools below end-to-end — so the agent gets the whole context for a task in one request instead of chaining five. Every entry is tagged with its stage and source_tool, so the provenance is auditable.
  • plan_turn is the opening move: it analyzes the query against the index and returns a confidence-guided route — which tools to call, on which symbols, under a turn budget — before the first read. Low confidence means "this probably doesn't exist," so the agent stops instead of burning a budget hunting for a feature that isn't there.
  • get_ranked_context packs the most relevant symbols for a query into a fixed token budget (BM25 + PageRank), when you want a ranked context pack rather than a full intent sequence.

The point: jCodeMunch is structured retrieval with an orchestration layer over it, not a pile of primitives. The composition tools run the right sub-tools, in the right order, under one budget, in one call.

Structural queries native tools can't answer

find_importers tells you what imports a file. get_blast_radius tells you what breaks if you change a symbol, with depth-weighted risk scores and optional source snippets. get_class_hierarchy traverses inheritance chains. get_call_hierarchy traces callers and callees N levels deep using AST-derived call graphs, with optional LSP-enriched dispatch resolution for interface/trait method calls. find_dead_code finds symbols and files unreachable from any entry point. get_untested_symbols finds functions with no evidence of test-file reachability — the intersection of import-graph analysis and test-file detection. get_changed_symbols maps a git diff to the exact symbols that were added, modified, or removed. get_symbol_importance ranks your codebase by architectural centrality using PageRank on the import graph. get_hotspots surfaces the riskiest code by combining complexity with git churn. get_dependency_cycles detects circular imports. get_coupling_metrics measures module coupling and instability. get_tectonic_map discovers the logical module topology by fusing three coupling signals (imports, shared references, git co-churn) — revealing hidden module boundaries, misplaced files, and god-module risk without any configuration. get_signal_chains traces how external signals (HTTP requests, CLI commands, scheduled tasks, events) propagate through the codebase via the call graph — discovery mode maps all entry-point-to-leaf pathways and reports orphan symbols, lookup mode tells you which user-facing chains a specific symbol participates in (e.g. "validate_email sits on POST /api/users and cli:import-users"). These are not "faster grep" — they are questions grep cannot answer at all.

Agent config hygiene

audit_agent_config scans your CLAUDE.md, .cursorrules, copilot-instructions.md, and other agent config files for token waste: per-file token cost, stale symbol references (cross-referenced against the index — catches renamed or deleted functions), dead file paths, redundancy between global and project configs, bloat, and scope leaks. No other tool can tell you "line 15 references a function that was renamed three weeks ago."

Symbol provenance and PR risk profiling

get_symbol_provenance is git archaeology: given a symbol, it traces every commit that touched it, classifies each into semantic categories (creation, bugfix, refactor, feature, perf, rename, revert), extracts commit intent, and generates a human-readable narrative explaining who created it, why, and how it evolved. get_pr_risk_profile produces a unified risk assessment for a branch or PR — one call fuses blast radius, complexity, churn, test gaps, and change volume into a composite risk score (0.0–1.0) with actionable recommendations. get_delivery_metrics quantifies durable-change delivery over a window: of the non-merge commits in the last N days, how many landed and stuck versus were reverted or re-touched (churn-back) within a short horizon — with churn-hub files (CHANGELOG, version, a monolithic dispatch module) excluded from the rework signal so a shared ledger can't masquerade as rework. The durable count is the honest numerator for a cost-per-outcome ratio: pair it with AI spend (the delivery CLI takes --cost) to show how much got done for how little, instead of rewarding raw activity. All responses are automatically scanned for leaked credentials (AWS keys, JWTs, GCP service accounts, etc.) and redacted before reaching the LLM.

Cross-language AST pattern matching

search_ast brings structural code analysis to every language jCodeMunch indexes — write one query, match across all 70+ languages. Preset anti-patterns detect common problems without any configuration: empty_catch (silently swallowed errors), bare_except (catch-all handlers), deeply_nested (5+ control-flow levels), nested_loops (O(n³)+ performance risk), god_function (100+ line functions), eval_exec (injection-risk dynamic execution), hardcoded_secret (credential patterns in strings), todo_fixme (unfinished work markers), magic_number (unexplained numeric constants), and reassigned_param (overwritten function parameters). Run category='all' for a full sweep, or focus on security, error_handling, complexity, performance, or maintenance. Custom queries use a mini-DSL: call:*.unwrap (find method calls by glob), string:/password/i (regex over string literals), comment:/TODO/i (regex in comments), nesting:5+, loops:3+, lines:80+ (threshold queries). Every match is attributed to its enclosing indexed symbol with complexity metadata — so you can see not just where the problem is, but how bad the surrounding function already is.

Multi-axis constraint queries

winnow_symbols composes signals that every other tool exposes separately — kind, complexity, decorator, direct call references, file glob, name regex, git churn, and PageRank importance — into a single AND-intersected query. Agents stop making four or five calls and merging results by hand: "functions that call db.Exec, cyclomatic > 10, churned in the last 30 days, ranked by importance" resolves in one round trip. Supported axes expose their own operator set (eq, in, matches, contains, numeric comparisons); the window for churn-based filters is per-criterion. Results include per-symbol importance, complexity, and churn scores so the agent can explain why each survivor made the cut.

Better engineering workflows

Useful for onboarding, debugging, refactoring, impact analysis, and exploring unfamiliar repos without brute-force file reading.

Refactoring Planner

plan_refactoring generates exact edit-ready instructions for rename, move, extract, and signature change operations. Returns {old_text, new_text} blocks compatible with any editor's find-and-replace, plus import rewrites, collision detection, new file generation, and multi-file coordination.

Calibrated retrieval signals (v1.74.0+ telemetry initiative)

Every retrieval result now ships with three machine-readable health signals so agents can stop guessing whether to trust the response:

  • _meta.confidence — calibrated 0–1 score combining top-1/top-2 score gap, top-1 strength, identity-match presence, and freshness. Lets an agent gate follow-up get_symbol_source calls on a single number.
  • _freshness ∈ {fresh, edited_uncommitted, stale_index} on every result entry, plus a _meta.freshness summary. Derived from index SHA vs git rev-parse HEAD and per-file mtime checks.
  • Per-tool latency telemetry (p50/p95/max/error_rate) exposed via get_session_stats.latency_per_tool and the analyze_perf tool. Optional SQLite sink (~/.code-index/telemetry.db) for cross-session analysis.

The tune_weights tool reads the persistent ranking ledger and learns per-repo retrieval weights (saved to ~/.code-index/tuning.jsonc). check_embedding_drift pins a 16-string canary to detect silent provider model changes. benchmarks/replay/ provides a CI-friendly retrieval-quality regression gate (nDCG/MRR/Recall) that every release runs against.

The suggest_corrections tool (and the reflect CLI) close the loop: they mine the same ranking ledger for retrieval regret — where retrieval failed and the agent had to re-ask — and return a prioritized, explainable set of suggested fixes (a CLAUDE.md routing or glossary line as a unified-diff preview, an index-freshness hint, a stale-config finding, a dry-run weight proposal). It is read-only by design: it suggests a patch and shows you the diff; applying it is your keystroke, never the server's. Requires perf_telemetry_enabled (it has a ledger to read only then) and returns an honest hint when off.

Local-first speed

Indexes are stored locally for fast repeated access.


How it works

jCodeMunch indexes local folders or GitHub repos, parses source with tree-sitter, extracts symbols, and stores structured metadata alongside raw file content in a local index. Each symbol includes enough information to be found cheaply and retrieved precisely later.

That includes metadata like:

  • signature
  • kind
  • qualified name
  • one-line summary
  • byte offsets into the original file

So when the agent wants a symbol, jCodeMunch can fetch the exact source directly instead of loading and rescanning the full file.


Background behavior, fully disclosed

Everything jCodeMunch does beyond answering a tool call is listed here. All of it is visible, opt-in or opt-out, and reversible.

  • File watching. The watch / watch-all / watch-claude commands (and watch: true in config) re-index files when they change. Watching runs inside a process you started and stops when that process exits. Nothing monitors your filesystem unless a jCodeMunch process you launched is running.
  • Login service — explicit opt-in only. jcodemunch-mcp watch-install registers watch-all as a login service (Windows Task Scheduler / macOS launchd / Linux systemd) so indexes stay fresh across reboots. This happens only when you run watch-install yourself; init, install, and normal server use never register a service. Inspect it with watch-status; remove it with watch-uninstall.
  • Anonymous savings telemetry. The server periodically sends a random anonymous ID plus aggregate token-savings counters to the project's public community meter. No code, no file paths, no repo names, no PII — counters only. The sender is a single background daemon thread that starts lazily on the first share (never at import, and never if you have opted out), so a plain import has no background side effect. Opt out with share_savings: false in config.jsonc or JCODEMUNCH_SHARE_SAVINGS=0; redirect the endpoint with JCODEMUNCH_TELEMETRY_URL.
  • Agent hooks. init / install can write hook entries (auto-reindex on edit, read-interception nudges) into your MCP client's settings. They're offered during the interactive flow, shown before writing, and fully removed by uninstall.
  • Local index storage. Indexes live at ~/.code-index/ (override with CODE_INDEX_PATH). Delete the directory and every trace of indexing is gone.
  • Live session journal. While the server runs, it periodically writes a small _session_live.json in ~/.code-index/ recording the files and searches the agent touched this session (paths and query strings only, no file contents). It exists so the out-of-process PreCompact hook can restore session orientation after context compaction. Throttled, atomically written, overwritten in place; disable with JCODEMUNCH_LIVE_JOURNAL=0.

The base package makes no other network calls and leaves no other persistent processes. AI-summary extras call their configured provider's API only when you enable them — see the extras matrix under Start fast.


Start fast

Ubuntu 24.04+ / Debian 12+: System Python is externally managed (PEP 668). Use pipx install jcodemunch-mcp or uv tool install jcodemunch-mcp instead of bare pip install.

Option A: One command (recommended)

pip install jcodemunch-mcp
jcodemunch-mcp init

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 (PreToolUse read guard + PostToolUse auto-reindex + PreCompact session snapshot), optionally indexes your project, and audits your agent config files for token waste. Run jcodemunch-mcp init --help for all flags.

Prefer a one-line CLAUDE.md? From v1.71.0 the server exposes a jcodemunch_guide tool that returns the same policy snippet claude-md --generate prints — with the running version embedded. Keep this single line in your CLAUDE.md / AGENT.md and the guide always matches the installed server:

Call the jcodemunch_guide tool and strictly follow its instructions.

The tool is force-included, so it can't be hidden by disabled_tools or tier filtering.

For non-interactive CI or scripting:

jcodemunch-mcp init --yes --claude-md global --hooks --index --audit

Option B: Manual setup

1. Install it

pip install jcodemunch-mcp

Want semantic search? Install the local embedding extra for zero-config semantic search — no API keys, no internet after first download:

pip install "jcodemunch-mcp[local-embed]"  # bundled ONNX encoder (recommended)
jcodemunch-mcp download-model              # fetch model (~23 MB, one-time)

Want AI-generated summaries? Install the extra for your provider:

pip install "jcodemunch-mcp[anthropic]"   # Claude
pip install "jcodemunch-mcp[gemini]"      # Gemini
pip install "jcodemunch-mcp[openai]"      # OpenAI-compatible
pip install "jcodemunch-mcp[all]"         # all providers + local embeddings

Without an extra, summaries fall back to signatures (which still works — you just get shorter descriptions). Run jcodemunch-mcp config --check to verify your provider is installed and working.

Extras matrix — system surfaces each extra pulls in

Most extras are pure-Python and self-contained. A few pull libraries that touch system surfaces worth noting for managed-endpoint and SOC 2 / HIPAA-adjacent deployments. For the base package alone, none of these surfaces are introduced.

ExtraTransitive dependencies of noteSystem surfaces
(base, no extra)nonenone
[local-embed]onnxruntimelocal CPU inference (no network after model download); model fetched on first run
[anthropic]anthropic SDKoutbound HTTPS to api.anthropic.com when AI summaries are enabled
[gemini]google-generativeaioutbound HTTPS to Google AI endpoints when AI summaries are enabled
[openai]openai SDKoutbound HTTPS to api.openai.com (or OPENAI_API_BASE) when AI summaries are enabled
[groq]openai SDKoutbound HTTPS to Groq endpoints; used by the gcm CLI and speedreview Action
[groq-voice]sounddevice, numpymicrophone access — sounddevice.InputStream opens the system audio device when the voice path is invoked
[groq-explain]Pillowimage decode / re-encode of attached screenshots
[all]union of all the aboveunion of all surfaces above, including microphone ([groq-voice]) and image libraries ([groq-explain])

For managed-endpoint deployments where microphone access on developer machines is policy-restricted (HIPAA, SOC 2, finance), pin to the base package or to the specific provider extras you need. The voice and explain paths are opt-in features, not part of the core MCP server functionality, and [all] is the only extra that bundles them together.

2. Add it to your MCP client

If you’re using Claude Code, pick whichever matches what you installed in step 1.

Pip install (simplest, what most people do):

claude mcp add -s user jcodemunch jcodemunch-mcp

The -s user flag registers it at user scope so it's available in every project. Without it, the registration is project-local and you'll see it missing the next time you cd elsewhere. If jcodemunch-mcp isn't found on PATH (common on Windows where pip install --user installs to AppData\Roaming\Python\PythonXYZ\Scripts\), use the absolute path:

# Windows
claude mcp add -s user jcodemunch "C:\Users\YOU\AppData\Roaming\Python\Python312\Scripts\jcodemunch-mcp.exe"
# macOS/Linux — check `which jcodemunch-mcp` first
claude mcp add -s user jcodemunch "$(which jcodemunch-mcp)"

uvx (no pip install required, but uv must be on PATH):

claude mcp add -s user jcodemunch uvx jcodemunch-mcp

'uvx' is not recognized (Windows / Cursor / any client)? uvx ships with uv. Install it with powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex", then fully restart your editor so it picks up the new PATH. To skip uv entirely: python -m pip install the package and launch with command: "python", args: ["-m", "jcodemunch_mcp"] instead.

If /mcp reports failed with no reason, run claude --mcp-debug or check %USERPROFILE%\AppData\Roaming\Claude\logs\mcp*.log — the /mcp summary hides the actual error.

If you’re using Paperclip (the multi-agent orchestration platform), add a .mcp.json to your workspace root:

{
  "mcpServers": {
    "jcodemunch": {
      "type": "stdio",
      "command": "uvx",
      "args": ["jcodemunch-mcp"]
    },
    "jdocmunch": {
      "type": "stdio",
      "command": "uvx",
      "args": ["jdocmunch-mcp"]
    }
  }
}

Paperclip’s Claude Code agents auto-detect .mcp.json at startup. Add both servers to give your agents symbol search + doc navigation without blowing the token budget.

3. Tell your agent to actually use it

This matters more than people think.

Installing jCodeMunch makes the tools available. It does not guarantee the agent will stop its bad habit of brute-reading files unless you instruct it to prefer symbol search, outlines, and targeted retrieval. The changelog specifically calls out improved onboarding around this because it is a real source of confusion for first-time users.

A simple instruction like this helps:

Use jcodemunch-mcp for code lookup whenever available. Prefer symbol search, outlines, and targeted retrieval over reading full files.

Note: jcodemunch-mcp init handles steps 2 and 3 automatically. For a comprehensive guide on enforcing these rules through agent hooks and prompt policies, see AGENT_HOOKS.md.


Starter Packs

Pre-built indexes for popular frameworks and libraries. Skip the initial indexing step — install a pack and start querying immediately.

# List available packs
jcodemunch-mcp install-pack --list

# Install a free pack
jcodemunch-mcp install-pack fastapi

# Install a licensed pack
jcodemunch-mcp install-pack express --license YOUR-KEY

Free packs require no license. Licensed packs require a jCodeMunch license. Use --force to re-download an already-installed pack.


Groq Integration

Use jCodeMunch as a remote MCP tool with Groq's ultra-fast inference — answer codebase questions in seconds with zero local setup.

from openai import OpenAI

client = OpenAI(api_key="YOUR_GROQ_KEY", base_url="https://api.groq.com/openai/v1")

response = client.responses.create(
    model="llama-3.3-70b-versatile",
    input="What does parse_file do in jgravelle/jcodemunch-mcp?",
    tools=[{
        "type": "mcp",
        "server_label": "jcodemunch",
        "server_url": "https://YOUR_JCODEMUNCH_URL",
        "headers": {"Authorization": "Bearer YOUR_TOKEN"},
        "server_description": "Code intelligence via tree-sitter AST parsing.",
        "require_approval": "never",
    }],
)

Groq handles MCP tool discovery and execution server-side — one API call, no orchestration needed.

Self-host with Docker + Caddy for auto-TLS:

DOMAIN=mcp.example.com JCODEMUNCH_HTTP_TOKEN=secret docker compose up -d

See GROQ.md for the full tutorial: allowed-tools presets, model recommendations, deployment options, and validation scripts.

speedreview — AI Code Review GitHub Action

Get a structured PR review in under 5 seconds:

# .github/workflows/speedreview.yml
- uses: jgravelle/jcodemunch-mcp/speedreview@v1.108.52
  with:
    groq_api_key: ${{ secrets.GROQ_API_KEY }}

For stricter supply-chain hygiene, pin to the tag's commit SHA instead of the tag itself (git ls-remote https://github.com/jgravelle/jcodemunch-mcp refs/tags/v1.108.52). The action installs pinned package versions by default and exposes jcodemunch_version / openai_version inputs for override.

See speedreview/README.md for full setup and configuration.

gcm — Codebase Q&A CLI

Ask any question about any codebase. Get an answer in under 3 seconds.

pip install jcodemunch-mcp[groq]
export GROQ_API_KEY=gsk_...

# Ask about a GitHub repo (auto-indexes on first use)
gcm "how does authentication work?" --repo pallets/flask

# Ask about the current directory
gcm "where are the API routes defined?"

# Interactive chat mode
gcm --chat --repo facebook/react

# Use the fast 8B model
gcm "what does parse_file do?" --fast

Combines jCodeMunch's token-efficient retrieval (BM25 + PageRank) with Groq's 280+ tok/s inference for near-instant answers. See gcm --help for all options.

gcm --voice — Voice-to-Codebase

Speak a question, hear the answer. Full audio loop: Whisper STT → retrieval → LLM → Orpheus TTS.

pip install jcodemunch-mcp[groq-voice]

# Voice conversation with a codebase
gcm --voice --repo pallets/flask

# Press Enter to start recording, Enter again to stop
# Or type a question directly as text fallback

Push-to-talk via Enter key. Caps answers to ~100 words for natural spoken delivery. Requires a microphone.

gcm explain — Auto Repo Explainer

Generate a narrated explainer video for any codebase in a single command.

pip install jcodemunch-mcp[groq-explain]

# Generate a 60-second narrated explainer
gcm explain --repo pallets/flask -o flask-explainer.mp4

# With verbose timing
gcm explain --repo facebook/react -v

Pipeline: repo structure → LLM narration script → Orpheus TTS → Pillow slides → FFmpeg MP4. Requires FFmpeg on PATH.


Configuration

Settings are controlled by a JSONC config file (config.jsonc) with env var fallbacks for backward compatibility. Defaults are chosen so that a fresh install works without any configuration.

Quick setup

jcodemunch-mcp config --init       # create ~/.code-index/config.jsonc from template
jcodemunch-mcp config              # show effective configuration
jcodemunch-mcp config --check      # validate config + verify prerequisites

--check validates that your config file is well-formed, your AI provider package is installed, your index storage path is writable, and HTTP transport packages are present. Exits non-zero on any failure — useful for CI/CD or first-run scripts.

Config file locations

LayerPathPurpose
Global~/.code-index/config.jsoncServer-wide defaults
Project{project_root}/.jcodemunch.jsoncPer-project overrides

Project config merges over global config — closest to the work wins.

Token-control levers (reduce schema tokens per turn)

Config keyWhat it controlsTypical savings
tool_profile"core" (16 tools), "standard" (51), "full" (62, default)~5-6k tokens (core)
compact_schemasStrip rarely-used advanced params from schemas~1-2k tokens
disabled_toolsRemove individual tools from schema entirely~100–400 tokens/tool
languagesShrink language enum + gate features~2–86 tokens/turn
meta_fieldsFilter _meta response fields~50–150 tokens/call
descriptionsControl description verbosity~0–600 tokens/turn

Recommended for context-conscious setups: "tool_profile": "core", "compact_schemas": true reduces the schema footprint from ~11.5k tokens to ~4k tokens.

See the full template for all available keys. Run jcodemunch-mcp config --init to generate one.

Tool Tiering

jcodemunch-mcp exposes 60+ tools. On request-capped plans, having all of them visible to small models causes primitive-preference bias (many search → read → search → read cycles instead of one get_context_bundle). The server mitigates this by narrowing the exposed tool list per the running model.

Tiers (configurable)

Three tiers ship with sensible defaults, fully editable in config.jsonc:

  • core (16 tools): indexing, search, retrieval. Recommended for Haiku / small local models.
  • standard (51 tools): core + analytics / architecture / quality. Recommended for Sonnet / GPT-4o class.
  • full (all 62 tools): no filter. Recommended for Opus / o1 / frontier models.

Edit tool_tier_bundles.core / tool_tier_bundles.standard in your config.jsonc to add or remove tools from each tier.

Runtime switching (opt-in, zero extra requests)

Runtime tier switching is off by default. To enable it, set in config.jsonc:

"adaptive_tiering": true

When on, plan_turn — already the opening-move tool — accepts an optional model parameter that switches the session tier as a side effect, with no extra MCP request:

plan_turn(repo="...", query="...", model="claude-haiku-4-5")

The server resolves the model to a tier via model_tier_map in config (fuzzy matching: normalizes the id, then exact → glob → substring → * → full fallback). Subsequent tools/list calls return only the narrowed set.

When adaptive_tiering is false, plan_turn(model=...) and announce_model(...) accept their arguments but do not switch the tier — the static tool_profile continues to drive the exposed tools. set_tool_tier(tier=...) remains honored either way because it's an explicit user call, not automatic behavior.

The Counter — collapse to a 3-tool front door (tool_surface)

For the most token-sensitive setups, tool_surface goes further than tiering: it collapses the resident tool list to a three-tool front door that fronts the entire catalog without losing any capability. Every turn the host serializes each resident tool's schema into context; the front door shrinks that fixed per-turn cost and removes the "pick one of N" dispatch dilution.

Set it in config.jsonc (or the JCODEMUNCH_TOOL_SURFACE env var, which wins):

"tool_surface": "counter"
  • order(action, args) — dispatch any catalog action by name. Read-only by default at the boundary: actions that change index/session state require allow_state_change=true, and execution/file-write verbs are refused outright (the front door is a charter checkpoint, never a mutation path).
  • menu(query?) — search/browse the action catalog (compact rows: action, summary, required args, state_changing), so the full set of schemas needn't stay resident in context.
  • route(task, repo?, execute?) — map a natural-language task to the best action(s); with execute=true, dispatch the top recommendation in the same call. Recommends assemble_task_context / plan_turn for context-gathering intents.

counter keeps the always-present controls (set_tool_tier, announce_model, jcodemunch_guide) alongside the front door. Any other value (default full) leaves the existing behavior unchanged — the front-door tools stay hidden (still callable), so upgrading changes nothing until you opt in. The two mechanisms compose: under counter, order / route still reach every action regardless of the active core / standard / full tier.

disabled_tools precedence

disabled_tools applies after tier filtering. A tool listed in both a tier bundle and disabled_tools will not be exposed. The server logs a WARNING on startup and jcodemunch-mcp config --check prints a WARN: row if this happens.

Architecture layer enforcement (architecture.layers)

Place a .jcodemunch.jsonc file at your project root to declare the layers your architecture must respect. get_layer_violations will then enforce that imports only flow in the declared direction.

// .jcodemunch.jsonc — example for a layered Python project
{
  "architecture": {
    "layers": [
      { "name": "api",      "paths": ["src/routes", "src/controllers"] },
      { "name": "service",  "paths": ["src/services"] },
      { "name": "repo",     "paths": ["src/repositories"] },
      { "name": "db",       "paths": ["src/models", "src/migrations"] }
    ],
    "rules": [
      { "layer": "api",     "may_not_import": ["db"] },
      { "layer": "service", "may_not_import": ["api"] },
      { "layer": "repo",    "may_not_import": ["api", "service"] }
    ]
  }
}

Call get_layer_violations(rules=[...]) directly to pass rules inline — the config file is optional and used as a fallback. When no config is present, get_layer_violations infers layers from top-level directory structure.

Deprecated env vars (v2.0 will remove)

The following env vars still work but are deprecated. Config file values take priority:

VariableConfig keyDefault
JCODEMUNCH_USE_AI_SUMMARIESuse_ai_summariestrue
JCODEMUNCH_TRUSTED_FOLDERStrusted_folders[]
JCODEMUNCH_MAX_FOLDER_FILESmax_folder_files2000
JCODEMUNCH_MAX_INDEX_FILESmax_index_files10000
JCODEMUNCH_STALENESS_DAYSstaleness_days7
JCODEMUNCH_MAX_RESULTSmax_results500
JCODEMUNCH_EXTRA_IGNORE_PATTERNSextra_ignore_patterns[]
JCODEMUNCH_CONTEXT_PROVIDERScontext_providerstrue
JCODEMUNCH_REDACT_SOURCE_ROOTredact_source_rootfalse
JCODEMUNCH_STATS_FILE_INTERVALstats_file_interval3
JCODEMUNCH_SHARE_SAVINGSshare_savingstrue
JCODEMUNCH_TELEMETRY_URL(none)community meter URL
JCODEMUNCH_SUMMARIZER_CONCURRENCYsummarizer_concurrency4
JCODEMUNCH_ALLOW_REMOTE_SUMMARIZERallow_remote_summarizerfalse
JCODEMUNCH_RATE_LIMITrate_limit0
JCODEMUNCH_TRANSPORTtransportstdio
JCODEMUNCH_HOSThost127.0.0.1
JCODEMUNCH_PORTport8901
JCODEMUNCH_LOG_LEVELlog_levelWARNING

AI provider keys (ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENAI_API_BASE, MINIMAX_API_KEY, ZHIPUAI_API_KEY, etc.), JCODEMUNCH_SUMMARIZER_PROVIDER, and CODE_INDEX_PATH are always read from env vars — they are never placed in config files.

AI provider priority in auto-detect mode: Anthropic → Gemini → OpenAI-compatible (OPENAI_API_BASE) → MiniMax → GLM-5 → signature fallback. Set JCODEMUNCH_SUMMARIZER_PROVIDER to force anthropic, gemini, openai, minimax, glm, or none. jcodemunch-mcp config shows which provider is active.

allow_remote_summarizer only affects OpenAI-compatible HTTP endpoints. When false, jcodemunch accepts only localhost-style endpoints such as Ollama or LM Studio on 127.0.0.1 and rejects remote hosts like api.minimax.io. When a remote endpoint is rejected, AI summarization falls back to docstrings or signatures instead of sending source code to that provider. Set allow_remote_summarizer: true in config.jsonc if you intentionally want to use a hosted OpenAI-compatible provider such as MiniMax or GLM-5.

openai_extra_body (config key, or JCODEMUNCH_OPENAI_EXTRA_BODY env var as a JSON object) is merged into every OpenAI-compatible /chat/completions and /responses summarizer request. Use it for provider knobs the standard payload doesn't expose — most commonly to turn off a local thinking model's reasoning so the output budget isn't spent on reasoning tokens (which silently degrades summaries to generic signatures). For llama.cpp / Qwen: JCODEMUNCH_OPENAI_EXTRA_BODY='{"chat_template_kwargs":{"enable_thinking":false}}'. When a summarization run produces mostly generic fallbacks despite successful responses, jcodemunch now logs a degradation warning pointing at this setting (issue #323).


When does it help?

A common question: does this only help during exploration, or also when the agent is prompted to read a file before editing?

It helps most when editing a specific function. The "read before edit" constraint doesn't require reading the whole file — it requires reading the code. get_symbol_source gives you exactly the function body you're about to touch, nothing else. Instead of reading 700 lines to edit one method, you read those 30 lines.

ScenarioNative tooljCodemunchSavings
Edit one function (700-line file)Read → 700 linesget_symbol_source → 30 lines~95%
Understand a file's structureRead → full contentget_file_outline → names + signatures~80%
Find which file to editGrep many filessearch_symbols → exact matchcomparable
Edit requires whole-file contextRead → full contentget_file_content → full content~0%
"What breaks if I change X?"not possibleget_blast_radiusunique capability

The cases where it doesn't help: edits that genuinely require understanding the entire file (restructuring file-level state, reordering logic that spans hundreds of lines). For those, get_file_content is roughly equivalent to Read. The cases where it helps most are targeted edits — one function, one method, one class — which is the majority of real editing work.


Best for

  • large repositories
  • unfamiliar codebases
  • agent-driven code exploration
  • refactoring and impact analysis
  • teams trying to cut AI token costs without making agents dumber
  • developers who are tired of paying premium rates for glorified file scrolling

New here?

Start with QUICKSTART.md for the fastest setup path.

Then index a repo, ask your agent what it has indexed, and have it retrieve code by symbol instead of reading entire files. That is where the savings start.

Works with

jCodeMunch is an MCP server — it plugs into every major agent and IDE that speaks MCP:

Claude Code · Claude Desktop · Cursor · Windsurf · Codex CLI · Continue · Cline · Roo Code · Zed · Goose · Hermes Agent · Paperclip — and more.

Tested configurations:

PlatformConfig
Claude Code / Claude Desktopjcodemunch-mcp init (auto-detects and patches config)
Cursor / Windsurf / Continuejcodemunch-mcp init or manual mcp.json
OpenAI Codex CLIAdd [mcp_servers.jcodemunch] block to ~/.codex/config.toml (see below)
Cline / Roo CodeAdd via the MCP marketplace UI or paste command: uvx, args: ["jcodemunch-mcp"]
ZedAdd to settings.json under context_servers
Goose (Block)goose configure → Add Extension → command uvx jcodemunch-mcp
Hermes AgentAdd to ~/.hermes/config.yaml — see skill
Paperclip.mcp.json at workspace root (auto-detected)
Any other MCP clientstdio: jcodemunch-mcp, HTTP: jcodemunch-mcp serve --transport sse
VS Code (any MCP client)Install the jCodeMunch VS Code extension for on-save auto-reindex under Copilot Chat / Continue / Cline — closes the staleness gap when the host doesn't fire PostToolUse hooks
GitHub Copilot CLI / cloud agentjcodemunch-mcp init --copilot-hooks writes .github/hooks/hooks.json with a postToolUse rule for auto-reindex
Odysseus (self-hosted AI workspace)SSE transport: run jcodemunch-mcp serve --transport sse on the host (token unset), register the URL in the MCP Registry (see below) — community-tested
Codex CLI config

Recommended (pre-installed binary, no uvx). Codex's rmcp transport is strict about the first JSON-RPC frame on stdout. uvx's install chatter on first run can poison the handshake, which historically manifests as a silent multi-hour hang. Install the package into a project venv and point Codex at the resolved binary directly:

python3 -m venv .venv
.venv/bin/pip install -U jcodemunch-mcp
.venv/bin/jcodemunch-mcp --help   # confirm the binary resolves
# ~/.codex/config.toml
[mcp_servers.jcodemunch]
command = "/absolute/path/to/.venv/bin/jcodemunch-mcp"
# (no args required)

If the handshake still doesn't complete, set JCODEMUNCH_HANDSHAKE_TIMEOUT=5 (the default) and watch stderr — v1.82.1+ emits a one-line hint when the client doesn't call any handler within the window.

Note for codex review --background and other non-interactive runs. Codex's MCP elicitation/approval system can silently decline tool calls to unrecognised servers in non-interactive mode (visible in ~/.codex/logs_2.sqlite as ResolveElicitation { decision: Decline } with no chatter on the server side). This is a Codex-side concern, not a jcodemunch one — track upstream here for the right per-server auto-approve key. Interactive codex runs are unaffected.

Legacy uvx config (kept for reference; works on tolerant clients, not recommended for Codex):

[mcp_servers.jcodemunch]
command = "uvx"
args = ["jcodemunch-mcp"]
Hermes Agent config
# ~/.hermes/config.yaml
mcp_servers:
  jcodemunch:
    command: "uvx"
    args: ["jcodemunch-mcp"]
Odysseus config (self-hosted AI workspace)

Odysseus runs in Docker and indexes nothing itself; jCodeMunch indexes your code on the host. Run jCodeMunch as an SSE server on the host and register its URL in Odysseus. Its SSE client connects by URL only (no auth header), so leave the token unset and secure the endpoint by network binding instead.

1. Start jCodeMunch on the host (no token):

jcodemunch-mcp index .
jcodemunch-mcp serve --transport sse --host 0.0.0.0 --port 8848

Leave JCODEMUNCH_HTTP_TOKEN unset — Odysseus's SSE client sends no Authorization header, so a token returns 401 on connect.

2. In Odysseus → Settings → MCP Registry → Add server:

  • Transport: SSE
  • URL: http://host.docker.internal:8848/sse (Linux: add extra_hosts: ["host.docker.internal:host-gateway"] to the Odysseus service in docker-compose.yml)

3. Secure by network, not token. Because the SSE path is unauthenticated, bind jCodeMunch so only the Odysseus container can reach it (host-gateway interface / firewall), not a public interface. JCODEMUNCH_RATE_LIMIT adds a throttle.

4. Restart Odysseus. All jCodeMunch tools appear in chat + agents. Keep the index fresh with jcodemunch-mcp watch .; use Odysseus's per-server disabled_tools to trim the surface.

jCodeMunch is read-only by charter, and its get_* / search_* / find_* / check_* tool naming satisfies Odysseus's plan-mode read-only gate, so the suite stays usable in plan mode.

Community-tested: the MCP protocol round-trip (SSE connect + tool discovery) is verified; the container-to-host network dial depends on your Docker setup.

FAQ

How much can I save on Claude / Opus tokens? In retrieval-heavy workflows, code-reading tokens typically drop 95%+ because the agent fetches exact symbols instead of brute-reading whole files — benchmarked at a 95% average reduction across 15 tasks / 3 repositories, with peaks of 99.8% on large repos. Compact MUNCH encoding then trims another ~45% off the wire. Full methodology and harness: TOKEN_SAVINGS.md and benchmarks/.

Does it work with large monorepos? Yes. It indexes incrementally, detects workspace members (pnpm / yarn / npm / Turborepo / Cargo / Go workspaces), and scopes queries to subpaths, so retrieval stays cheap as the repo grows. A file watcher keeps the index fresh.

What languages are supported? 70+ languages, including Python, JavaScript/TypeScript, Go, Rust, Java, C/C++, C#, PHP, Ruby, Swift, and Kotlin via tree-sitter AST parsing. Full matrix: LANGUAGE_SUPPORT.md.

Which agents and IDEs does it work with? Any MCP client — Claude Code, Cursor, VS Code, Codex CLI, Continue, Windsurf, and more. One-click and CLI installs are at the top of this README and in the Works With section.

Is it free for personal use? Yes — free for personal use; commercial use needs a license. See Commercial Licenses. The guarantee: if jCodeMunch doesn't pay for itself, you don't pay for it.

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, class hierarchies — rather than returning fuzzy chunks (RAG) or raw line matches (grep) that the agent still has to read and reason over. Index once, query exactly what you need.

Star History

Star History Chart
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Registryactive
Packagejcodemunch-mcp
TransportSTDIO
Prompts5
Tools verifiedJun 10, 2026
UpdatedMar 21, 2026
View on GitHub