Tree-sitter MCP Server
v0.1.1Parse code into Tree-sitter ASTs to see node kinds, field names, and positions
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_tree_sitter_ast Get Tree-sitter AST
Parse code with Tree-sitter and return its syntax tree, one named node per line, indented two spaces per level: `field: kind (startRow-startColumn) - (endRow-endColumn)`. Rows and columns are zero-based, and columns count bytes. `ERROR` marks code that could not be parsed, and `MISSING kind` marks a token the parser inserted to recover. Supported languages: c, cpp, csharp, go, graphql, hcl, java, javascript, json, jsx, kotlin, php, prisma, protobuf, python, ruby, rust, sql, swift, terraform, thrift, toml, tsx, typescript, yaml.
| Parameter | Type | Description |
|---|---|---|
code * | string | Code to parse. It can be a fragment rather than a whole file. |
language * | string | Language of the code, such as `python`, `tsx`, or an alias like `py`, `ts`, or `c#`; case-insensitive. |