Loading...
Loading...
Token-efficient GitHub source code exploration via tree-sitter AST parsing and structured retrieval
npx skill4agent add aradotso/mcp-skills jcodemunch-mcp-code-retrievalSkill by ara.so — MCP Skills collection.
# One-click via badge or manual:
uvx jcodemunch-mcp{
"mcpServers": {
"jcodemunch": {
"command": "uvx",
"args": ["jcodemunch-mcp"]
}
}
}# Install via uvx
uvx jcodemunch-mcp
# Or use the jcm CLI helper
jcm install claude-code{
"mcpServers": {
"jcodemunch": {
"command": "uvx",
"args": ["jcodemunch-mcp"]
}
}
}# Install the jcm CLI
pip install jcodemunch-mcp
# Or use uvx
uvx jcodemunch-mcp.jcodemunch/config.jsonc{
// Index settings
"index_path": ".jcodemunch/index",
"excluded_patterns": [
"node_modules/**",
"venv/**",
".git/**",
"*.pyc",
"__pycache__/**"
],
// Token budget defaults
"default_token_budget": 8000,
"max_token_budget": 16000,
// Compact format (MUNCH) - saves 45.5% tokens on average
"compact_format_enabled": true,
"compact_format_threshold": 0.15, // Use compact if ≥15% savings
// Semantic search (optional, requires sentence-transformers)
"semantic_search_enabled": false,
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2",
// Tool configuration
"disabled_tools": [], // Disable specific tools if needed
// Language support
"supported_languages": [
"python", "javascript", "typescript", "go", "rust",
"java", "c", "cpp", "c_sharp", "ruby", "php"
]
}# Via MCP tool call
index_repository(
path="/path/to/repo",
force_reindex=False # Set True to rebuild from scratch
)get_index_info()
# Returns: stats, file count, symbol count, last indexed timefind_symbols(
query="get_user",
limit=10,
file_pattern="*.py", # Optional filter
format="auto" # auto|compact|json
)find_implementations(
symbol="UserService.authenticate",
include_lsp=True, # LSP dispatch
include_hierarchy=True, # Class hierarchy
include_duck_typed=True, # Duck-typed matches
include_decorators=True # Decorator handlers
)get_symbol_content(
identifier="UserService.authenticate",
include_docstring=True,
include_decorators=True,
format="auto"
)get_ranked_context(
query="authentication logic",
token_budget=4000,
include_imports=True,
include_references=True,
format="auto"
)
# Returns: ranked symbols within budget, total tokens usedassemble_task_context(
task="fix bug in user authentication where tokens expire too early",
token_budget=8000,
session_id="fix-auth-bug-001" # Optional session tracking
)
# Auto-classifies intent (bug_fix, feature, refactor, etc.)
# Extracts anchor symbols from task description
# Runs appropriate tool sequence under budgetfind_references(
identifier="get_user",
include_calls=True,
include_imports=True,
format="auto"
)find_importers(
target="services.auth",
format="auto"
)get_blast_radius(
identifier="User.email",
max_depth=3,
include_source=True, # Include source snippets
format="auto"
)get_class_hierarchy(
class_name="BaseModel",
direction="both", # up|down|both
format="auto"
)find_dead_code(
scope="all", # all|file|module
include_private=True,
format="auto"
)get_untested_symbols(
scope="all",
min_complexity=5, # Focus on complex code
format="auto"
)find_similar_symbols(
threshold=0.8, # Similarity threshold (0-1)
min_cluster_size=2,
use_semantic=True, # Requires semantic search enabled
use_structural=True,
use_behavioral=True, # Callee Jaccard
format="auto"
)
# Returns: clusters with canonical pick + consolidation verdictcheck_delete_safe(
identifier="legacy_auth_handler",
format="auto"
)
# Returns: composite verdict + ranked blockers + recommended actionget_symbol_importance(
limit=20,
scope="all", # all|file|module
format="auto"
)get_repo_map(
token_budget=4000,
signature_only=True, # Just signatures, not full implementations
format="auto"
)
# Returns: PageRank-ranked symbol overview within budgetget_dependency_cycles(
format="auto"
)get_hotspots(
min_complexity=10,
days_back=90,
format="auto"
)get_group_contracts(
repos=["/path/to/repo1", "/path/to/repo2"],
min_shared=2, # Minimum repos sharing symbol
format="auto"
)
# Returns: ranked contracts classified as:
# - de_facto_api (stable, high usage)
# - leaky_internal (unintended exposure)
# - dead_contract (no runtime hits)
# - version_skew (inconsistent across repos)get_changed_symbols(
base_ref="main",
head_ref="feature-branch",
format="auto"
)# 1. Get task-oriented context
assemble_task_context(
task="fix NullPointerException in payment processing",
token_budget=6000,
session_id="fix-payment-bug"
)
# 2. Find related code
find_symbols(
query="payment process",
limit=5
)
# 3. Get implementation + references
get_symbol_content(identifier="PaymentService.process")
find_references(identifier="PaymentService.process")
# 4. Check blast radius before fix
get_blast_radius(
identifier="PaymentService.process",
max_depth=2,
include_source=True
)# 1. Find dead code
dead_symbols = find_dead_code(scope="all", include_private=True)
# 2. For each dead symbol, verify safety
check_delete_safe(identifier="legacy_user_handler")
# 3. Get blast radius to confirm
get_blast_radius(identifier="legacy_user_handler", max_depth=1)
# 4. Find similar code that might be consolidated
find_similar_symbols(threshold=0.85, min_cluster_size=2)# 1. Get high-level overview
get_repo_map(token_budget=3000, signature_only=True)
# 2. Find most important symbols
get_symbol_importance(limit=15)
# 3. Explore class hierarchies
get_class_hierarchy(class_name="BaseController", direction="down")
# 4. Get architectural overview
get_dependency_cycles()
get_hotspots(min_complexity=8, days_back=30)# 1. Find where similar features are implemented
find_symbols(query="user authentication", limit=10)
# 2. Get ranked context for the task
assemble_task_context(
task="add OAuth2 authentication alongside existing password auth",
token_budget=8000
)
# 3. Find all authentication-related symbols
get_ranked_context(
query="authentication oauth password",
token_budget=5000,
include_imports=True
)
# 4. Check who will be affected
find_importers(target="auth.handlers")formatautocompactjsonget_blast_radius{
"semantic_search_enabled": true,
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2"
}pip install sentence-transformers torchfind_symbols(
query="handles user authentication with tokens",
use_semantic=True, # Combines BM25 + embeddings
limit=10
)# dbt models as context
get_dbt_context(
model_name="fct_orders",
include_upstream=True,
include_downstream=True
)
# Git context
get_changed_symbols(base_ref="main", head_ref="HEAD")plan_turn(
session_id="feature-impl-001",
task="implement OAuth2",
budget=10000
)
assemble_task_context(
task="add Google OAuth provider",
session_id="feature-impl-001",
token_budget=6000
)LANGUAGE_SUPPORT.md# Force reindex
index_repository(path=".", force_reindex=True)# Install required dependencies
pip install sentence-transformers torch# Use stricter filters
find_symbols(
query="handler",
file_pattern="**/controllers/*.py",
limit=5
)# Use smaller budget or signature-only mode
get_repo_map(token_budget=2000, signature_only=True)// Add to config.jsonc
{
"excluded_patterns": [
"node_modules/**",
"venv/**",
"dist/**",
"build/**",
".git/**"
]
}# Install client-specific config
jcm install claude-code
jcm install cursor
jcm install windsurf
# Index current directory
jcm index .
# Search symbols
jcm search "UserService"
# Get symbol info
jcm info "UserService.authenticate"
# Check config
jcm config --validateindex_repository()format="auto"file_patternscopeassemble_task_context()get_blast_radius()excluded_patterns