MCP LSP Go
@hloiseaufcms
About MCP LSP Go
Model Context Protocol (MCP) server for Go using gopls – LSP-powered analysis, tests, coverage, and tooling.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-gopls": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"\\"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP LSP Go?
An MCP server that bridges AI assistants (Claude, Cursor, Copilot) with Go’s language server (gopls) to provide navigation, diagnostics, testing, coverage, and code tooling capabilities via the Model Context Protocol.
How to use MCP LSP Go?
Install with go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latest, then configure your AI client (Cursor, Claude Desktop, GitHub Copilot) to run mcp-gopls --workspace /absolute/path/to/your/go/project. A Docker image is also available for containerized setups.
Key features of MCP LSP Go
- Configurable runtime via flags and environment variables
- Structured logging with text or JSON output
- Full LSP surface: navigation, diagnostics, formatting, rename, code actions
- Go tooling helpers: test, coverage, mod tidy, vulncheck, module graph
- Extra MCP resources and prompts for diagnostics and refactoring
- Progress streaming for long-running operations
Use cases of MCP LSP Go
- Navigate to symbol definitions and find references across a workspace
- Run Go tests and analyze code coverage with per-function stats
- Fetch diagnostics, hover information, and code completions for any file
- Execute code formatting, renaming, and list available code actions
- Inspect module dependencies and run vulnerability checks
FAQ from MCP LSP Go
How does MCP LSP Go differ from the built-in gopls MCP server?
MCP LSP Go offers a richer tool set: go-to-definition, hover, completion, formatting, code actions, go test, coverage, mod tidy, and module graph—features absent from the built-in gopls MCP. The built-in server is sufficient for read-only tools like diagnostics and symbol search.
What are the runtime requirements?
The server is written in Go and tested with Go 1.25.x and gopls@latest. It runs as a stdio-based MCP server and can be configured via command-line flags or the MCP_GOPLS_* environment variables.
Does it support progress streaming?
Yes. Long-running commands emit notifications/progress events so clients can surface status updates to the user.
Can I use MCP LSP Go with Docker?
Yes. An official Docker image is available at ghcr.io/hloiseau/mcp-gopls:latest. You can mount your Go project as a volume and run --workspace /workspace.
How is the server configured for different AI clients?
The binary and arguments are identical across clients: mcp-gopls --workspace /path/to/project. Each client (Cursor, Claude Desktop, GitHub Copilot) uses a slightly different JSON configuration file to define the server’
More Other MCP servers
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Servers
modelcontextprotocolModel Context Protocol Servers
ICSS
chokcoco不止于 CSS
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Comments