From gopls-mcp
Type-aware Go code analysis via gopls: definitions, implementations, references, call hierarchy, dependency graphs, and rename previews. Prefer over grep for semantic Go tasks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gopls-mcp:gopls-mcpThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
gopls-mcp is **strictly a semantic Go layer** built on top of gopls's type
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.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.
npx claudepluginhub xieyuschen/gopls-mcp --plugin gopls-mcpProvides Go semantic code intelligence via gopls: go-to-definition, find references, refactoring, diagnostics, and more for navigating and editing Go code.
Provides Go repository intelligence via AST-accurate call graphs, blast radius analysis, and 57+ semantic queries. Replaces grep for Go symbol navigation, editing, refactoring, and bug hunting.
Go language conventions, idioms, and toolchain. Invoke when task involves any interaction with Go code — writing, reviewing, refactoring, debugging, or understanding Go projects.