MCP ExplorerExplorer

Godoc Mcp Server

@yikakiaon a year ago
14 MIT
FreeCommunity
AI Systems
#go#mcp#mcp-server#modelcontextprotocol
A mcp server provide pkg.go.dev. For all golang programmers

Overview

What is Godoc Mcp Server

godoc-mcp-server is a MCP server that provides access to Go packages and their documentation from pkg.go.dev, specifically designed for Go programmers.

Use cases

Use cases include integrating the server into development tools, enhancing IDEs with Go package documentation, and providing a quick reference for Go programmers during development.

How to use

To use godoc-mcp-server, install it via the command ‘go install github.com/yikakia/godoc-mcp-server/cmd/godoc-mcp-server@latest’ and then make requests using your client as it operates on standard input/output.

Key features

Key features include the ability to search for Go packages, retrieve package information, and access documentation. It also has planned features for package import tracking and example retrieval.

Where to use

godoc-mcp-server is useful in software development environments, particularly for Go developers who need to access package documentation and related information efficiently.

Content

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
    • [x] use a local cache to avoid search every time(From reddit user)
  • searchPackage
    • [x] imported by how many packages
  • getPackageInfo
    • [ ] get examples
  • release
    • [x] 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.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers