Skip to main content

Crate code_analyze_mcp

Crate code_analyze_mcp 

Source
Expand description

Rust MCP server for code structure analysis using tree-sitter.

This crate provides three analysis modes for multiple programming languages:

  • Overview: Directory tree with file counts and structure
  • FileDetails: Semantic extraction (functions, classes, assignments, references)
  • SymbolFocus: Call graphs and dataflow (planned)

Key types:

Languages supported: Rust, Go, Java, Python, TypeScript.

Modules§

analyze
Main analysis engine for extracting code structure from files and directories.
cache
LRU cache for analysis results indexed by path, modification time, and mode.
completion
Path completion support for file and directory paths.
formatter
Output formatting for analysis results across different modes.
graph
Call graph construction and analysis.
lang
Language detection by file extension.
languages
Language-specific handlers and query definitions for tree-sitter parsing.
logging
MCP logging integration via tracing.
pagination
Cursor-based pagination for large result sets.
parser
Tree-sitter-based parser for extracting semantic structure from source code.
test_detection
Test file detection using path heuristics.
traversal
Directory traversal with .gitignore support.
types

Structs§

CodeAnalyzer