
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that parses code into Abstract Syntax Trees and Abstract Semantic Graphs and provides code structure and semantic analysis tools.
AST MCP Server is cataloged as an MCP server attributed to angrysky56. An MCP server that parses code into Abstract Syntax Trees and Abstract Semantic Graphs and provides code structure and semantic analysis tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for AST MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It supports Python, JavaScript, TypeScript, Go, Rust, C, C++, and Java via tree-sitter parsers.
Yes, tools taking filenames or paths only work inside an allow-list of folders, and files likely holding secrets are refused.
README.md · 496bb00eb879 · Fetched 2026-11-13 09:44:57 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
An MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG).
git clone https://github.com/angrysky56/ast-mcp-server.git
cd ast-mcp-server
# 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
uv run build-parsers
# 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 build_parsers.py
Location of config file:
~/Library/Application Support/claude-desktop/claude_desktop_config.json~/.config/claude-desktop/claude_desktop_config.json%APPDATA%\claude-desktop\claude_desktop_config.json{
"mcpServers": {
"AstAnalyzer": {
"command": "uv",
"args": [
"--directory",
"/home/ty/Repositories/ai_workspace/ast-mcp-server/ast_mcp_server",
"run",
"server.py"
]
}
}
}
Important: Replace /absolute/path/to/ast-mcp-server with the actual absolute path on your system.
Restart Claude Desktop to load the new MCP server.
In Claude Desktop, you can now use the AST-based code analysis tools by referencing code files or pasting code snippets.

Tools that take a filename, project_path or output_folder only work
inside an allow-list of folders. Set it in .env:
AST_MCP_ALLOWED_ROOTS=/home/you/projects:/another/folder
.., ~ and symlinks are resolved before the check, so a link pointing
outside an allowed folder is refused..env, *.pem, *.key, SSH keys,
anything under .ssh / .aws / .gnupg / .kube) are refused even inside
an allowed folder. This matters because analyze_source_file sends file
contents to your configured LLM provider for the summary.code argument) is unaffected; filename is
then only a language hint.This is a local, single-user stdio server. The allow-list limits what a confused or prompt-injected agent can make it read; it is not a sandbox.
# Install with development dependencies
uv sync --extra dev
# Install pre-commit hooks (optional)
uv run pre-commit install
To run the server in development mode with the MCP inspector:
# Using uv
uv run --extra dev -- -m mcp dev server.py
# Or using the development script
./dev_server.sh
# Run all tests
uv run --extra testing pytest
# Run tests with coverage
uv run --extra testing pytest --cov=ast_mcp_server --cov-report=html
# Run specific tests
uv run --extra testing pytest tests/test_specific.py
# Format code
uv run black .
uv run isort .
# Lint code
uv run flake8 .
# Type checking
uv run mypy ast_mcp_server/
The server provides the following tools for code analysis:
parse_to_ast: Parse code into an Abstract Syntax Treegenerate_asg: Generate an Abstract Semantic Graph from codeanalyze_code: Analyze code structure and complexitysupported_languages: Get the list of supported programming languagesparse_and_cache: Parse code into an AST and cache it for resource accessgenerate_and_cache_asg: Generate an ASG and cache it for resource accessanalyze_and_cache: Analyze code and cache the results for resource accessparse_to_ast_incremental: Parse code with incremental support for faster processinggenerate_enhanced_asg: Generate an enhanced ASG with better scope handlingdiff_ast: Find differences between two versions of codefind_node_at_position: Locate a specific node at a given line and columnparse_and_cache_incremental: Parse code incrementally and cache the resultsgenerate_and_cache_enhanced_asg: Generate an enhanced ASG and cache itast_diff_and_cache: Generate an AST diff and cache itTo add support for additional programming languages:
uv add tree-sitter-<language>
Update the LANGUAGE_MODULES dictionary in build_parsers.py and ast_mcp_server/tools.py.
Build the parsers:
uv run build-parsers
tree-sitter-python)tree-sitter-javascript)tree-sitter-typescript)tree-sitter-go)tree-sitter-rust)tree-sitter-c)tree-sitter-cpp)tree-sitter-java)The AST MCP Server connects with Claude Desktop through the Model Context Protocol (MCP):
uv run with the appropriate working directoryfilename paths if the provided code is a placeholder.All tool execution happens locally on your machine, with results returned to Claude for interpretation and assistance.
pyproject.toml: Project metadata, dependencies, and tool configurationclaude_desktop_config.json: Example Claude Desktop configurationdev_server.sh: Development server script.gitignore: Git ignore rulesast-mcp-server/
├── ast_mcp_server/ # Main package
│ ├── __init__.py
│ ├── tools.py # Core AST/ASG tools
│ ├── enhanced_tools.py # Enhanced analysis features
│ ├── resources.py # MCP resource handlers
│ └── parsers/ # Tree-sitter parser cache
├── examples/ # Usage examples
├── tests/ # Test suite
├── server.py # Main server entry point
├── build_parsers.py # Parser setup script
├── pyproject.toml # Project configuration
└── README.md # This file
If you encounter parser-related errors:
# Rebuild parsers
uv run build-parsers
# Check for missing language packages
uv add tree-sitter-python tree-sitter-javascript
git checkout -b feature-nameuv run pytestMIT License - see LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for AST MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/ast-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.