Reverse engineer anything with agents, from app behavior down to native binaries.
Install
pip install mcp-server-tree-sitterInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →MCP Tree-sitter Server
A Model Context Protocol (MCP) server that provides code analysis capabilities using tree-sitter, designed to give AI assistants intelligent access to codebases with appropriate context management. Claude Desktop is the reference implementation target.
Features
- 🔍 Flexible Exploration: Examine code at multiple levels of granularity
- 🧠 Context Management: Provides just enough information without overwhelming the context window
- 🌐 Language Agnostic: Supports many programming languages including Python, JavaScript, TypeScript, Go, Rust, C, C++, C#, Swift, Java, Kotlin, Dart, Julia, and APL via tree-sitter-language-pack
- 🌳 Structure-Aware: Uses AST-based understanding with efficient cursor-based traversal
- 🔎 Searchable: Find specific patterns using text search and tree-sitter queries
- 🔄 Caching: Optimized performance through parse tree caching
- 🔑 Symbol Extraction: Extract and analyze functions, classes, and other code symbols
- 📊 Dependency Analysis: Identify and analyze code dependencies and relationships
- 🧩 State Persistence: Maintains project registrations and cached data between invocations
- 🔒 Secure: Built-in security boundaries and input validation
For a comprehensive list of all available commands, their current implementation status, and detailed feature matrix, please refer to the FEATURES.md document.
Installation
Prerequisites
- Python 3.10+
- Tree-sitter language parsers for your preferred languages
Basic Installation
pip install mcp-server-tree-sitter
Development Installation
git clone https://github.com/wrale/mcp-server-tree-sitter.git
cd mcp-server-tree-sitter
pip install -e ".[dev]"
Quick Start
Running with Claude Desktop
You can make the server available in Claude Desktop either through the MCP CLI or by manually configuring Claude Desktop.
Using MCP CLI
Register the server with Claude Desktop:
mcp install mcp_server_tree_sitter.server:mcp --name "tree_sitter"
Manual Configuration
Alternatively, you can manually configure Claude Desktop:
Open your Claude Desktop configuration file:
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Create the file if it doesn't exist.
- macOS/Linux:
Add the server to the
mcpServerssection:{ "mcpServers": { "tree_sitter": { "command": "python", "args": [ "-m", "mcp_server_tree_sitter.server" ] } } }Alternatively, if using uv or another package manager:
{ "mcpServers": { "tree_sitter": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/YOUR/PROJECT", "run", "-m", "mcp_server_tree_sitter.server" ] } } }Note: Make sure to replace
/ABSOLUTE/PATH/TO/YOUR/PROJECTwith the actual absolute path to your project directory.Save the file and restart Claude Desktop.
Similar plugs
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io