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
コメント