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-mcpVerified import paths — ran on the pinned version, not inferred.
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.
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.
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.
`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.
No dependency data recorded yet.
No resource links recorded.