Go Docs

v1.0.0Search & Data Extractionstable

Provides real-time access to Go package documentation, function signatures, and type definitions directly from pkg.go.dev. It enables LLMs to search for packages, retrieve specific versions, and access code examples from the official Go module ecosys

ai-agentsai-toolsanthropicclaudedocumentation
Share:
117
Stars
0
Downloads
0
Weekly
0/5

What is Go Docs?

Go Docs is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides real-time access to go package documentation, function signatures, and type definitions directly from pkg.go.dev. it enables llms to search for packages, retrieve specific versions, and acces...

Provides real-time access to Go package documentation, function signatures, and type definitions directly from pkg.go.dev. It enables LLMs to search for packages, retrieve specific versions, and access code examples from the official Go module ecosys

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides real-time access to Go package documentation, funct

Use Cases

Go package documentation search
Function signature lookup
Type definition retrieval
mrjoshuak

Maintainer

LicenseMIT License
Languagego
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx godoc

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Go Docs

godoc-mcp is an MCP server written in Go that provides real-time access to Go package documentation sourced directly from pkg.go.dev. It lets AI assistants search for packages, retrieve function signatures, inspect type definitions, view source code, and navigate the full Go module ecosystem without leaving the chat interface. Developers use it when writing or reviewing Go code to instantly look up standard library APIs, third-party packages at specific versions, and local module documentation.

Prerequisites

  • Go 1.21+ installed (for building from source) OR Docker (for the container image)
  • The `godoc-mcp` binary on your PATH after installation
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Optional: GOPATH and GOMODCACHE set if querying local module cache
1

Install godoc-mcp

Install the binary using `go install`. This downloads and compiles godoc-mcp from source and places the binary in your Go bin directory.

go install github.com/mrjoshuak/godoc-mcp@latest
2

Verify the installation

Confirm the binary is on your PATH and works correctly.

godoc-mcp --version
# or run it directly to start in stdio mode
godoc-mcp
3

Add to Claude Code as an MCP server

Register godoc-mcp with Claude Code using the CLI. It runs in stdio mode by default.

claude mcp add godoc-mcp -- godoc-mcp
4

Configure Claude Desktop

Add the server to your claude_desktop_config.json. Optionally set GOPATH and GOMODCACHE to help godoc-mcp resolve local module dependencies.

# Edit ~/Library/Application Support/Claude/claude_desktop_config.json
5

Optional: run via Docker for isolation

Use the official Docker image for a self-contained setup. Mount your project directory to enable local module documentation lookups.

docker run -i --rm \
  -v /path/to/project:/workspace \
  ghcr.io/mrjoshuak/godoc-mcp:latest

Go Docs Examples

Client configuration (Claude Desktop)

Standard configuration using the locally installed godoc-mcp binary. Add GOPATH and GOMODCACHE if you want to resolve local module documentation.

{
  "mcpServers": {
    "godoc": {
      "command": "godoc-mcp",
      "env": {
        "GOPATH": "/Users/yourname/go",
        "GOMODCACHE": "/Users/yourname/go/pkg/mod"
      }
    }
  }
}

Prompts to try

These prompts use the get_doc and list_packages tools to look up Go documentation from pkg.go.dev and local modules.

- "What methods are available on http.Request?"
- "Show me the interfaces in the io package related to reading."
- "Look up the documentation for the sync.Map type."
- "List all sub-packages in the golang.org/x/tools module."
- "Show the source code for the json.Marshal function."
- "What packages does my project at /path/to/project contain?"

Troubleshooting Go Docs

`godoc-mcp` binary not found after `go install`

Ensure `$(go env GOPATH)/bin` is on your PATH. Add `export PATH=$PATH:$(go env GOPATH)/bin` to your shell profile (~/.zshrc or ~/.bashrc) and restart your terminal.

Documentation not found for a private or local package

Set `working_dir` in the tool call to your project root, and ensure GOPATH and GOMODCACHE point to your local Go environment in the MCP server config. Local packages are resolved via the module cache, not pkg.go.dev.

Results are truncated for large packages

Use the `page` and `page_size` parameters supported by the get_doc tool to paginate through large documentation sets, or use `target` to narrow the query to a specific symbol.

Frequently Asked Questions about Go Docs

What is Go Docs?

Go Docs is a Model Context Protocol (MCP) server that provides real-time access to go package documentation, function signatures, and type definitions directly from pkg.go.dev. it enables llms to search for packages, retrieve specific versions, and access code examples from the official go module ecosys It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Go Docs?

Follow the installation instructions on the Go Docs GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Go Docs?

Go Docs works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Go Docs free to use?

Yes, Go Docs is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "godoc": { "command": "npx", "args": ["-y", "godoc"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Go Docs?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides