AST MCP Server
@angrysky56
About AST MCP Server
By transforming source code into a queryable Semantic Graph and a structured AST, this tool bridges the gap between "reading text" and "understanding structure." For an AI assistant, it provides the "spatial" awareness needed to navigate deep dependencies without getting lost in
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"ast-mcp-server": {
"command": "uv",
"args": [
"sync"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is AST MCP Server?
AST MCP Server is an MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG). It supports multiple programming languages (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java) and is compatible with Claude Desktop and other MCP clients.
How to use AST MCP Server?
Requires Python 3.9+ and either uv (recommended) or pip. Clone the repository, run uv sync then uv run build-parsers. Configure Claude Desktop by editing its configuration file and adding an MCP server entry with the absolute path to the server directory. Claude can then use tools like parse_to_ast, generate_asg, analyze_code, etc. to analyze code snippets or local files.
Key features of AST MCP Server
- Parse code into Abstract Syntax Trees (AST)
- Generate Abstract Semantic Graphs (ASG) from code
- Analyze code structure and complexity
- Support for multiple programming languages
- Incremental parsing for large files
- AST diffing to identify code changes
- Resource caching for improved performance
Use cases of AST MCP Server
- Analyze code structure in any supported language using Claude Desktop
- Compare code versions using AST diffing
- Cache analysis results for repeated queries
- Use incremental parsing for large files
- Locate specific nodes in code by line and column
FAQ from AST MCP Server
What languages does AST MCP Server support?
Python, JavaScript, TypeScript, Go, Rust, C, C++, and Java.
Where does data live?
All tool execution happens locally on your machine, with results returned to Claude for interpretation.
How do I configure Claude Desktop?
Edit the Claude Desktop configuration file (located at ~/Library/Application Support/claude-desktop/claude_desktop_config.json on macOS, with similar paths on Linux and Windows) and add the AST MCP server entry with the absolute path to the server directory.
What are the prerequisites?
Python 3.9 or higher and the uv package manager (recommended) or pip.
How do I add support for a new language?
Install the corresponding tree-sitter language package, update the LANGUAGE_MODULES dictionary in build_parsers.py and ast_mcp_server/tools.py, then run uv run build-parsers.
Frequently asked questions
What languages does AST MCP Server support?
Python, JavaScript, TypeScript, Go, Rust, C, C++, and Java.
Where does data live?
All tool execution happens locally on your machine, with results returned to Claude for interpretation.
How do I configure Claude Desktop?
Edit the Claude Desktop configuration file (located at `~/Library/Application Support/claude-desktop/claude_desktop_config.json` on macOS, with similar paths on Linux and Windows) and add the AST MCP server entry with the absolute path to the server directory.
What are the prerequisites?
Python 3.9 or higher and the `uv` package manager (recommended) or pip.
How do I add support for a new language?
Install the corresponding tree-sitter language package, update the `LANGUAGE_MODULES` dictionary in `build_parsers.py` and `ast_mcp_server/tools.py`, then run `uv run build-parsers`.
Basic information
More Other MCP servers
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web

Glasswarp
GlasswarpSee and control a real Windows PC you own — from any MCP client, locally or remotely. Observe (UIA + screenshots), click/type/drag/scroll, launch apps, owner Live View. BYOH: your machine, your key.
ghidraMCP
LaurieWiredMCP Server for Ghidra
ICSS
chokcoco不止于 CSS
Comments