Expand description
Rust MCP server for code structure analysis using tree-sitter.
This crate exposes seven MCP tools for multiple programming languages:
Analyze family:
analyze_directory: Directory tree with file counts and structureanalyze_file: Semantic extraction (functions, classes, imports)analyze_symbol: Call graph analysis (callers and callees)analyze_module: Lightweight function and import index
Edit family:
edit_overwrite: Create or overwrite filesedit_replace: Replace text blocks in files
Exec family:
exec_command: Run shell commands with progress notifications
Key entry points:
analyze::analyze_directory: Analyze entire directory treeanalyze::analyze_file: Analyze single file
Languages supported: Rust, Go, Java, Python, TypeScript, TSX, Fortran, JavaScript, C/C++, C#.
Modules§
- analyze
- Main analysis engine for extracting code structure from files and directories.
- logging
- MCP logging integration via tracing.
- metrics
- Metrics collection and daily-rotating JSONL emission.
- otel
Structs§
- Client
Metadata - Session and client metadata recorded as span attributes on every tool call.
- Code
Analyzer - MCP server handler that wires the four analysis tools to the rmcp transport.
Functions§
- extract_
and_ set_ trace_ context - Extract W3C Trace Context from MCP request _meta field and set as parent span context.
- summary_
cursor_ conflict - Returns
truewhensummary=trueand acursorare both provided, which is an invalid combination since summary mode and pagination are mutually exclusive.