Skip to content
Agentmart
Submit a tool

jCodemunch MCP

Retrieves code by symbol via tree-sitter.

Connector by jgravelle · GitHub account verified by the MCP Registry

IndexedLicense unknownLocal (stdio)★ 2,804
Write a review

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/jgravelle-jcodemunch-mcp

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Retrieves code by symbol via tree-sitter. 96.2% fewer tokens per lookup than grep-and-read.

Use cases: refactoring, debugging

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.

Tools
73 read · 6 write · 1 delete · 14 not yet classified
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Tools by what they do 94

Read from the source code; the running server may list different tools.

Read 73 · Look things up without changing anything.

  • analyze_perf
  • audit_agent_config
  • check_delete_safe
  • check_edit_safe
  • check_references
  • check_rename_safe
  • diff_health_radar
  • find_dead_code
  • find_hot_paths
  • find_implementations
  • find_importers
  • find_references
Show 61 more tools
  • find_similar_symbols
  • find_unused_paths
  • get_architecture_metrics
  • get_blast_radius
  • get_call_hierarchy
  • get_changed_symbols
  • get_churn_rate
  • get_class_hierarchy
  • get_context_bundle
  • get_coupling_metrics
  • get_cross_repo_map
  • get_dead_code_v2
  • get_decorator_census
  • get_dependency_cycles
  • get_dependency_graph
  • get_endpoint_impact
  • get_extraction_candidates
  • get_file_content
  • get_file_outline
  • get_file_risk
  • get_file_tree
  • get_group_contracts
  • get_hotspots
  • get_impact_preview
  • get_layer_violations
  • get_parity_map
  • get_pr_risk_profile
  • get_project_intel
  • get_ranked_context
  • get_redaction_log
  • get_related_symbols
  • get_repo_health
  • get_repo_map
  • get_repo_outline
  • get_runtime_coverage
  • get_session_context
  • get_session_snapshot
  • get_session_stats
  • get_signal_chains
  • get_symbol_complexity
  • get_symbol_diff
  • get_symbol_importance
  • get_symbol_provenance
  • get_symbol_source
  • get_tectonic_map
  • get_untested_symbols
  • get_watch_status
  • index_dependency
  • jcodemunch_guide
  • list_repos
  • list_workspaces
  • menu
  • plan_refactoring
  • plan_turn
  • search_ast
  • search_columns
  • search_symbols
  • search_text
  • suggest_corrections
  • suggest_queries
  • summarize_repo

Write 6 · Create, change, send or run things.

  • import_runtime_signal
  • order
  • register_edit
  • resolve_repo
  • set_tool_tier
  • winnow_symbols

Delete 1 · Delete, drop, revoke or wipe things.

  • invalidate_cache

Not yet classified 14 · We could not tell from the name and description.

  • announce_model
  • assemble_task_context
  • check_embedding_drift
  • digest
  • embed_repo
  • finalize_handoff
  • get_delivery_metrics
  • index_file
  • index_folder
  • index_repo
  • render_diagram
  • route
Show 2 more tools
  • test_summarizer
  • tune_weights

Files it touches

  • Any path the agent passes to its tools

Tools (94)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • analyze_perf

    Per-tool latency telemetry: p50/p95/max in ms, error rate, plus cache hit-rate by tool. Two rankings, and they answer different questions: slowest_by_p95 is per-call latency, heaviest_by_total_ms is the wall-clock each tool actually consumed (count x latency), with shares over totals. 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 regressions.

  • announce_model

    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 calling plan_turn(model=...) for routine per-task use; use announce_model as a fallback when plan_turn is not appropriate for the current task.

  • assemble_task_context

    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. Bounded by token_budget; see intent_detected.

  • audit_agent_config

    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 against the jcodemunch index to catch references to renamed or deleted symbols and files that no other linter can detect. Reports findings only; it never edits a config file. Stale-reference detection needs the repo indexed.

  • check_delete_safe

    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 tiers: safe_to_delete / test_coverage_only / internal_only / internal_uses_blocking / external_uses_blocking / cross_repo_blocking / runtime_observed / scip_referenced / entry_point / corpus_inadequate / name_not_searchable / dynamic_import_boundary. Top-5 blockers ranked by severity. Read-only — never mutates the codebas…

  • check_edit_safe

    Composite preflight: can this symbol be edited safely? Where check_delete_safe asks who breaks if it disappears, this asks what your regression risk is if you modify it and what you must preserve. Fuses signature impact (external/cross-repo importers), cyclomatic complexity, test-coverage presence, and runtime traffic into a single verdict + one-line recommended_action. Verdict tiers: safe_to_edit / untested / complexity_risk / signature_impact / runtime_critical / dynamic_import_boundary. Top-5 blockers ranked by severity. Read-only — never mutates the codebase. ALREADY CONSULTED, do not re-r…

  • check_embedding_drift

    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 fires when max drift exceeds threshold (default 0.05 = cos sim < 0.95). Use after upgrading providers, when retrieval quality drops unexpectedly, or as a periodic background check. Requires an active embedding provider. The first run only captures the baseline; drift is reported from the second run onward.

  • check_references

    Where is an identifier used: import sites plus every file whose content mentions it, in one call (find_references + search_text). Answers 'where is X used / referenced' and returns is_referenced (bool) for quick dead-code detection. Accepts multiple identifiers in one call via identifiers param. Content matches are capped at max_content_results (default 20), and a match inside a comment or string still counts as referenced.

  • check_rename_safe

    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, and safe=null with `unresolvable` when the import graph could not reach the symbol's file, so its users went unchecked. Run this before any rename/refactor to avoid silent breakage. For a full rename plan with edits, use plan_refactoring. Scoped to the symbol's own file and its importers; a collision in a file that uses the name without importing it is not…

  • diff_health_radar

    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 branch, run it on the PR branch, pass both radar payloads here. Returns regressions/improvements lists for axes that moved more than 3 points.

  • digest

    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 references symbol_ids the agent can immediately query with get_symbol_source / get_call_hierarchy / check_references. Designed for session-start context injection: call once when you open a repo, get oriented to the load-bearing changes without cold exploration. Truncated to max_changed_files (5), max_hotspots (3) and max…

  • embed_repo

    Description is built at runtime.

  • finalize_handoff

    Finalize one canonical Markdown handoff for a completed repository audit/analysis (jcodemunch.handoff/v1). The server assembles YOUR sections deterministically, validates every evidence_refs entry against what this session actually retrieved (symbol ids or file paths served by search_symbols / get_ranked_context — unknown refs fail closed), persists the result session-scoped, and returns a compact receipt {handoff_id, resource_uri, sha256, length, canonical:true}. Read the immutable body via the munch://handoff/<id> resource; repeated reads are byte-identical. Appendices are included exactly o…

  • find_dead_code

    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.

  • find_hot_paths

    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?' Returns an empty results list when no traces have been ingested.

Show 79 more tools
  • find_implementations

    Find concrete implementations of an interface, abstract class, or method. Multi-source resolution with confidence scoring: SCIP/LSP evidence (1.0), AST class hierarchy (0.85), duck-typed name match (0.65), decorator handler (0.45) — declared priors; _meta.confidence_provenance states each channel's basis and measured precision/recall. Classifies each impl (subclass_override / interface_impl / duck_typed / decorator_handler / subclass), ranks by PageRank × byte_length, attaches differs_by breakdown. Optional cross_repo=true surfaces impls in other indexed repos via the package registry.

  • find_importers

    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 other indexed repos. Import edges only; textual uses are not reported.

  • find_references

    Find the files that import or re-export an identifier, via the import graph. Answers 'who imports this?'. SCOPE: import sites + dbt `{{ ref() }}` edges + (when `include_call_chain=true`) symbols whose bodies mention it. NOT the tool for 'where is this used': call sites are invisible to the import graph (a single-file library reports 0), so ask check_references or search_text. Use `identifiers` for batch queries.

  • find_similar_symbols

    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, classifies each cluster (near_duplicate / similar_logic / parallel_implementation), picks a canonical symbol per cluster (highest PageRank), and surfaces 'differs_by' breakdowns so an agent can recommend keep-this/replace-those. Pre-filters via BM25 inverted index — sub-N^2 on large repos. Degrades gracefully without embeddings …

  • find_unused_paths

    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 empty results list when no traces have been ingested (refuses to flag every symbol as 'unused' against an empty runtime baseline).

  • get_architecture_metrics

    Structural concentration, dependency depth, and modularity in one read-only call, over the file import graph. concentration: Gini coefficient (0 even -> 1 hoarded) over per-file symbol count, size, fan-in (importers), and fan-out (imports) + the top concentrators — answers 'is complexity/coupling piling up in a few files?' which a hotspot list (the peaks) can't. depth: longest dependency chain + level distribution (Lakos levelization) over the cycle-condensed DAG. modularity: cluster count + the hidden coupling a Design Structure Matrix highlights (back-edges = cycle-participating import edges…

  • get_blast_radius

    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 get source snippets at each reference site (fix-ready context in one call). For automated edit plans, use plan_refactoring instead.

  • get_call_hierarchy

    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 the call graph before refactoring. For a 'what breaks if I delete this?' answer, use get_impact_preview instead. Detection is name-based, so same-name symbols in different modules can merge and dynamic dispatch is missed. Only depth-1 rows are direct callers; on a deeper row, `via` names the row it is reached from. `caller…

  • get_changed_symbols

    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 to comparing current HEAD against the SHA stored at index time.

  • get_churn_rate

    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_folder); GitHub-indexed repos are not supported.

  • get_class_hierarchy

    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'. Bases are resolved from indexed signature text, so a dynamically assigned or generated base class is not found.

  • get_context_bundle

    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.

  • get_coupling_metrics

    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 and guide refactoring priorities. Counts import edges only, so a module coupled through configuration, strings, or dependency injection reads as stable.

  • get_cross_repo_map

    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 repos are interconnected. Pass repo to filter to a single repo's perspective. Edges come from package names in manifest files, so a path or git dependency with no manifest entry is invisible.

  • get_dead_code_v2

    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 graph, (3) the symbol name is not re-exported from any __init__ or barrel file (recursively follows CJS `module.exports = require(...)` and ES `export * from`). Each result includes a confidence score (0.33 = 1 signal, 0.67 = 2 signals, 1.0 = all 3). More reliable than single-signal dead-code detection. Use min_confidence=0…

  • get_decorator_census

    Repo-wide census of decorators / annotations / attributes: 'where is every @app.route / @Injectable / @pytest.fixture / [Serializable], and how many?' in one read-only call. Cross-language by construction (aggregates the decorators the index stored on each symbol). Forms are NORMALIZED (leading @, call-arguments, and [] brackets stripped) so @app.route('/a') and @app.route('/b') count under one bucket instead of scattering; each bucket keeps the distinct raw_forms it collapsed, a per-decorator symbol-kind breakdown, and a file count. Filter by name_filter (substring on the normalized name), sc…

  • get_delivery_metrics

    Call this when you want a cost-per-outcome read on a codebase — how much AI spend produced durable change over a window, not raw commit or token volume. Quantify durable-change delivery over a window: of the non-merge commits in the last window_days, how many landed and stuck (commits_durable) vs were reverted or re-touched within rework_horizon_days (churn-back). commits_durable is the honest numerator for a cost-per-outcome ratio — divide AI spend over the same window by it to show how much got done for how little, instead of rewarding raw activity. Hub files co-touched by most commits (CHAN…

  • get_dependency_cycles

    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 isolation. Detects cycles in the file-level import graph only; it says nothing about call-level or runtime cycles.

  • get_dependency_graph

    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-repository edges.

  • get_endpoint_impact

    Endpoint-centric impact analysis: 'what breaks if I change this HTTP endpoint?' Given an endpoint (method + URL, e.g. 'GET /users') or a handler symbol, returns the handler plus what changing it affects — importing files + callers (blast radius) and any templates it renders. Read-only. Resolves string-dispatch routes (Django/Express/Flask/Rails) and decorator routes (Flask/FastAPI/Spring) by their local path; for prefix-composed FastAPI (APIRouter prefix) or Spring class-level mappings whose full URL isn't resolved yet, pass handler_symbol_id instead.

  • get_extraction_candidates

    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_count. Requires re-indexing with jcodemunch-mcp >= 1.16 to populate complexity data.

  • get_file_content

    Get cached source for a file, optionally sliced to a line range. Reads the indexed copy, not the working tree.

  • get_file_outline

    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'). Indexed symbols only, so an unparsed file returns empty.

  • get_file_risk

    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 (cyclomatic from the index); the other three axes are file-level (shared across all symbols in the file) because per-symbol caller-count needs find_references per symbol and would be too slow for save-time refresh.

  • get_file_tree

    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.

  • get_group_contracts

    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 external repos), 'leaky_internal' (underscore-prefixed or in _internal/ but imported externally — architecture violation), 'dead_contract' (declared public but unused externally; opt-in), 'version_skew' (same name imported via multiple specifier roots — coordination risk). Attaches stability score (churn-weighted), last br…

  • get_hotspots

    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. Requires jcodemunch-mcp >= 1.16 for complexity data and a locally indexed repo for churn.

  • get_impact_preview

    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 structured caller/callee tree, use get_call_hierarchy instead. Walks the same name-matched call graph, so a caller reached only by dynamic dispatch or reflection is missing.

  • get_layer_violations

    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 dependency-direction violations (e.g. API layer importing DB layer directly). Files that match no declared layer are skipped, so coverage depends on your layer rules.

  • get_parity_map

    Use when migrating or porting code from one tree or repo to another and you need to know what's already moved, what silently diverged, and what's still unported. Map migration/port parity between a SOURCE symbol tree and a TARGET tree (two subpaths of one repo, or two repos). For each source function/method/class it reports: ported (equivalent counterpart exists), ported_diverged (counterpart exists but its signature/body drifted — the failure a name-only check reports as done), unported (no counterpart), orphaned (unported and no migrated caller — a possible intentional drop), or added (targe…

  • get_pr_risk_profile

    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-5 riskiest changed symbols, untested symbols, and per-signal breakdowns. Designed for CI gating and code review workflows. risk_score is null, with unmeasurable_axes, when the blast axis could not be measured; a CI gate must treat null as a failure, not a pass. Requires a locally indexed repo (index_folder).

  • get_project_intel

    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, deps, api, data. For categories already in the index (OpenAPI, Terraform, GraphQL, Protobuf, dbt), pulls from the index directly. Requires a local index (index_folder).

  • get_ranked_context

    Assemble the best-fit context for a query within a token budget: ranks symbols by relevance and/or centrality, loads source for the top candidates, and packs greedily until the budget is exhausted. Exact symbol names in the query are pinned ahead of the ranking, so include identifiers verbatim. Use when you want the best N tokens of context for a task without naming exact symbols.

  • get_redaction_log

    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, count, last_redacted}], total_redactions, sources}. Empty patterns list = either no traffic yet, or JCODEMUNCH_RUNTIME_REDACT was disabled.

  • get_related_symbols

    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.

  • get_repo_health

    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 to guide follow-up analysis. The dead-code percentage is a heuristic estimate, and the hotspot ranking needs local git history.

  • get_repo_map

    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 here?'. Pair with get_tectonic_map (module topology) and get_ranked_context (query-driven) once you know what to ask for.

  • get_repo_outline

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

  • get_runtime_coverage

    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. Returns coverage_pct=0 with sources=[] when no traces have been ingested.

  • get_session_context

    Get the current session context — files accessed, searches performed, and edits registered during this MCP session. Use to avoid re-reading the same files. Truncated to max_files (default 50) and max_queries (default 20), and covers this server process only.

  • get_session_snapshot

    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. Truncated to max_files (10), max_searches (5) and max_edits (10); it is a summary, not a full session log.

  • get_session_stats

    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. Savings are modelled estimates from the committed benchmark artifacts (cited in savings_provenance), not per-call measurements.

  • get_signal_chains

    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 map all chains with orphan detection; (2) Lookup — pass a symbol name/ID to find which user-facing chains it participates in (e.g. 'validate_email sits on POST /api/users and cli:import-users'). Detects gateways from route decorators (Flask/FastAPI/Spring/NestJS/ASP.NET), CLI commands (@click, @app.command), task queues (@…

  • get_symbol_complexity

    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 show 0 (pre-1.16 index).

  • get_symbol_diff

    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. Compares by (name, kind), so a renamed symbol appears as one removal plus one addition, not a rename.

  • get_symbol_importance

    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 glance. Ranks at most top_n symbols (default 20) over the import graph, so a symbol reached only dynamically scores zero.

  • get_symbol_provenance

    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 commit intent. Includes a human-readable narrative summarising who created it, why, how it evolved, and how volatile it is. Use before refactoring unfamiliar code to understand the 'why' behind it. Requires a locally indexed repo (index_folder).

  • get_symbol_source

    Get full source of one symbol (symbol_id → flat object) or many (symbol_ids[] → {symbols, errors}). Supports verify, context_lines, fqn (PHP FQN via PSR-4), and an optional bounded mode that caps returned source for large symbols/batches.

  • get_tectonic_map

    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, inter-plate coupling, and drifters (files whose directory doesn't match their logical module). Detects nexus plates (god-module risk: coupled to ≥4 other plates). No k parameter — plate count emerges from the topology. Use to find hidden module boundaries, misplaced files, and architectural drift. The temporal signal need…

  • get_untested_symbols

    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 source file) or 'imported_not_called' (test imports the module but no test references this specific function). This is heuristic reachability, NOT runtime coverage — it answers 'does any test reference this symbol?' rather than 'what % of lines are covered.' Use after get_repo_health for a deeper quality picture.

  • get_watch_status

    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.

  • import_runtime_signal

    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 via referenced tables (file-stem match) and dbt/SQLMesh column metadata; source='stack_log' takes a plain-text application log or JSON-Lines record set with Python / JVM / Node.js tracebacks and writes to both runtime_calls (severity-agnostic rollup) and runtime_stack_events (per-severity counts: error/warn/info). Returns {…

  • index_dependency

    Resolve and index an INSTALLED third-party dependency of an already-indexed local repo — the version actually in node_modules or the repo's virtualenv site-packages, read from package metadata (no registry lookup, fully local). Copies a filtered snapshot into the index store and indexes it as its own queryable repo (version visible in the repo id), then reports what docs the package ships. Use when the agent needs ground truth for a library API instead of guessing from training data.

  • index_file

    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.

  • index_folder

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

  • index_repo

    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. github.com URLs only.

  • invalidate_cache

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

  • jcodemunch_guide

    Return the version-current CLAUDE.md / AGENT.md policy snippet for jcodemunch-mcp — the same text produced by `jcodemunch-mcp claude-md --generate`. Lets an agent keep a one-line CLAUDE.md (e.g. "Call jcodemunch_guide and strictly follow its instructions.") instead of pasting a static snippet that drifts from the installed version. Idempotent, no repo context required. Matches the active tool surface, tier and disabled_tools — list 'jcodemunch_guide' in disabled_tools to hide it.

  • list_repos

    Description is built at runtime.

  • list_workspaces

    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}, ...] plus an `is_monorepo` flag and the list of managers that contributed. Use the returned `path` values as the `scope_path` argument on get_project_intel to retrieve per-package intel (Dockerfile / CI / deps) instead of the repo-wide aggregate. Detects only the listed layouts; any other workspace arrangement returns i…

  • menu

    Discover catalog actions without keeping the full tool catalog resident: menu(query?). Returns compact rows (action, summary, required args, state_changing). With no query, lists the catalog. Pair with 'order' to dispatch the chosen action.

  • order

    Dispatch any jcodemunch action by name: order(action, args). The single-verb front door to the full tool catalog. Read-only by default — actions that change index/session state require allow_state_change=true, and execution/file-write verbs are refused. For exploration questions ('how does X work'), order('get_ranked_context', {repo, query, token_budget}) answers in ONE call — prefer it over chained search/outline/source hops; add compress=true to fit more symbols in the same budget. Call 'menu' to discover actions, or 'route' to pick one from a task.

  • plan_refactoring

    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 generation, and multi-file coordination. Use BEFORE executing any multi-file refactoring to get a complete edit plan in one call. Returns a plan only and never writes a file. Apply the returned blocks yourself, then re-index.

  • plan_turn

    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. Recommends at most max_recommended symbols (default 5) and ranks only what the index holds.

  • register_edit

    Register file edits to invalidate caches. Call after editing files to clear BM25 cache and search result cache for the repo. Clears caches only. It does not re-index unless reindex=true, so search results stay stale until you do.

  • render_diagram

    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 and picks the optimal diagram type: flowchart TD (call hierarchy, blast radius), flowchart BT (impact preview), flowchart LR (tectonic plates, dependency graph, cycles), or sequenceDiagram (signal chains). Encodes metadata as visual signals: edge colors for resolution confidence, node shapes for symbol kind, subgraph gro…

  • resolve_repo

    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. Pass an absolute path; a relative one resolves against the server's working directory.

  • route

    Map a natural-language task to the best catalog action(s): route(task, repo?, execute?). Returns ranked recommendations with ready-to-run argument templates. With execute=true, dispatches the top recommendation and returns its result in the same call, collapsing discover-then-call into one round-trip. Recommends assemble_task_context / plan_turn for context-gathering intents.

  • search_ast

    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_function, eval_exec, hardcoded_secret, todo_fixme, magic_number, reassigned_param), or (2) custom mini-DSL (call:*.unwrap, string:/password/i, comment:/TODO/i, nesting:5+, loops:3+, lines:80+). Use category='all' to run every preset at once, or category='security'/'error_handling'/'complexity'/'performance'/'maintenance' for a f…

  • search_columns

    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. Covers only providers that emit column metadata into the index, and returns at most max_results (default 20).

  • search_symbols

    Search for symbols matching a query across the entire indexed repository. Returns matches with signatures and summaries. Searches the index, not the working tree.

  • search_text

    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). Searches the indexed copy, not the working tree.

  • set_tool_tier

    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 for an explicit override (e.g. escalate to 'full' after a capability-gated failure). A narrowing that costs more than it saves is refused.

  • suggest_corrections

    Mine the ranking telemetry ledger for retrieval regret (re-query churn, low confidence, thin/ambiguous results, stale-at-query, vocabulary gaps) and return a prioritized, explainable set of SUGGESTED corrections: CLAUDE.md routing/glossary lines (as unified-diff previews), index-freshness hints, stale-config findings, and a dry-run ranking-weight proposal. Read-only by charter — it never writes a user file; applying a patch is your keystroke. Requires perf_telemetry_enabled; returns an honest hint when off.

  • suggest_queries

    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. Suggestions come from index statistics rather than your task, so treat them as starting points.

  • summarize_repo

    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 force=true (recommended), clears all existing summaries and re-runs the full 3-tier pipeline (docstring → AI → signature fallback). Requires a configured summarizer provider; without one the pipeline falls back to docstrings and signatures.

  • test_summarizer

    Diagnostic probe: send one request to the configured AI summarizer and report status, provider, timing, and any error detail. Call it to confirm summarization is wired up before indexing a large repo. It checks connectivity only; a healthy probe says nothing about summary quality. Disabled in the shipped default config, so enable it before calling.

  • tune_weights

    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 an explicit semantic_weight. Learns from a recency window of the ledger (default 90 days) so stale events can't anchor the weights. Safe to re-run; idempotent for stable signal. Requires perf_telemetry_enabled and the ranking ledger it writes; without that history there is nothing to learn from.

  • winnow_symbols

    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/docstring text, and git churn. Survivors are ranked by importance (PageRank, default), complexity, churn, or name. Use for questions like 'complex untested functions that call db.Exec' or 'deprecated methods still churning in the last 30 days' — cases that would otherwise require 4-5 separate calls and client-side merging.

Compare and alternatives

Featured in

Signals

Stars
2,804
Forks
374
Open issues
0
Contributors
59
Weekly downloads
21,218
Last commit
Oct 24, 2026 (5 days ago)
Last release
Oct 24, 2026 (5 days ago)
Last package publish
Oct 23, 2026 (6 days ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.jgravelle/jcodemunch-mcp
Version
1.108.396
Auth
No auth
Packages
pypi jcodemunch-mcp
License
License unknown
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from jgravelle

Cite this page

jCodemunch MCP. Agent Mart. https://agentmart.dev/connectors/jgravelle-jcodemunch-mcp (last updated 2026-10-24)