go-mcp-serverModel Context Protocol (MCP) implementation for llm to better understand go language written projects. Usagego1.25 is required now, later it may allow more go versions. It serves in stdio by default but you can pass flag to specify an streamable http server with an address.
Try the pre-release version in vscode extension. In vscode extension, it starts a stdio mcp server to communicate with vscode and automatically register itself to vscode so you don't need any additional mcp setting. MCP Server Tools
MotivationAs a go user and a contributor, I have used Go in my daily work. Recently, I have tried some AI tools and they are pretty good and useful. However, I found several drawbacks that cannot be tracked by the LLM as codebase are a relative specific rather than general scope. To be more concrete, LLM knows a lot because (probably) they have learned huge amount of codebase during training. But as time goes by, both go(standard library) and third party dependencies keep evolving, the LLM doesn't have these background. This will cause some problems:
Besides the code generation, LLM also lacks of ablity to analyze my existing project for learning/referening purpose. For example, in a specific scenario, I want to check whether I have predefined functions to reuse, or slightly revise it to make it fit more general case. LLM isn't good at it. I don't aim to blame LLM here because they nataurely lacks these understanding. Hence I believe by a mcp to expose more static analysis of project is helpful. |