About Godoc MCP
Godoc MCP is an MCP server published by budougumi0617 in the Developer Tools category: the MCP server to search local Go pacakge. It has been installed 0 times through Conduid.
The repository has 2 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx godoc-mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Godoc MCP
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
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.
make build
Usage
Start the Server
./godoc-mcp -root <root directory of your Go project>
- Use the
-rootoption to specify the root directory of the Go project to analyze. - If omitted, the current directory or the environment variable
GODOC_MCP_ROOT_DIRwill 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 commentsgolang_inspect_package: List structs, functions, and methods in a packagegolang_get_struct_doc: Get detailed information about a structgolang_get_func_doc: Get detailed information about a functiongolang_get_method_doc: Get detailed information about a struct methodgolang_get_const_and_var_doc: Get detailed information about constants and variables
Example: mcp settings for Roo Code
{
"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
go test ./...
Dependencies
- github.com/ktr0731/go-mcp
- golang.org/x/exp/jsonrpc2
- golang.org/x/tools
Environment Variables
GOPATH: Required bygolang.org/x/tools/go/packagesGOCACHE: Required bygolang.org/x/tools/go/packagesGODOC_MCP_ROOT_DIR: Root directory of the Go project to analyze
License
MIT License
README mirrored from the source repository 3 months ago. The original is authoritative.