Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

godoc-mcp-server

MCP.Pizza Chef: yikakia

godoc-mcp-server is an MCP server that enables LLMs to access and retrieve Go programming language package documentation and metadata from pkg.go.dev. It supports searching Go packages, fetching package info, and caching results locally to optimize queries. This server is designed for Go developers and tools that need real-time, structured access to Go package documentation within AI workflows.

Use This MCP server To

Search Go packages and retrieve documentation metadata Provide Go package info to LLMs for code assistance Cache Go package search results for faster repeated queries Integrate Go package docs into AI-powered coding copilots Enable LLMs to understand Go package dependencies and usage Fetch package import statistics for Go modules Support multi-platform deployment for Go doc querying

README

godoc-mcp-server

search golang packages and their docs from pkg.go.dev, provide the infomation to llm as mcp server

Install

You can download the compiled binary from the releases page.

Or you can install it from source, compile it by yourself:

go install github.com/yikakia/godoc-mcp-server/cmd/godoc-mcp-server@latest

Usage

just use your client to request. it servers on stdio

Todo

  • localCache
    • use a local cache to avoid search every time(From reddit user)
  • searchPackage
    • imported by how many packages
  • getPackageInfo
    • get examples
  • release
    • use github actions to release for multiple platforms

Develop Experience

The description is very important, when describing the param should tell the client how to use one tool's output and change the format to match another tool's input.

For example, the output of searchPackage contains subpackage's name, but do not contain the package's name. So if want the llm to use getPackageInfo to get the subpackage's info, I wrote the description for param packageName about how to use it to work with searchPackage:

package name for search. if use searchPackages before, and user want to get the subpackage info. you should plus them for example, when user query mcp, and it return packageName: github.com/mark3labs/mcp-go/mcp and subpackage client, then if user want to get the client package info, you should set the packageName to github.com/mark3labs/mcp-go/mcp/client rather than client

When using this detail description, the llm will tell you some subpackage's name after search. You can just tell it which package you want to get info, or which package and the subpackage's name, it will combine them and call getPackageInfo to get the info.

So maybe we should make the description configurable by user, to make the tool more useful and efficiency.

Library Usage

The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.

License

This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

godoc-mcp-server FAQ

How do I install godoc-mcp-server?
You can download precompiled binaries from the releases page or install from source using 'go install github.com/yikakia/godoc-mcp-server/cmd/godoc-mcp-server@latest'.
How does godoc-mcp-server serve data to clients?
It serves data over standard input/output (stdio), allowing clients to request Go package information seamlessly.
Does godoc-mcp-server cache search results?
Yes, it uses a local cache to avoid repeated searches and improve response times.
Can godoc-mcp-server provide example code snippets?
Currently, example retrieval is a planned feature and not yet implemented.
Is godoc-mcp-server limited to any specific platform?
No, it uses GitHub Actions to release binaries for multiple platforms, ensuring broad compatibility.
How can I contribute to godoc-mcp-server development?
You can contribute by submitting issues or pull requests on the GitHub repository, especially for features like example fetching.
What kind of Go package information can godoc-mcp-server provide?
It provides package search results, import statistics, and detailed package metadata from pkg.go.dev.
How does godoc-mcp-server help LLMs in Go development?
By providing structured, real-time access to Go package docs, it enables LLMs to assist with code understanding and generation.