Registry / llm-agents / jcodemunch-mcp

jcodemunch-mcp

JSON →
library1.108.55pypypiunverified

jcodemunch-mcp is a Python library providing a token-efficient MCP (Multi-language Code Processing) server for deep source code exploration. It leverages tree-sitter for AST parsing across 70+ languages, offering tools like cross-language AST pattern matching, symbol provenance, project intelligence, and tectonic analysis. The current version is 1.52.0, with a rapid release cadence focusing on new analysis capabilities and performance improvements.

pip install jcodemunch-mcp
INSTALL
IMPORT
SIG · JCODEMUNCH-MCP
J
jcodemunch-mcp
llm-agentspythonv1.108.55
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.108.55 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/2 runs
1/2 runs
py 3.11
1/2 runs
1/2 runs
py 3.12
1/2 runs
1/2 runs
py 3.13
1/2 runs
1/2 runs
py 3.9
✕ build_error
✕ build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MCPClient
from jcodemunch_mcp import MCPClient
from jcodemunch_mcp import MCPClient

This quickstart initializes the `MCPClient`, indexes the current working directory, then demonstrates two core functionalities: cross-language AST pattern matching for 'empty_catch' anti-patterns and retrieving project intelligence, such as discovered Dockerfiles.

import os from jcodemunch_mcp import MCPClient # Initialize the client. This assumes a local server or embedded functionality. # For advanced setups, authentication or server URL might be configured via env vars or constructor args. client = MCPClient() # Define the repository path to analyze (e.g., the current directory). # For real-world use, replace with your target repository path. repo_path = os.getcwd() print(f"Indexing repository at '{repo_path}' for analysis...") # It's good practice to explicitly index the folder first. # Note: This might take time for large repositories. client.index_folder(repo_path=repo_path) print("Indexing complete.") # Example 1: Search for a common anti-pattern (e.g., 'empty_catch') using cross-language AST matching. print(f"\nSearching for 'empty_catch' anti-pattern...") results_ast = client.search_ast(repo_path=repo_path, query='empty_catch') if results_ast: print(f"Found {len(results_ast)} 'empty_catch' instances. Showing first 3:") for r in results_ast[:3]: print(f"- {r['file']}:{r['line']} (Lang: {r['lang']}):\n ```\n{r['snippet']}\n ```") else: print("No 'empty_catch' instances found.") # Example 2: Get project intelligence (e.g., Dockerfiles, CI/CD configs). print(f"\nGetting project intelligence for '{repo_path}'...") project_intel = client.get_project_intel(repo_path=repo_path) if project_intel and 'dockerfiles' in project_intel: print(f"Found {len(project_intel['dockerfiles'])} Dockerfiles.") for df in project_intel['dockerfiles'][:1]: # Show details for the first Dockerfile print(f"- Dockerfile at: {df['path']}") print(f" Entrypoint: {df.get('entrypoint', 'N/A')}") print(f" Stages: {', '.join([s['name'] for s in df.get('stages', [])])}") else: print("No Dockerfiles or significant project intelligence found.")
Debug
Known issues
gotchaPath depth requirements for `index_folder` in container environments changed.
fix
Ensure `repo_path` has at least 2 components (e.g., `/app/src`) when running in Docker, Podman, or devcontainers. Bare `/` is still rejected. Alternatively, use the `trusted_folders` parameter for manual override.
affects: >=1.50.1
gotchaBranch-Aware Delta Indexing introduced, changing indexing behavior and resource usage.
fix
Be aware that the client now maintains per-branch delta layers instead of re-indexing full repositories on branch switches. This optimizes storage and performance but can lead to unexpected behavior if manual full re-indexing (e.g., after a hard reset) is expected. Tools auto-detect the current branch.
affects: >=1.50.0
gotchaMisusing `search_ast` queries with language-specific AST node types.
fix
`search_ast` supports cross-language pattern matching. Avoid using language-specific tree-sitter node types directly. Instead, leverage the provided preset anti-pattern detectors (e.g., 'empty_catch', 'bare_except') or focus on abstract semantic patterns for universal matches.
affects: >=1.52.0
Upgrade
Version history
1.108.55latest on PyPI · released Jun 12, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
34
OpenAI (training)
1
Resources

No resource links recorded.

jcodemunch-mcp — pip install jcodemunch-mcp · libregistry