# gopls-mcp

Go semantic code analysis MCP server powered by gopls. It gives LLMs compiler-level insights to track interface implementations, call trees, and package references.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 60
- Author: xieyuschen
- License: BSD-3-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/xieyuschen/gopls-mcp
- Updated: 2026-10-18
- HTML: https://affpapa.org/en/nevibecode/mcp/gopls-mcp

## What it does

The project is a community fork of `gopls` that supplies compiler information directly to the assistant. It operates like the compiler. Instead of scanning lines for regex matches, the agent inspects Go semantics. This setup reveals concrete types behind an interface, tracks cross-package identifiers, and resolves variables hidden by nested scopes.

Across 11 benchmark tasks, `gopls-mcp` needed 2–4× fewer tool calls than grep. For looking up a symbol inside one file, running this server is unnecessary: standard terminal search carries less overhead. The Claude Code plugin setup fetches the binary and configures routing without manual steps.

## Requirements
- Needs: a prebuilt binary from the repository releases

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- find concrete types that implement an interface
- trace function call hierarchies across Go packages
- resolve variable names inside shadowed scopes
- map package dependencies across a Go project

## Example prompts
- Find all concrete types that satisfy the `Reader` interface in this repository.
- Trace the call hierarchy for the `ProcessJob` function.
- Show where the `Config` struct is declared and list all packages that use it.

## Similar
- [Serena MCP: the IDE for your agent](https://affpapa.org/en/nevibecode/mcp/serena-mcp-the-ide-for-your-agent.md) — MCP server · ★ 30677
- [Compiler Explorer](https://affpapa.org/en/nevibecode/mcp/compiler-explorer.md) — MCP server · ★ 19148
- [Claude Code Explorer MCP](https://affpapa.org/en/nevibecode/mcp/claude-code-explorer-mcp.md) — MCP server · ★ 6235
- [Tolgee](https://affpapa.org/en/nevibecode/mcp/tolgee.md) — MCP server · ★ 4139
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2061
- [pyscn](https://affpapa.org/en/nevibecode/mcp/pyscn.md) — MCP server · ★ 1096

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
