Tree-Sitter MCP
Fast semantic code search and analysis for common programming languages. Search for functions and classes, trace code usage, and analyze code quality across your entire project.
Works as both a standalone CLI tool and an MCP server for AI tools like Claude Code.
Getting Started
Install:
Search for code:
Analyze code quality:
Find syntax errors:
Setup with Claude Desktop:
Or configure manually by adding to
Features
Semantic search - Find functions, classes, and variables by name across 15+ languages
Usage tracing - See where code is used before making changes
Quality analysis - Detect complex functions, dead code, and architectural issues
Fast results - Sub-100ms searches by parsing code structure, not scanning text
No configuration - Works immediately on any project
Supported Languages
JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, Ruby, C#, PHP, Kotlin, Scala, Elixir
Config files: JSON, YAML, TOML, .env
CLI Usage
Search for code elements:
Find usage of identifiers:
Analyze code quality:
Find syntax errors:
Setup MCP integration:
MCP Tools
When used as an MCP server, provides these tools for AI assistants:
search_code- Search for functions, classes, variables by namefind_usage- Find all usages of identifiers across the projectanalyze_code- Comprehensive code quality and structure analysischeck_errors- Find actionable syntax errors with detailed context
See the full documentation for detailed API reference.
Installation Requirements
This package includes native components requiring build tools:
Windows: Visual Studio Build Tools or
npm install --global windows-build-toolsmacOS: Xcode Command Line Tools (
xcode-select --install)Linux:
sudo apt-get install build-essential(Ubuntu/Debian)
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
GPL-3.0
Acknowledgments
Built with Tree-Sitter and the Model Context Protocol.