# Tree-sitter Analyzer

> Local code structure analysis for AI coding agents.

- **URL**: https://followmcp.com/en/servers/tree-sitter-analyzer
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 61
- **FMRS Score**: 58/100 (Grade C)
- **Source**: https://github.com/aimasteracc/tree-sitter-analyzer
- **Transports**: stdio (local process)
- **Runtimes**: Python 3.10+
- **Auth**: No credential needed

## 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.

## 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
- 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.

## Client config (JSON)
```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"}}}}
```

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