Reverse engineer anything with agents, from app behavior down to native binaries.
MCP Gopls
Model Context Protocol (MCP) server for Go using gopls, LSP-powered analysis, tests, coverage, and tooling.
Install: go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latest
Install
go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latestInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →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.
The server communicates with gopls, the official language server for Go, via the Language Server Protocol (LSP).
Features
- Configurable runtime:
--workspace,--gopls-path,--log-level,--rpc-timeout, and--shutdown-timeoutflags + env vars (MCP_GOPLS_*) - Structured logging: Text/JSON logging with slog and optional file output
- Extended LSP surface: navigation, diagnostics, formatting, rename, code actions, hover, completion, workspace symbols
- Test & tooling helpers: coverage analysis,
go test,go mod tidy,govulncheck,go mod graph - MCP extras: resources (
resource://workspace/overview,resource://workspace/go.mod) and prompts (summarize_diagnostics,refactor_plan) - Progress streaming: long-running commands emit
notifications/progressevents so clients can surface status updates
Feature comparison: mcp-gopls vs built-in gopls MCP
As of gopls v0.20.0, the built-in MCP server exposes these tools:
go_context, go_diagnostics, go_file_context, go_file_diagnostics,
go_file_metadata, go_package_api, go_references, go_rename_symbol,
go_search, go_symbol_references, go_workspace, go_vulncheck.
Similar plugs
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io