A Model Context Protocol (MCP) server that lets AI assistants use Go’s LSP (`gopls`) for navigation, diagnostics, testing, coverage, and more.
A Model Context Protocol (MCP) server that lets AI assistants use Go’s LSP (gopls) for navigation, diagnostics, testing, coverage, and more.
go1.25.4) - gopls installed (go install golang.org/x/tools/gopls@latest) - Optional: govulncheck (go install golang.org/x/vuln/cmd/govulncheck@latest) - The server forces GOTOOLCHAIN=local for its nested gopls process. If you need a different toolchain, set GOTOOLCHAIN in the environment before launching mcp-gopls.Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| go_to_definition | Navigate to the definition of a symbol |
| find_references | List all references for a symbol |
| check_diagnostics | Fetch cached diagnostics for a file |
| get_hover_info | Return hover markdown for a symbol |
| get_completion | Return completion labels at a position |
| format_document | Return formatting edits for an entire document |
| rename_symbol | Return workspace edits for a rename |
| list_code_actions | List available code actions for a range |
| search_workspace_symbols | Search workspace-wide symbols |
| analyze_coverage | Run go test with coverage + optional per-function report |
| run_go_test | Execute go test for a package/pattern |
| run_go_mod_tidy | Execute go mod tidy |
| run_govulncheck | Execute govulncheck ./... |
| module_graph | Return go mod graph output |
{
"mcpServers": {
"mcp-gopls": {
"command": "mcp-gopls",
"args": [
"--workspace",
"/absolute/path/to/your/go/project"
],
"env": {
"MCP_GOPLS_LOG_LEVEL": "info"
}
}
}
}From the project documentation. Replace placeholders and example paths before connecting.
go1.25.4) - gopls installed (go install golang.org/x/tools/gopls@latest) - Optional: govulncheck (go install golang.org/x/vuln/cmd/govulncheck@latest) - The server forces GOTOOLCHAIN=local for its nested gopls process. If you need a different toolchain, set GOTOOLCHAIN in the environment before launching mcp-gopls.| Variable | Description | Required |
|---|---|---|
| MCP_GOPLS_LOG_LEVEL | Declared in the maintainer’s client configuration. | Check documentation |
Store entities, relations and observations in a local knowledge graph with the reference Memory MCP server.
A structured scratchpad for hard problems — stepwise reasoning with revisions, branches and visible logic.
Event-sourced knowledge graph memory for AI coding agents with semantic search
This is the MCP-Hive Proxy. It can be loaded by any agentic host in order to access MCP-Hive and is a gateway to other MCP servers. To obtain
Adaptive memory system for AI applications. Multi-strategy retrieval, cognitive scoring, knowledge graph, and self-improving ML. Connects via MCP or
This app demonstrates use of MCP server and client in a local model chat via Ollama that incorporates web search via Serper.