ast
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 large files.
claude mcp add --transport stdio angrysky56-ast-mcp-server uv --directory /absolute/path/to/ast-mcp-server/ast_mcp_server run server.py
How to use
This MCP server provides code analysis capabilities based on Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG). It supports multiple languages (Python, JavaScript/TypeScript, Go, Rust, C/C++, Java) and offers a suite of tools for parsing, analyzing, and caching results to speed up repeated work. You can access these tools through MCP-compatible clients such as Claude Desktop, which can query the server for tasks like parsing code into an AST, generating an ASG, performing structural analysis, and retrieving incremental or cached results. The server is designed to work locally, leveraging tree-sitter parsers and a robust caching layer to accelerate repetitive analyses on large codebases.
How to install
Prerequisites:\n- Python 3.9 or higher\n- uv package manager (recommended) or pip\n\nOption A: Using uv (Recommended)\n1) Clone the repository and enter the project directory:\n\nbash\ngit clone https://github.com/angrysky56/ast-mcp-server.git\ncd ast-mcp-server\n````\n2) Install the project in development mode with all dependencies:\n\nbash\nuv sync\n\n3) Build the tree-sitter parsers:\n\n```bash\nuv run build-parsers\n\n\nOption B: Using pip (Alternative)\n1) Create and activate a virtual environment:\n\nbash\npython -m venv .venv\nsource .venv/bin/activate # On Windows: .venv\Scripts\activate\n````\n2) Install dependencies in editable mode:\n\nbash\npip install -e .\n\n3) Build parsers:\n\n```bash\npython build_parsers.py\n
Additional notes
Tips and common considerations:\n- Ensure you have all required tree-sitter language packages installed when adding support for new languages: uv add tree-sitter-<language> (e.g., tree-sitter-python).\n- The server caches results to speed up repeated queries. You may need to clear or refresh caches if you modify parsers or language support.\n- If you encounter parser or language loading issues, rebuild parsers with uv run build-parsers and verify that the necessary tree-sitter language packages are available.\n- When configuring Claude Desktop or other MCP clients, specify the absolute path to the server working directory (the example uses the path in the repository).\n- Development and testing commands are provided under the Development section of the README; run tests with uv run pytest.\n- The server supports incremental parsing and enhanced ASG tools for more robust analysis across large codebases.
Related MCP Servers
mcp-pinecone
Model Context Protocol server to allow for reading and writing from Pinecone. Rudimentary RAG
mcp-python-interpreter
MCP Python Interpreter: run python code. Python-mcp-server, mcp-python-server, Code Executor
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
mcp-images
## MCP-Images Looking for a powerful image processing server? MCP Server-Image provides enterprise-grade image handling with just a few lines of code. Perfect for AI applications, web services, and data processing pipelines. [Get Started](#installation) | [Support Us](https://www.buymeacoffee.com/blazzmocompany)
google-search-console
It connects directly to your Google Search Console account via the official API, letting you access key data right from AI tools like Claude Desktop or OpenAI Agents SDK and others .
coder_db
An intelligent code memory system that leverages vector embeddings, structured databases, and knowledge graphs to store, retrieve, and analyze code patterns with semantic search capabilities, quality metrics, and relationship modeling. Designed to enhance programming workflows through contextual recall of best practices, algorithms, and solutions.