MCPFast / Tools / Deterministic Go code editing for LLM agents
AST-based CLI and MCP server for deterministic Go code editing, replacing Edit, Read, Grep for AI agents.
View on GitHub→LLM agents often require precise and reliable code manipulation. Traditional methods like edit , read , and grep are insufficient for programmatic, deterministic code changes, especially within complex Go projects. This tool provides an Abstract Syntax Tree (AST) based solution for programmatic Go code editing, enabling AI agents to perform reliable code modifications. It offers both a command-line interface (CLI) and an MCP server for seamless integration into agent workflows.
This tool allows AI agents to interact with Go source code at the AST level. Instead of relying on text-based operations that are prone to errors and context-dependency, it parses Go code into its structural representation. This enables precise operations such as inserting, deleting, modifying, and querying code elements based on their syntactic structure. The output is deterministic, meaning the same input code and the same operation will always produce the same modified code, which is critical for reproducible AI agent behavior.
This tool is intended for developers building AI agents that need to programmatically interact with and modify Go code. This includes AI engineers working on code generation, code refactoring, automated testing, and any other application where an AI agent needs to reliably understand and alter Go source files. If your AI agent requires deterministic and structurally aware code editing capabilities for Go projects, this tool is a foundational component.