mcpField
G
godoc-mcp-server

godoc-mcp-server

Local
github.com/yikakiaDeveloper Tools38Updated 32w ago

About godoc-mcp-server

godoc-mcp-server is an MCP server that searches Go packages and their documentation on pkg.go.dev and provides the results to LLMs. It is intended for Go programmers and runs over stdio.

Key features

  1. 01Search Go packages and their docs
  2. 02Retrieve package info and examples
  3. 03Show how many packages import a package
  4. 04Local cache to reduce repeated searches
  5. 05Query subpackage information

Use cases

  1. 01Letting an LLM look up Go package usage and documentation
  2. 02Finding a subpackage and retrieving its details

MCP support

This project is an MCP server that provides tools such as searchPackage and getPackageInfo over stdio, returning package information from pkg.go.dev to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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
    • fixme: subpackage need new adapter
    • 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.