Retrieves Go documentation for packages, types, functions, and other symbols
Go Documentation MCP provides efficient access to Go package documentation for LLMs. It helps AI models understand Go projects by providing direct access to package documentation without needing to read entire source files, significantly reducing token usage. This tool enables LLMs to get precisely the information they need about Go packages, from individual symbols to complete package documentation.
Go Documentation MCP is a Model Context Protocol server that provides efficient access to Go documentation. It helps LLMs understand Go projects by providing direct access to package documentation without needing to read entire source files, substantially reducing the number of tokens needed to understand and make use of Go packages.
go install github.com/mrjoshuak/godoc-mcp@latest
{
"mcpServers": {
"godoc": {
"command": "/path/to/godoc-mcp",
"args": [],
"env": {
"GOPATH": "/path/to/go",
"GOMODCACHE": "/path/to/go/pkg/mod"
}
}
}
}
Make sure to replace /path/to/godoc-mcp
with the actual path to the installed binary, and set the correct paths for GOPATH
and GOMODCACHE
environment variables.
You can use Go Documentation MCP to:
Understand Project Structure: "I'm looking at a Go project at /path/to/some/project. What packages does it contain and what do they do?"
Explore Package Interfaces: "What interfaces does the io package provide? I'm particularly interested in anything related to reading."
Get Implementation Guidance: "I need to implement the io.Reader interface. Show me its documentation and any related types I should know about."
Learn API Usage: "Show me the documentation for the Resource type in the /path/to/some/project. I need to understand how to create and use it."
Discover Methods: "What methods are available on the http.Request type? I'm working with standard library HTTP handlers."