MCP tools for Tree-sitter-powered source code analysis. Parse, query, extract symbols, and diagnose syntax errors across 11 programming languages.
| Tool | Description |
|---|---|
code_languages |
List supported languages and capabilities |
code_parse |
Parse code into a syntax tree (AST) at configurable depth |
code_outline |
Structural overview: functions, types, imports, variables |
code_symbols |
Flat symbol list with filtering by kind and name pattern |
code_query |
Run custom Tree-sitter S-expression queries |
code_diagnostics |
Detect syntax errors with positions and context |
All tools (except code_languages) accept source code in two ways:
Direct code:
{"code": "func hello() {}", "language": "go"}From project file (language auto-detected from extension):
{"path": "src/main.go", "project": "my-app"}Go, JavaScript, TypeScript, TSX, Python, Lua, PHP, C#, HTML, Markdown, SQL
Languages with query patterns (Go, JS/TS, Python, Lua, PHP, C#) support code_outline, code_symbols, and code_query. All languages support code_parse and code_diagnostics.
code-tools/
├── _index.yaml # Registry: tool definitions + MCP metadata
├── parser_lib.lua # Shared: language detection, parsing, project resolution
├── queries_lib.lua # Shared: language-specific Tree-sitter query patterns
├── code_languages.lua # Tool: list supported languages
├── code_parse.lua # Tool: syntax tree display
├── code_outline.lua # Tool: structural outline
├── code_symbols.lua # Tool: symbol extraction
├── code_query.lua # Tool: custom queries
└── code_diagnostics.lua # Tool: syntax error detection
butschster/mcp-server— MCP tool discovery viamcp.toolregistry metatreesittermodule — Tree-sitter parsing and query engine (built into Wippy)