# Tree-Sitter Language Pack

> Tree-Sitter Language Pack is an open-source MCP server for developer tools. Parse code in 371 languages and extract symbols or chunks for LLM pipelines. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows, Self-hosted
- **Website:** https://xberg.io
- **Repository:** https://github.com/xberg-io/tree-sitter-language-pack
- **MCP Registry name:** io.github.xberg-io/tree-sitter-language-pack
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Tree-sitter Language Pack bundles grammars for hundreds of programming languages behind one API, so developers can parse source files without compiling individual parsers. Parsers are fetched on first use and cached locally, which keeps the install small and lets you pull only the languages you need.

Once a file is parsed, the package can pull out functions, classes, imports, docstrings and other symbols, and split code into chunks suited to feeding an LLM or a retrieval pipeline. It also exposes a hierarchical key-value extraction for config and data formats such as JSON, YAML, TOML and XML. Bindings cover Python, Node.js, Go, Java, C# and several other languages, and a CLI and MCP server are included for use from the shell or from AI agents.

It suits developers building code search or developer tooling, teams feeding source code into RAG systems, and agent builders who want structural context about a codebase.

## Features

- **371 language grammars:** Parses source code across 371 languages using pre-compiled tree-sitter parsers.
- **Code symbol extraction:** Pulls out functions, classes, imports, docstrings and symbols from source files.
- **On-demand parser downloads:** Fetches each parser the first time it is needed and caches it for offline reuse.
- **Structured data extraction:** Builds hierarchical key-value trees from 17 config and data formats.
- **Native bindings:** Provides host-language APIs in Python, Node.js, Go, Java, C# and more.
- **CLI and MCP server:** Includes a command-line tool for pre-fetching parsers and an MCP server for AI agents.

## Good for

- Chunk source files into structured pieces for a RAG pipeline
- Build developer tooling that lists functions and classes in a repository
- Give an AI agent structural understanding of a codebase
- Pre-fetch only the grammars a project needs to keep installs small
- Extract keys and values from JSON, YAML or TOML configuration files

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tree-sitter-language-pack]
command = "npx"
args = ["-y", "@xberg-io/ts-pack-cli"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user tree-sitter-language-pack npx -- -y @xberg-io/ts-pack-cli

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
```

## FAQ

### How many languages does Tree-Sitter Language Pack support?

It includes 371 languages, each with a pre-compiled parser.

### Are parsers downloaded at install time?

No. Each parser is downloaded on first use and cached locally, and the ts-pack download command can pre-fetch them.

### Which languages can I call Tree-Sitter Language Pack from?

Native bindings exist for Python, Node.js, Go, Java, C#, Kotlin, Swift, Zig and C, with a C ABI for others.

### Is Tree-Sitter Language Pack free?

Yes. Tree-Sitter Language Pack is open source, so you can use and self-host it for free.

### How do I add Tree-Sitter Language Pack to Claude Code?

Run this command in your terminal: claude mcp add tree-sitter-language-pack -- npx -y @xberg-io/ts-pack-cli

### What are the best alternatives to Tree-Sitter Language Pack?

The closest alternatives to Tree-Sitter Language Pack are Tree-sitter MCP Server, Aptu Coder, Code Analyze MCP, treecut and Automatised Pipeline.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Tree-sitter MCP Server](https://ai-powered.com/mcp/tree-sitter-mcp-server): Tree-sitter MCP Server is an open-source MCP server for developer tools.
- [Aptu Coder](https://ai-powered.com/mcp/aptu-coder): Aptu Coder is an open-source MCP server for developer tools.
- [Code Analyze MCP](https://ai-powered.com/mcp/code-analyze-mcp): Code Analyze MCP is an open-source MCP server for developer tools.
- [treecut](https://ai-powered.com/mcp/treecut): treecut is an open-source MCP server for developer tools.
- [Automatised Pipeline](https://ai-powered.com/mcp/automatised-pipeline): Automatised Pipeline is an open-source MCP server for developer tools.
- [Codeloupe MCP](https://ai-powered.com/mcp/codeloupe-mcp): Codeloupe MCP is an open-source MCP server for developer tools.
- [Code-Graph-RAG](https://ai-powered.com/mcp/code-graph-rag): Code-Graph-RAG is an open-source MCP server for knowledge and memory.
- [Symbols](https://ai-powered.com/mcp/symbols): Symbols is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/tree-sitter-language-pack
