tree-sitter-language-pack-using-the-mcp-server
Skill480 starsChanged 3 months agoMITView on GitHub
Use when parsing source, extracting code structure, or detecting a language through the tree-sitter-language-pack MCP server's tools, rather than shelling out to the ts-pack CLI. Covers the tool surface, the auto-installing launcher, and when MCP beats the CLI or SDK.
- Installs packages
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 81
Prefer the SDK: when embedding parsing in application code or running custom tree-sitter queries.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:32a9429c4f5c314cfb1deb3eca4cab52f4c96283e07d68ecf017e925486e72ac
Source-Hash: blake3:e63d5809d1494bcfc9e4a67ba9975f7ed86cda4b3d2bdf85b0c483f0c5ddfcb0
Schema-Version: v1
-->Using the MCP Server
The tree-sitter-language-pack MCP server exposes ts-pack's parsing and
code-intelligence capabilities as MCP tools, so an MCP-compatible client (Claude
Code, Claude Desktop) can parse source, extract structure, and detect languages
directly, with no CLI invocation or glue code.
Standalone skill installation
Installing this skill alone does not register an MCP server or include the plugin launcher.
Install the CLI (for example, brew install xberg-io/tap/ts-pack), then configure your MCP client with
ts-pack mcp as its stdio command. The full product plugin supplies registration where
the runtime supports MCP.
How it runs in this plugin
The plugin auto-registers the server. Its command is the bundled launcher
scripts/mcp-launch.sh, which execs ts-pack mcp. On first run the launcher
resolves a ts-pack binary: it reuses one already on PATH or cached in the
plugin's bin/, then tries npx, then Homebrew, then downloads a prebuilt
from the tool's latest GitHub release. Override the channel with
TS_PACK_LAUNCHER=auto|npx|brew|download.
The mcp subcommand ships in a recent release of the tool. If an older
ts-pack is already on PATH, it may not expose mcp yet — upgrade the binary
(brew upgrade, re-download, or rebuild) to pick it up.
To run it manually:
ts-pack mcp # for Claude Code / Claude Desktop (stdio)The tools
Parsing and code intelligence:
- parse — syntax tree from
source; requires an explicitlanguage, with optionalformat(sexporjson). It does not detect language from a path — usedetect_languagefirst if you only have a path. - process — code intelligence: structure, imports, exports, symbols, docstrings, comments, diagnostics, chunks. Use
allflag to enable all features. - detect_language — identify language by
pathorcontent(those are the only two parameters; extension detection is implicit inpath).
Language and cache management:
- list_languages — available, downloaded, or manifest languages; optional filter by name.
- info — show language availability and cache status.
- download — prefetch parsers: specific languages, language groups, all, or fresh updates.
- cache_dir — return the cache directory path.
- clean_cache — remove all cached parsers.
Resources
ts-pack://languages— catalog of all known languages.ts-pack://languages/downloaded— currently cached languages.ts-pack://language/{name}— per-language metadata template.
Prompt and completions
- analyze-code — code-analysis prompt (args:
language, optionalfocus). - Language-name autocomplete — available language names in completions.
When to prefer MCP over the CLI or SDK
- Prefer MCP inside an agent session: the agent calls parsing directly as a tool, with no shell-out and no process management.
- Prefer the CLI for one-shot parsing/extraction and shell/CI pipelines.
- Prefer the SDK when embedding parsing in application code or running custom tree-sitter queries.
In this repository15 other files it gives its agents.
- apiSkill
- cliSkill
- mcpSkill
- apiSkill
- cliSkill
- mcpSkill
- apiSkill
- cliSkill
- mcpSkill
- tree-sitter-language-pack-chunking-for-llmsSkill
- tree-sitter-language-pack-detecting-languagesSkill
- tree-sitter-language-pack-extracting-code-structureSkill
- tree-sitter-language-pack-managing-parsersSkill
- tree-sitter-language-pack-parsing-sourceSkill
- tree-sitter-language-packSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

