# Godoc Mcp

> The MCP server to search local Go pacakge

- **Type:** MCP server
- **Install:** `agentstack add mcp-budougumi0617-godoc-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [budougumi0617](https://agentstack.voostack.com/s/budougumi0617)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [budougumi0617](https://github.com/budougumi0617)
- **Source:** https://github.com/budougumi0617/godoc-mcp

## Install

```sh
agentstack add mcp-budougumi0617-godoc-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# godoc-mcp

## Overview

godoc-mcp is a server that provides information about Go project packages, types, functions, constants, and variables via the Multi-Command Protocol (MCP). It allows you to flexibly retrieve and utilize Go code documentation and structure from external tools.

## Main Features

- Retrieve a list of Go packages
- List exported structs, functions, and methods in a package
- Get detailed information about structs (fields, methods, comments)
- Get detailed information about functions and methods (signature, comments, examples)
- Get detailed information about constants and variables in a package

## Installation

Go 1.24.2 or later is required.

```sh
make build
```

## Usage

### Start the Server

```sh
./godoc-mcp -root 
```

- Use the `-root` option to specify the root directory of the Go project to analyze.
- If omitted, the current directory or the environment variable `GODOC_MCP_ROOT_DIR` will be used.

### Using as an MCP Tool

You can use the following tools from an MCP client:

- `golang_list_packages`: Get a list of packages and their comments
- `golang_inspect_package`: List structs, functions, and methods in a package
- `golang_get_struct_doc`: Get detailed information about a struct
- `golang_get_func_doc`: Get detailed information about a function
- `golang_get_method_doc`: Get detailed information about a struct method
- `golang_get_const_and_var_doc`: Get detailed information about constants and variables

#### Example: mcp settings for Roo Code

```json
{
  "mcpServers": {
    "godoc-mcp": {
      "type": "stdio",
      "command": "godoc-mcp",
      "env": {
        "GODOC_MCP_ROOT_DIR": "${env:HOME}/go/src/github.com/golang/tools/internal",
        "GOPATH": "${env:HOME}/go",
        "HOME": "${env:HOME}",
        "GOCACHE": "${env:HOME}/Library/Caches/go-build"
      },
    }
  }
}
```

## Test

```sh
go test ./...
```

## Dependencies

- github.com/ktr0731/go-mcp
- golang.org/x/exp/jsonrpc2
- golang.org/x/tools

## Environment Variables
- `GOPATH`: Required by `golang.org/x/tools/go/packages`
- `GOCACHE`: Required by `golang.org/x/tools/go/packages`
- `GODOC_MCP_ROOT_DIR`: Root directory of the Go project to analyze

## License

MIT License

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [budougumi0617](https://github.com/budougumi0617)
- **Source:** [budougumi0617/godoc-mcp](https://github.com/budougumi0617/godoc-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-budougumi0617-godoc-mcp
- Seller: https://agentstack.voostack.com/s/budougumi0617
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
