# Tree-Sitter Language Pack

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 489 repo stars
- Author: xberg-io
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/xberg-io/tree-sitter-language-pack
- Updated: 2026-11-24
- Security check: automated, 2026-11-24 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/tree-sitter-language-pack

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

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli
```

### Codex

**Platform CLI**
```bash
codex mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "tree-sitter-language-pack": {
            "command": "npx",
            "args": [
                "-y",
                "@xberg-io/ts-pack-cli"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "tree-sitter-language-pack": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@xberg-io/ts-pack-cli"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add tree-sitter-language-pack npx -y @xberg-io/ts-pack-cli
```

## When to use it
- 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
- 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`.

## Similar
- [attack-tree-construction](https://affpapa.org/en/nevibecode/skills/attack-tree-construction.md) — skill · 17309 installs
- [secant-agent-research-pack](https://affpapa.org/en/nevibecode/mcp/secant-agent-research-pack.md) — MCP server · 165 installs
- [opportunity-solution-tree](https://affpapa.org/en/nevibecode/skills/opportunity-solution-tree.md) — skill · 3300 installs
- [tree-shaking](https://affpapa.org/en/nevibecode/skills/tree-shaking.md) — skill · 1700 installs
- [wiki-context-pack](https://affpapa.org/en/nevibecode/skills/wiki-context-pack.md) — skill · 1700 installs
- [tree-of-thoughts](https://affpapa.org/en/nevibecode/skills/tree-of-thoughts.md) — skill · 1300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
