mcp-server-tree-sitter

MCP.Pizza Chef: wrale

Point it at a folder of code and your assistant can list files, pull out function and class names, search for patterns, and trace how the pieces depend on one another across Python, JavaScript, TypeScript, Go, Rust, Java and roughly a dozen more languages. It runs entirely on your own machine and needs no account. The repository is archived and read-only, with its last changes in May 2026 and no replacement named by the author.

Archived ยท repository archived and read-only since May 2026; no successor named
Coding

Use This MCP server To

Find every function that mentions a particular name in my project List the classes and functions defined in one file See which files in my project depend on which Search a whole codebase without pasting files into chat Get a short outline of an unfamiliar folder of code

README

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]"

mcp-server-tree-sitter FAQ

Is this project still maintained?
No. The repository has been archived and made read-only, its last changes landed in May 2026, and the author has not pointed to any successor project.
Can I still use it?
Yes, the released version still installs and runs, but nothing will be fixed or updated, so treat it as frozen.
Which apps does it work in?
Claude Desktop is what the author built and tested against, and other apps that speak the same protocol can use it as well.
Do I need an account or a paid key?
No. Everything happens locally on your own computer, and no outside service is contacted.
Can I use this to understand a codebase I just downloaded?
Yes, that is the main use, since it lists the files, surfaces the named pieces of code, and searches through them for you.
How hard is the setup?
It is aimed at developers, since you install a Python package and hand-edit a settings file to register the folder you want read.
Does it change my code?
No, it only reads and searches, so nothing on your computer is edited by it.