- Explore MCP Servers
- godoc-mcp
Godoc Mcp
What is Godoc Mcp
godoc-mcp is a server that provides information about Go project packages, types, functions, constants, and variables via the Multi-Command Protocol (MCP). It enables flexible retrieval and utilization of Go code documentation and structure from external tools.
Use cases
Use cases for godoc-mcp include generating documentation for Go projects, inspecting package structures, and aiding in code navigation and understanding for developers working with Go.
How to use
To use godoc-mcp, start the server by running ./godoc-mcp -root <root directory of your Go project>. You can also specify the root directory using the environment variable GODOC_MCP_ROOT_DIR. Once the server is running, you can interact with it using various MCP commands to retrieve package and documentation information.
Key features
Key features of godoc-mcp include: retrieving a list of Go packages, listing exported structs, functions, and methods in a package, obtaining detailed information about structs (fields, methods, comments), functions and methods (signature, comments, examples), and constants and variables in a package.
Where to use
godoc-mcp can be used in software development environments where Go is utilized, particularly for projects that require detailed documentation and analysis of Go packages.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Godoc Mcp
godoc-mcp is a server that provides information about Go project packages, types, functions, constants, and variables via the Multi-Command Protocol (MCP). It enables flexible retrieval and utilization of Go code documentation and structure from external tools.
Use cases
Use cases for godoc-mcp include generating documentation for Go projects, inspecting package structures, and aiding in code navigation and understanding for developers working with Go.
How to use
To use godoc-mcp, start the server by running ./godoc-mcp -root <root directory of your Go project>. You can also specify the root directory using the environment variable GODOC_MCP_ROOT_DIR. Once the server is running, you can interact with it using various MCP commands to retrieve package and documentation information.
Key features
Key features of godoc-mcp include: retrieving a list of Go packages, listing exported structs, functions, and methods in a package, obtaining detailed information about structs (fields, methods, comments), functions and methods (signature, comments, examples), and constants and variables in a package.
Where to use
godoc-mcp can be used in software development environments where Go is utilized, particularly for projects that require detailed documentation and analysis of Go packages.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
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
Test
go test ./...
Dependencies
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
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










