A
angrysky56/ast-mcp-server
Query a semantic graph and AST of a codebase
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
We have neither an install command nor a public remote endpoint from this repository, so we do not print a config. A made-up one is worse than none. How each client wires MCP up →
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# AST MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG).
## Features
Parse code into Abstract Syntax Trees (AST)
Generate Abstract Semantic Graphs (ASG) from code
Analyze code structure and complexity
Support for multiple programming languages (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java)
Compatible with Claude Desktop and other MCP clients
Incremental parsing for faster processing of large files
Enhanced scope handling and more complete semantic analysis
AST diffing to identify changes between code versions
Resource caching for improved performance
## Installation
### Prerequisites
Python 3.9 or higher
uv package manager (recommended) or pip
### Using uv (Recommended)
1. Clone this repository:
bash
git clone https://github.com/angrysky56/ast-mcp-server.git
cd ast-mcp-server
2. Install the project and dependencies:
bash
# Install the project in development mode with all dependencies
uv sync
# Or install with specific optional dependencies
uv sync --extra dev # Development tools
uv sync --extra testing # Testing dependencies
uv sync --extra docs # Documentation tools
3. Build the tree-sitter parsers:
bash
uv run build-parsers
### Using pip (Alternative)
bash
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
# Build parsers
python buildparsers.py
## Usage with Claude Desktop
1. Configure Claude Desktop to use the server by editing your configuration file:
Location of config file:
macOS: ~/Library/Application Support/claude-desktop/claudedesktopconfig.json
Linux: ~/.config/claude-desktop/claudedesktopconfig.json
Windows: %APPDATA%\claude-desktop\claudedesktopconfig.json
2. Add the AST MCP server configuration:
json
"mcpServers": {
"AstAnalyzer": {
"command": "uv",
"args": [
"--directory",
"/home/ty/Repositories/aiworkspace/ast-mcp-server/astmcpserver",
"run",
"server.py"
Important: Replace /absolute/path/to/ast-mcp-server with the actual absolute path on your system.
3. Restart Claude Desktop to load the new MCP server.
4. In Claude Desktop, you can now use the AST-based code analysis tools by referencing code files or pasting code snippets.
## Development
### Development Environment Setup
bash
# Install with development dependencies
uv sync --extra dev
# Install pre-commit hooks (optional)
uv run pre-commit install
### Running in Development Mode
To run the server in development mode with the MCP inspector:
bash
# Using uv
uv run --extra dev -- -m mcp dev server.py
# Or using the development script
./devserver.sh
### Testing
bash
# Run all tests
uv run --extra testing pytest
# Run tests with coverage
uv run --extra testing pytest --cov=astmcpserver --cov-report=html
# Run specific tests
uv run --extra testing pytest tests/testspecific.py
### Code Quality
bash
# Format code
uv run black .
uv run isort .
# Lint code
uv run flake8 .
# Type checking
uv run mypy astmcpserver/
## Available Tools
The server provides the following tools for code analysis:
### Basic Tools
parsetoast: Parse code into an Abstract Syntax Tree
generateasg: Generate an Abstract Semantic Graph from code
## Features
Parse code into Abstract Syntax Trees (AST)
Generate Abstract Semantic Graphs (ASG) from code
Analyze code structure and complexity
Support for multiple programming languages (Python, JavaScript, TypeScript, Go, Rust, C/C++, Java)
Compatible with Claude Desktop and other MCP clients
Incremental parsing for faster processing of large files
Enhanced scope handling and more complete semantic analysis
AST diffing to identify changes between code versions
Resource caching for improved performance
## Installation
### Prerequisites
Python 3.9 or higher
uv package manager (recommended) or pip
### Using uv (Recommended)
1. Clone this repository:
bash
git clone https://github.com/angrysky56/ast-mcp-server.git
cd ast-mcp-server
2. Install the project and dependencies:
bash
# Install the project in development mode with all dependencies
uv sync
# Or install with specific optional dependencies
uv sync --extra dev # Development tools
uv sync --extra testing # Testing dependencies
uv sync --extra docs # Documentation tools
3. Build the tree-sitter parsers:
bash
uv run build-parsers
### Using pip (Alternative)
bash
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
# Build parsers
python buildparsers.py
## Usage with Claude Desktop
1. Configure Claude Desktop to use the server by editing your configuration file:
Location of config file:
macOS: ~/Library/Application Support/claude-desktop/claudedesktopconfig.json
Linux: ~/.config/claude-desktop/claudedesktopconfig.json
Windows: %APPDATA%\claude-desktop\claudedesktopconfig.json
2. Add the AST MCP server configuration:
json
"mcpServers": {
"AstAnalyzer": {
"command": "uv",
"args": [
"--directory",
"/home/ty/Repositories/aiworkspace/ast-mcp-server/astmcpserver",
"run",
"server.py"
Important: Replace /absolute/path/to/ast-mcp-server with the actual absolute path on your system.
3. Restart Claude Desktop to load the new MCP server.
4. In Claude Desktop, you can now use the AST-based code analysis tools by referencing code files or pasting code snippets.
## Development
### Development Environment Setup
bash
# Install with development dependencies
uv sync --extra dev
# Install pre-commit hooks (optional)
uv run pre-commit install
### Running in Development Mode
To run the server in development mode with the MCP inspector:
bash
# Using uv
uv run --extra dev -- -m mcp dev server.py
# Or using the development script
./devserver.sh
### Testing
bash
# Run all tests
uv run --extra testing pytest
# Run tests with coverage
uv run --extra testing pytest --cov=astmcpserver --cov-report=html
# Run specific tests
uv run --extra testing pytest tests/testspecific.py
### Code Quality
bash
# Format code
uv run black .
uv run isort .
# Lint code
uv run flake8 .
# Type checking
uv run mypy astmcpserver/
## Available Tools
The server provides the following tools for code analysis:
### Basic Tools
parsetoast: Parse code into an Abstract Syntax Tree
generateasg: Generate an Abstract Semantic Graph from code
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/angrysky56-ast-mcp-server/)
- Source
- awesome · https://github.com/angrysky56/ast-mcp-server
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.