gopls-mcp: semantic Go analysis for agents

gopls-mcp

A gopls-based MCP server: the agent finds Go definitions, interface implementations, references and calls with compiler precision

  • 60 ★ on the repository
  • Last commit
  • BSD-3-Clause
MCP server

Minimal access

Why this level

  • The server reads project Go source and runs gopls and makes no file changes, renames run as dry runs
All reasons and checks

xieyuschen/gopls-mcp

Install

Manual install

/plugin marketplace add https://github.com/xieyuschen/gopls-mcp.git

Then /plugin install gopls-mcp. The plugin installs the binary and the routing skill itself.

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The server reads project Go source and runs gopls and makes no file changes, renames run as dry runs

This is third-party code. Review the repository files before installing.

What it does

gopls-mcp is a fork of gopls that gives the agent type-checker-level code analysis instead of text search. It handles the Go type system: which types implement an interface, where identical types from different packages match and which variables shadow each other. The MCP registry lists the tools go_definition for jumping to a definition, go_implementation for finding interface implementations, go_symbol_references for all uses of a symbol, go_get_call_hierarchy for the call hierarchy, go_get_dependency_graph for package dependencies, go_dryrun_rename_symbol for a trial rename and go_list_tools for the capability list. The author gives a benchmark of 11 tasks: on semantic tasks such as interface implementations, call hierarchy and dependency mapping the server uses 2 to 4 times fewer tool calls and runs faster than grep-based navigation. For simple same-file lookups bash and grep remain just as good.

Who it is for. Go developers who need an agent for navigation and refactoring in large codebases where types and interfaces matter.

Good fit when

  • You need to find all types implementing an interface across all packages of a module
  • Before a refactor you want to trace the call hierarchy of a function
  • You want to see a dependency map between project packages
  • A symbol rename should first be checked with a dry run through go_dryrun_rename_symbol
  • In a large repository the agent spends many calls on grep and errs on shadowed names

Not a fit when

  • The project is not Go: the server parses only Go code through gopls
  • You need a search in one file: bash and grep do just as well with less overhead
  • You need a tool approved by the Go team: this is a community project with no official status

Example request

Find all types in the module that implement the Store interface and show the call hierarchy of the Save method.

MCP

Transport
stdio
Authentication
not required

Limitations

This is a community project not affiliated with or endorsed by the Go team or Google. The license is BSD-3-Clause, like gopls. Installation uses a Claude Code or Codex plugin or the install.sh script by a curl link, which is worth reading before running. Building from source needs Go 1.26. Details of the tools and client setup live on gopls-mcp.org, and the README briefly covers the idea and installation. The registry version is 1.0.9, the project develops actively and may change.

How to disable. For the Claude Code plugin run /plugin uninstall gopls-mcp, and for Codex remove the plugin with codex plugin remove gopls-mcp. Delete the gopls-mcp binary from the directory where the install script put it.

FAQ

Why is it better than grep?

The server understands the Go type system: interface implementations, type identity across packages and shadowed scopes. In the author benchmark of 11 tasks it makes 2 to 4 times fewer calls on semantic tasks.

How do I install it in Claude Code?

With /plugin marketplace add https://github.com/xieyuschen/gopls-mcp.git and /plugin install gopls-mcp. The plugin installs the binary and adds a routing skill itself.

Is Codex supported?

Yes, with codex plugin marketplace add https://github.com/xieyuschen/gopls-mcp.git and codex plugin add gopls-mcp. Other clients have a manual install and a guide on the project site.

Is it an official Go team product?

No. The README states it is a community project and a fork of gopls, not affiliated with or endorsed by Google.

What is the license?

BSD-3-Clause, the same as the upstream gopls.

Discussion

No questions or reviews yet.

Local static analysis for Go with an MCP server: call graphs, change impact, symbol search and review before and after edits

MCP serverMinimal access231Repository stars

A bridge from an LSP language server to the agent: definitions, references, diagnostics, hover and symbol rename

MCP serverExtended access1.6KRepository stars

Semantic code search and call graphs for agents, fully local. MCP mode connects the search to Claude Code and Cursor

CLIMinimal access2KRepository stars

The agent-lsp MCP server orchestrates language servers into agent workflows: callers, safe edits, renames and diagnostics.

MCP serverBroad access178Repository stars

A code knowledge graph for your agent: callers, dependents and blast radius over MCP instead of reading files

MCP serverExtended access222Repository stars

An MCP server that builds a code graph of functions, classes, calls and routes and answers the agent's structural queries locally

MCP serverExtended access48.5KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
gopls-mcp: semantic Go analysis for agents (this card)nonot required60
agent-lspnonot required178a general LSP bridge across languages, without Go specialization
Serenanonot required31,335semantic code search across several languages through LSP

README in short

The README briefly states the idea of semantic analysis instead of text search, points to a benchmark, shows plugin installation for Claude Code and Codex, manual installation for Linux, macOS and Windows and a note on the project status.

README badge

Report a problem