Tree-Sitter MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tree-Sitter MCPsearch for all functions named 'handleRequest' in the current project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
npm install -g @nendo/tree-sitter-mcpSearch for code:
tree-sitter-mcp search "handleRequest" --type functionAnalyze code quality:
tree-sitter-mcp analyze --analysis-types quality deadcode structureFind syntax errors:
tree-sitter-mcp errors --output textSetup with Claude Desktop:
tree-sitter-mcp setup --autoOr configure manually by adding to ~/.config/claude-desktop/claude_desktop_config.json:
{
"mcpServers": {
"tree-sitter-mcp": {
"command": "npx",
"args": ["@nendo/tree-sitter-mcp", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}Related MCP server: Acemcp
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:
tree-sitter-mcp search "DatabaseManager" --exact
tree-sitter-mcp search "handle.*Request" --type function methodFind usage of identifiers:
tree-sitter-mcp find-usage "UserService" --exact
tree-sitter-mcp find-usage "API_KEY" --case-sensitiveAnalyze code quality:
tree-sitter-mcp analyze --analysis-types quality structure deadcode
tree-sitter-mcp analyze src/components --analysis-types qualityFind syntax errors:
tree-sitter-mcp errors --output text
tree-sitter-mcp errors src/components --max-results 10Setup MCP integration:
tree-sitter-mcp setup --auto
tree-sitter-mcp setup # Manual setup instructionsMCP 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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across projects using AI embeddings to find code by meaning rather than just text matching. Provides fast intelligent search, symbol analysis, and code similarity detection with multi-language support.MIT
- AlicenseAqualityFmaintenanceEnables semantic code search across codebases with automatic incremental indexing. Searches return relevant code snippets with file paths and line numbers based on natural language queries.1804Apache 2.0
- AlicenseAqualityDmaintenanceEnables fast code analysis and navigation through hybrid semantic search, graph-based relationship tracking, and structure exploration across multiple programming languages with optimized indexing for large codebases.83MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.2MIT