AST MCP Server

An MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG).

Local serverstdio

What is the AST MCP Server?

AST MCP Server is an MCP project maintained in the angrysky56/ast-mcp-server repository. The maintainer describes its purpose as “An MCP (Model Context Protocol) server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG)”. Read the project documentation for the complete scope.

Local setup

The project provides a local client configuration using uv. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
parse_to_astParse code into an Abstract Syntax Tree
generate_asgGenerate an Abstract Semantic Graph from code
analyze_codeAnalyze code structure and complexity
supported_languagesGet the list of supported programming languages
parse_and_cacheParse code into an AST and cache it for resource access
generate_and_cache_asgGenerate an ASG and cache it for resource access
analyze_and_cacheAnalyze code and cache the results for resource access
parse_to_ast_incrementalParse code with incremental support for faster processing
generate_enhanced_asgGenerate an enhanced ASG with better scope handling
diff_astFind differences between two versions of code
find_node_at_positionLocate a specific node at a given line and column
parse_and_cache_incrementalParse code incrementally and cache the results
generate_and_cache_enhanced_asgGenerate an enhanced ASG and cache it
ast_diff_and_cacheGenerate an AST diff and cache it

How to install the AST MCP Server

{
  "mcpServers": {
    "AstAnalyzer": {
      "command": "uv",
      "args": [
        "--directory",
        "/home/ty/Repositories/ai_workspace/ast-mcp-server/ast_mcp_server",
        "run",
        "server.py"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.