/gopls-mcp:gopls-mcpfrom gopls-mcp
Semantic Go code analysis via gopls — type-aware definitions, references, implementations, call hierarchy, dependency graphs, and rename previews. Prevents fallback to grep for Go-specific tasks.
Ships in gopls-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
gopls-mcp is strictly a semantic Go layer built on top of gopls's type checker. It exposes six tools — that's the whole surface area:
| Task | Tool |
|---|---|
| Jump to definition | go_definition |
| Find interface implementations | go_implementation |
| Find symbol references | go_symbol_references |
| Trace call relationships | go_get_call_hierarchy |
| Analyze package dependencies | go_get_dependency_graph |
| Preview a symbol rename | go_dryrun_rename_symbol |
These cannot be replaced by Grep + Read, because Go's type system makes
interfaces, scopes, and identity invisible to text search.
For anything else — listing packages, reading go.mod, searching symbol
names, running go build, scanning files — use your native tools (Glob,
Grep, Read, Bash). They are already optimal for those jobs, so we
deliberately don't ship duplicates.
Grep / Glob /
Read / Bash. There is no gopls-mcp tool for these.file:line locations, signatures, and docs cleanly.
Never dump raw JSON.go_implementation: Interfaces and types only. Not for functions.
Invocation structure: Semantic tools that accept a symbol locator require
a root locator object; do not pass symbol_name or context_file as
top-level arguments. For example, call go_definition with:
{
"locator": {
"symbol_name": "Start",
"context_file": "/absolute/path/to/server.go"
}
}
General locator parameters:
symbol_name: bare identifier, no package prefix
("Start", not "Server.Start").context_file: an absolute path to the file you are currently reading
or where the symbol appears. The resolver uses this for scope and
import disambiguation.If a semantic tool returns nothing, do not silently fall back to grep:
context_file is correct and inside a Go module.go_implementation, check that parent_scope points at the
interface, not the concrete type.Only after these checks fail should you fall back to manual Read of the
relevant file — and only as diagnosis, not as a substitute capability.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub xieyuschen/gopls-mcp --plugin gopls-mcpOther plugins' skills for the same job