mcp-server-tree-sitter
MCP Server for Tree-sitter provides intelligent code analysis capabilities for AI assistants.
This MCP server leverages tree-sitter to offer flexible exploration of codebases, allowing for examination at various levels of granularity. It manages context effectively, ensuring that AI assistants receive just enough information without overwhelming them. The server is language agnostic, supporting a wide range of programming languages, and utilizes an AST-based understanding for efficient code traversal and analysis. Additionally, the server features caching for optimized performance, symbol extraction for analyzing code components, and dependency analysis to identify relationships within the code. With built-in security measures, it ensures safe interactions while maintaining project registrations and cached data across sessions.
Compatible with
Install
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-server-tree-sitter": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-tree-sitter"
]
}
}
}Config File Location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Some servers require additional setup - check the GitHub README for specific instructions.
Permissions