About Tree Sitter
Tree Sitter is an MCP server published by wrale in the Developer Tools category: mCP Server for Tree-sitter. Conduid read 26 tools from its source: adapt_query, analyze_complexity, analyze_project, build_query, check_language_available, clear_cache and 20 more. It is published to PyPI as mcp-server-tree-sitter and runs with uvx.
The repository has 311 stars and 45 forks, is licensed MIT, and its last commit was on 21 May 2026. The latest release is v0.7.0 (9 Apr 2026): What's Changed since v0.6.0 Features feat: multi-language template listing, capture name filter, and compact query results (#42) — closes #19, #20, #21 feat: AST-based f… The release before it was v0.6.0 (9 Apr 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include c, incremental, parser, parsing, tree-sitter and wasm.
Install
uvx mcp-server-tree-sitterpip install mcp-server-tree-sittergit clone https://github.com/wrale/mcp-server-tree-sitterTools (26)
adapt_queryAdapt a query from one language to another.| Parameter | Type | Description |
|---|---|---|
| from_language * | string | Source language |
| query * | string | Original query string |
| to_language * | string | Target language |
analyze_complexityAnalyze code complexity.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the file |
| project * | string | Project name |
analyze_projectAnalyze overall project structure.| Parameter | Type | Description |
|---|---|---|
| project * | string | Project name |
| scan_depth | integer | Depth of detailed analysis (higher is slower) |
build_queryBuild a tree-sitter query from templates or patterns.| Parameter | Type | Description |
|---|---|---|
| combine | string | How to combine patterns ("or" or "and") |
| language * | string | Language name |
| patterns * | array | List of template names or custom patterns |
check_language_availableCheck if a tree-sitter language parser is available.| Parameter | Type | Description |
|---|---|---|
| language * | string | Language to check |
clear_cacheClear the parse tree cache.| Parameter | Type | Description |
|---|---|---|
| file_path | string | Optional specific file to clear cache for |
| project | string | Optional project to clear cache for |
configureConfigure the server.| Parameter | Type | Description |
|---|---|---|
| cache_enabled | boolean | Whether to enable parse tree caching |
| config_path | string | Path to YAML config file |
| log_level | string | Logging level (DEBUG, INFO, WARNING, ERROR) |
| max_file_size_mb | integer | Maximum file size in MB |
diagnose_configDiagnose issues with YAML configuration loading.| Parameter | Type | Description |
|---|---|---|
| config_path * | string | Path to YAML config file |
find_similar_codeFind code structurally similar to a snippet using AST fingerprinting.| Parameter | Type | Description |
|---|---|---|
| language | string | Language of the snippet (required) |
| max_results | integer | Maximum number of results |
| project * | string | Project name |
| snippet * | string | Code snippet to find similar code for |
| threshold | number | Minimum Jaccard similarity (0.0-1.0, default 0.6) |
find_textSearch for text pattern in project files.| Parameter | Type | Description |
|---|---|---|
| case_sensitive | boolean | Whether to do case-sensitive matching |
| context_lines | integer | Number of context lines to include |
| file_pattern | string | Optional glob pattern (e.g., "**/*.py") |
| max_results | integer | Maximum number of results |
| pattern * | string | Text pattern to search for |
| project * | string | Project name |
| use_regex | boolean | Whether to treat pattern as a regular expression |
| whole_word | boolean | Whether to match whole words only |
find_usageFind usage of a symbol.| Parameter | Type | Description |
|---|---|---|
| file_path | string | Optional file to look in (for local symbols) |
| language | string | Language to search in |
| project * | string | Project name |
| symbol * | string | Symbol name to find |
get_astGet abstract syntax tree for a file.| Parameter | Type | Description |
|---|---|---|
| include_text | boolean | Whether to include node text |
| max_depth | integer | Maximum depth of the tree (default: 5) |
| path * | string | File path relative to project root |
| project * | string | Project name |
get_dependenciesFind dependencies of a file.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the file |
| project * | string | Project name |
get_fileGet content of a file.| Parameter | Type | Description |
|---|---|---|
| max_lines | integer | Maximum number of lines to return |
| path * | string | File path relative to project root |
| project * | string | Project name |
| start_line | integer | First line to include (0-based) |
get_file_metadataGet metadata for a file.| Parameter | Type | Description |
|---|---|---|
| path * | string | File path relative to project root |
| project * | string | Project name |
get_node_at_positionFind the AST node at a specific position.| Parameter | Type | Description |
|---|---|---|
| column * | integer | Column number (0-based) |
| path * | string | File path relative to project root |
| project * | string | Project name |
| row * | integer | Line number (0-based) |
get_node_typesGet descriptions of common node types for a language.| Parameter | Type | Description |
|---|---|---|
| language * | string | Language name |
get_query_template_toolGet a predefined tree-sitter query template.| Parameter | Type | Description |
|---|---|---|
| language * | string | Language name |
| template_name * | string | Template name (e.g., "functions", "classes") |
get_symbolsExtract symbols from a file.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the file |
| project * | string | Project name |
| symbol_types | array | Types of symbols to extract (functions, classes, imports, etc.) |
list_filesList files in a project.| Parameter | Type | Description |
|---|---|---|
| extensions | array | List of file extensions to include (without dot) |
| max_depth | integer | Maximum directory depth |
| pattern | string | Optional glob pattern (e.g., "**/*.py") |
| project * | string | Project name |
list_languagesList available languages.list_projects_toolList all registered projects.list_query_templates_toolList available query templates.| Parameter | Type | Description |
|---|---|---|
| language | string | Optional language to filter by |
register_project_toolRegister a project directory for code exploration.| Parameter | Type | Description |
|---|---|---|
| description | string | Optional description of the project |
| name | string | Optional name for the project (defaults to directory name) |
| path * | string | Path to the project directory |
remove_project_toolRemove a registered project.| Parameter | Type | Description |
|---|---|---|
| name * | string | Project name |
run_queryRun a tree-sitter query on project files.| Parameter | Type | Description |
|---|---|---|
| capture_filter | string | Optional capture name to filter results (e.g. "class.name") |
| compact | boolean | If true, return only {capture, text} per match |
| file_path | string | Optional specific file to query |
| language | string | Language to use (required if file_path not provided) |
| max_results | integer | Maximum number of results |
| project * | string | Project name |
| query * | string | Tree-sitter query string |
Security checks
Static checks derived from the repository yesterday. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 1.6K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by uv.lock.
- ✓No dynamic code executionScanned 55 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdiosrc/mcp_server_tree_sitter/server.py:166
- Starts other programs
- No calls that start other programs
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- No file writes or deletes
- Lockfile
- uv.lock
Pattern matches on the source text of 55 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 1.6K words, fetched yesterday. The original in the repository is authoritative.
Read full README