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
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Comments