
Gopls Mcp
io.github.xieyuschenPublished by GitHub account xieyuschenv1.0.7Updated Oct 24, 2026
Semantic code analysis for Go using gopls - language-aware navigation, definitions, references
Overview
Gives an assistant compiler-level semantic analysis of Go code: definitions, references, interface implementations, and call hierarchies.
- What you can do
- gopls-mcp exposes Go semantic analysis through gopls, the Go language server, so an assistant can navigate code by meaning rather than by text matching. It resolves the type system, including interface satisfaction, cross-package identity, and shadowed scopes, and is aimed at tasks such as finding all concrete types that implement an interface, tracing call hierarchies, and mapping package dependencies. The README reports a benchmark over 11 tasks where it used 2-4x fewer tool calls and finished faster than grep-based navigation on semantic tasks.
- When to use it
- Worth adding when an assistant works on Go codebases and needs semantic answers: which types implement an interface, how calls chain together, or how packages depend on each other. For simple lookups within a single file, the README notes plain grep is equally effective and has less overhead.
- Requirements
- Runs as a local process on the user's machine over stdio, desktop only. No packages, environment variables, headers, or authentication are declared in the manifest. Installation is described via a Claude Code or Codex plugin, or a manual install script for Linux, macOS, and Windows, followed by per-client setup.
Installation
In SourceWeft
- Open Gopls Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
gopls-mcp
Give your AI Agent the compiler's brain, not a text searcher.
Documentation: https://gopls-mcp.org
gopls-mcp delivers type-checker-level semantic analysis directly to your LLM. Unlike text search, it resolves Go's type system — interface satisfaction, cross-package identity, and shadowed scopes — with the same precision as the compiler.
Where it pays off most is on semantic tasks: finding all concrete types that implement an interface, tracing call hierarchies, and mapping package dependencies. A benchmark over 11 tasks shows gopls-mcp uses 2–4× fewer tool calls and finishes faster than grep-based navigation on those tasks. For simple same-file lookups, plain bash/grep remains equally effective and carries less overhead.
Install
Claude Code (plugin — recommended)
The plugin automatically installs the binary and injects the routing skill — no manual setup required.
Codex (plugin — recommended)
Manual install (all clients)
Linux / macOS:
Windows (PowerShell):
Then follow the per-client setup at https://gopls-mcp.org/quick-start.
Contribute
The project is actively developing, and feel free to raise PRs or issues if you find anything to improve. AI generated code will also be accepted but do remember to narrow the change to a specific feature for reviewer to quickly review them.
Disclaimer: gopls-mcp is a fork of gopls and is a community-driven project. It is not an official Go team product and is not affiliated with or endorsed by Google LLC. This project is licensed under the same BSD license as its upstream source.
Source: README.md at commit 2a45722
Tools
0Version history
1- v1.0.7LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts