MCP server for code analysis using Tree-sitter
Until 2026-09-26 this record combined several servers published from one repository. The others now have records of their own: treesitter-mcp. Checks from before that date include them.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"iflow-mcp-pwno-io-treesitter-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# Tree-sitter MCP Server & CLI An MCP server and CLI that uses Tree-sitter to parse and analyze code. ## What it does - Parse files and get their AST - Extract functions and variables - Build call graphs - Find where functions/variables are used - Run custom Tree-sitter queries - List imports/includes - Extract source code for specific line/column ranges - Use as a standalone CLI or as an MCP server for Claude Desktop ## Install Requires Python 3.10+. ```bash # Install directly uv pip install treesitter-mcp # Or install a specific version uv pip install treesitter-mcp==2.1 # Or clone and install git clone https://github.com/pwno-io/treesitter-mcp.git cd treesitter-mcp uv pip install -e . ``` This installs both `treesitter-mcp` and `ts-cli` entry points. Or run without installing: ```bash uvx treesitter-mcp ``` ## Running ### As an MCP server (default) For use with Claude Desktop or other MCP clients: ```bash treesitter-mcp ``` See `docs/MCP_USAGE.md` for how to configure. ### Standalone CLI (ts-cli) Run analysis directly from the terminal: ```bash ts-cli path/to/file.py ts-cli path/to/file.py --ast --max-depth 2 ts-cli path/to/file.py --find-function main --include-source ts-cli --supported-languages ``` Use `--output-file` to write results to JSON files instead of stdout. ### HTTP mode For testing or manual use: ```bash treesitter-mcp --http --port 8000 --host 127.0.0.1 ``` ### Limiting tools Only expose certain tools with `--tools`: ```bash treesitter-mcp --http --port 8000 --tools treesitter_analyze_file,treesitter_get_ast ``` Or via URL query param: `http://127.0.0.1:8000?tools=treesitter_analyze_file,treesitter_get_ast` Tools available: - `treesitter_analyze_file` - Basic analysis - `treesitter_get_ast` - Full AST - `treesitter_get_call_graph` - Function calls - `treesitter_find_function` - Find function definitions - `treesitter_find_variable` - Find variables - `treesitter_get_source_for_range` - Extract source code for a range - `…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.