Skip to content
MCP server

Tree-Sitter Language Pack

Parse code in 371 languages and extract symbols or chunks for LLM pipelines

Runs locally

Tree-Sitter Language Pack is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Linux
Runs
Locally
Version
1.28.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.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.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.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.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

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

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "tree-sitter-language-pack": {
      "command": "npx",
      "args": [
        "-y",
        "@xberg-io/ts-pack-cli"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.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

    Antigravity

    Add to ~/.gemini/config/mcp_config.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.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.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.

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.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.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.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.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Tree-Sitter Language Pack

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.

What it does

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

Pricing

Open source

Prices change. Check xberg.io before you buy.

Tree-Sitter Language Pack 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.

How AIPoweredBot checks servers