AST2LLM for Go
About
A local AST-powered context enhancement tool for LLMs that analyzes Go project structure for faster context resolution.
Details
- Author
- vprud
- Categories
- Developer Tools
Jump to
Setup
Install AST2LLM for Go in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/vprud/ast2llm-go
Follow the installation instructions in the repository README, then restart your MCP client.
Local AST-powered context enhancement tool for LLM
Automatically injects relevant code structure into your prompts using precise Go AST analysis.
Our MCP server provides theparse-gotool that:
- Analyzes your Go project structure
- Identifies external type declarations
- Packages context for LLM prompts
- Delivers 3-5x faster context resolution than grap-based approaches
For example, the demo above shows the model calling the tool to get the missing information about the fields of theMyDTOstructure. In response, the model received all the necessary information from the response:
Used Imported Structs (from this project, if available): Struct: testme/dto.MyDTO Fields: - Foo string - Bar int
- Go 1.22 or higher (if building from source)
- Supported MCP client (Cursor, Claude, VS Code, etc.)
To installast2llm-goon your system, run the following command in your terminal:
curl -LsSf https://raw.githubusercontent.com/ast2llm/ast2llm-go/main/install.sh | sh
This script will automatically detect your OS and architecture, download the appropriate binary, and attempt to add it to your PATH. You can also specify an installation directory:
curl -LsSf https://raw.githubusercontent.com/ast2llm/ast2llm-go/main/install.sh | sh -s -- --install-dir /usr/local/bin
To updateast2llm-goto the latest version, simply re-run the installation command:
curl -LsSf https://raw.githubusercontent.com/ast2llm/ast2llm-go/main/install.sh | sh
To removeast2llm-gofrom your system, run the uninstallation script:
curl -LsSf https://raw.githubusercontent.com/ast2llm/ast2llm-go/main/uninstall.sh | sh
This script will remove the binary, clean up PATH modifications, and delete related configuration files. You may need to restart your shell after uninstallation.
After installationast2llm-go, you need to restart the IDE.
{ "mcpServers": { "go-ast": { "command": "ast2llm-go", "args": [] } } }
{ "mcpServers": { "go-ast": { "command": "ast2llm-go" } } }
{ "servers": { "go-ast": { "type": "stdio", "command": "ast2llm-go" } } }
This MCP server is under active development and may have stability issues or incomplete functionality. We're working hard to improve it, but you might encounter:
- Occasional parsing errors
- Limited type support in current version
- Performance bottlenecks with large codebases
Found an issue?
Open a GitHub Issueto help us improve! We appreciate all bug reports and feature requests.
- Support for struct types
- Support for interface types
- Support for function types
- Support for global variables
- Analyze multiple open files simultaneously
- Cross-file dependency resolution
- Context-aware import optimization
- Improved type hierarchy visualization
- Research optimal AST representation for LLMs. Provide different output formats tailored to various scenarios like inrepomix:
- XML: For compatibility with traditional solutions akin to Repomix.
- JSON: A modern format suitable for integration with contemporary tools and environments.
- Markdown: An easily readable format ideal for quick viewing and documenting changes.
- Incremental parsing
- AST caching
- Parallel analysis
We welcome contributions! Here's how you can help:
- Open an issue with a clear description
- Include steps to reproduce
- Add relevant logs/screenshots
- Open an issue with the feature request
- Explain the use case and benefits
- Include any relevant examples
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a PR with a clear description
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Create crafted UI components inspired by the best 21st.dev design engineers.
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.
Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





