← Back to directory
T

Tree-sitter Analyzer

Community
Local code structure analysis for AI coding agents.
Category
Dev Tools #132 of 751
Stars
★ 61 Popular
Transport
stdio (local process)
Runtime
Python 3.10+
Credentials
No credential needed
License
MIT
Last commit
Tools
9
58FMRS · C

The supplied sources describe an MIT-licensed, stdio code analysis MCP with symbol navigation, search, indexing, health checks, and visualization features. The README documents capability boundaries and index state; cross-language binding and some snapshot capabilities have stated limits.

Strongest · Documentation 16/20 Weakest · Maintenance 9/20

Reliability
10/20
Security and permissions
10/20
Maintenance
9/20
Documentation
16/20
Setup experience
13/20
Why each score
Reliability 10/20
The README describes eight MCP tools, JSON response envelopes, index status and refresh steps, and mentions response contract tests and quality gates. The supplied material does not show or verify those tests or CI results, and provides no reviewable evidence for initialization or the tool-list handshake. The static-review ceiling and evidence gaps reduce the score.
Security and permissions 10/20
The material describes local analysis and no telemetry, and discloses the project-root setting, cache, edit capabilities, and installer side effects. It also warns that the uv bootstrap installer is mutable and not content-bound. Without source code, actual data flows, file-access scope, and confirmation for risky edits cannot be verified, so the score is limited; no red-line behavior is shown in the supplied material.
Maintenance 9/20
The supplied facts show the project is not archived, has an MIT license and seven open issues, and the manifest lists version 3.1.7. They do not provide recent release or commit history, issue-response evidence, dependency-update evidence, or a security-response channel. Stars do not count toward this score.
Documentation 16/20
The README provides setup instructions for several clients, indexing steps, troubleshooting, and explicit limits on language-support classifications, response size, snapshot platforms, and semantic queries. The score is reduced because the supplied material does not provide a complete, verifiable MCP parameter and tool specification, and the documented behavior and test claims cannot be independently checked.
Setup experience 13/20
The README gives a uvx install path, a Claude Code command, and client configuration examples for Claude, Cursor, VS Code, and others, along with Python and project-root requirements. The score is reduced because setup still depends on an external runtime and package resolution, and the recommended script downloads and executes an installer. With no source-level CI and key-path test evidence, the static score stays at or below 15.

Static review · not runReviewed 2026-12-03

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesConnects to a database

Best for

  • AI coding agent users who want local codebase analysis through MCP.
  • Developers who need symbol search, call graph queries, and change impact clues.

Not for

  • Users who need hosted cloud analysis or a remote service.
  • Users who need the language support list to imply that every cross-file call relationship is verified.

Required permissions

  • Needs access to the selected project directory to parse source code and create or update the .ast-cache index.
  • TREE_SITTER_PROJECT_ROOT is optional; if unset, the server uses its working directory.

Risks and side effects

  • Call resolution and cross-language analysis may have unresolved cases; language registration alone does not prove complete cross-file binding.
  • Some queries may return large responses; the README says navigate inlines matched definition bodies and does not report truncation.
  • Edit-related features can be used to inspect or perform writes; review edit operations and their impact.
  • The README describes limited certification scope for the new snapshot capture path, with no such snapshot certification on Windows.

Setup

Before you start

Runtime:Python 3.10+

Other optional settings (1)
TREE_SITTER_PROJECT_ROOT optional Absolute path of the project to analyze; set it to the project directory. If unset, the server uses its working directory.

Python 3.10+ and uv are required. In an MCP client configuration, use command uvx with args ["--from", "tree-sitter-analyzer[mcp]", "tree-sitter-analyzer-mcp"], and set TREE_SITTER_PROJECT_ROOT to the project's absolute path. After startup, build the index before querying its status.

.mcp.json
{"mcpServers":{"tree-sitter-analyzer":{"command":"uvx","args":["--from","tree-sitter-analyzer[mcp]","tree-sitter-analyzer-mcp"],"env":{"TREE_SITTER_PROJECT_ROOT":"/absolute/path/to/your/project"}}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "tree-sitter-analyzer": {
      "command": "uvx",
      "args": [
        "--from",
        "tree-sitter-analyzer[mcp]",
        "tree-sitter-analyzer-mcp"
      ],
      "env": {
        "TREE_SITTER_PROJECT_ROOT": "/absolute/path/to/your/project"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.tree-sitter-analyzer]
command = "uvx"
args = ["--from", "tree-sitter-analyzer[mcp]", "tree-sitter-analyzer-mcp"]

[mcp_servers.tree-sitter-analyzer.env]
TREE_SITTER_PROJECT_ROOT = "/absolute/path/to/your/project"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add tree-sitter-analyzer -e TREE_SITTER_PROJECT_ROOT=/absolute/path/to/your/project -- uvx --from 'tree-sitter-analyzer[mcp]' tree-sitter-analyzer-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Restart the client and confirm that Tree-sitter Analyzer tools such as nav, search, and index appear in its tool list. Then call index with action=status; indexed: true indicates the index is available.

Troubleshooting

  1. Check that TREE_SITTER_PROJECT_ROOT is an absolute path.
  2. Build the full index before the first indexed query, and synchronize it after source changes.
  3. If the server does not appear in the client, check the configuration and restart the client.
  4. If the index database is locked, check whether another process is using .ast-cache/index.db.

Things to try

Once connected, you can ask your AI assistant things like:

  • Find the symbol named parse_config and show its references.
  • Analyze which code and tests could be affected by changing src/parser.py.
  • Check the project health and identify files with high complexity.

Tools 9

nav read-only
Navigate symbols, query callers and callees, and assess change impact.
search read-only
Search symbols with relevance ranking and semantic query support.
structure read-only
Explore symbol relationships and class hierarchies.
index writes
Check index status, build the index, or synchronize updates.
health read-only
Assess project or file health and inspect dependencies, dead code, and complexity.
edit writes
Check edit risk, architectural constraints, or PR change impact.
viz read-only
Generate call graphs, UML diagrams, or structural similarity results.
project writes
Get a project overview or use the project decision journal.
Show 1 more tools
set_project_path writes
Set the project path.

Use cases

Find symbols and their references.
Trace call relationships and assess the impact of code changes.
Review project health, complexity, and dependencies.
Build or synchronize a structural index for a codebase.

Supported clients

Claude Code
Claude Desktop
Cursor
Visual Studio Code with GitHub Copilot
Cline
Continue
Roo Code
Codex

Listed from the project's documentation, not tested by this site.

Overview

Tree-sitter Analyzer is an MCP server for code intelligence. It uses tree-sitter to support symbol search, call relationship queries, structural exploration, and project health assessment. The project describes support for 13 languages and gates cross-language call relationships by language family. Responses use JSON envelopes with verdicts. The server runs over stdio, and TREE_SITTER_PROJECT_ROOT can specify the project directory. The README says analysis is local and has no telemetry.

Similar servers

Source revision 7197e33e71e8 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/tree-sitter-analyzer.svg)](https://followmcp.com/en/servers/tree-sitter-analyzer)