Tree-Sitter Language Pack — Claude Code MCP server
Tree-Sitter Language Pack is an MCP server for Claude Code that parses source code and exposes its structure. It extracts symbols and prepares code chunks for LLMs.
MIT ★ 489 updated 2026-11-24
claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cliWhat Tree-Sitter Language Pack does
The server parses source files in 371 languages, extracts functions, classes, imports, and symbols, and splits files into chunks for LLMs. Tree-sitter grammars are available through one interface.
A parser is downloaded when first requested and stored locally for later offline use. Run ts-pack download to fetch parsers ahead of time. The pack also includes .scm queries for highlighting and other syntax-tree operations.
What it helps with
- parse code structure
- extract functions, classes, and imports from source files
- split code files into chunks for LLMs
- extract data from configuration formats
Example prompts for the agent
- Parse the project source and list its functions, classes, and imports.
- Prepare these code files for a RAG pipeline: extract symbols and split the content into chunks.
- Download parsers in advance with
ts-pack download.
How to install Tree-Sitter Language Pack
Platform CLI
claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cliPlatform CLI
codex mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cliConfig file
{
"mcpServers": {
"tree-sitter-language-pack": {
"command": "npx",
"args": [
"-y",
"@xberg-io/ts-pack-cli"
]
}
}
}Config file
{
"servers": {
"tree-sitter-language-pack": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@xberg-io/ts-pack-cli"
]
}
}
}Platform CLI
gemini mcp add tree-sitter-language-pack npx -y @xberg-io/ts-pack-cliStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Tree-Sitter Language Pack
How do I install Tree-Sitter Language Pack in Claude Code?
Run claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli.
What does Tree-Sitter Language Pack do?
It parses source code in 371 languages, extracts functions, classes, imports, and symbols, and divides code into chunks for LLMs.
What does Tree-Sitter Language Pack need to run?
The Claude Code install command uses npx and the @xberg-io/ts-pack-cli package. Parsers download when first requested.