mcp-gopls – MCP server for Go (gopls)
A Model Context Protocol (MCP) server that lets AI assistants use Go’s LSP (gopls) for navigation, diagnostics, testing, coverage, and more.
TL;DR: If you use Claude / Cursor / Copilot with Go,
mcp-goplsgives the AI full LSP powers: go-to-definition, references, hover, completion,go test, coverage,go mod tidy,govulncheck, etc.

Overview
This MCP server helps AI assistants to:
- Use LSP to analyze Go workspaces
- Navigate to definitions, references, and workspace symbols
- Format, rename, and inspect code actions without leaving MCP
- Run Go tests, coverage,
go mod tidy,govulncheck, and module graph commands with structured results - Read workspace resources (overview + go.mod) and consume curated prompts
Status: Actively developed – used in real projects.
Tested with Go 1.25.x andgopls@latest.
Architecture
This project uses the mark3labs/mcp-go library to implement the Model Context Protocol. The MCP integration enables seamless communication between AI assistants and Go tools.






