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

VerifiedSTDIODesktop onlyDeveloper Tools

Overview

AI-generated 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.
Before you install
The README's manual install instructions pipe a remote install script directly into a shell, which runs third-party code on your machine; the plugin route is described as the recommended alternative. The server reads your Go source and sends analysis results to the assistant, so treat code in the workspace as visible to the model.

Installation

In SourceWeft

  1. Open Gopls Mcp in the dashboard and add it to a workspace.
  2. 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)

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

The plugin automatically installs the binary and injects the routing skill — no manual setup required.

Codex (plugin — recommended)

bash
codex plugin marketplace add https://github.com/xieyuschen/gopls-mcp.gitcodex plugin add gopls-mcp

Manual install (all clients)

Linux / macOS:

bash
curl -sSL https://gopls-mcp.org/install.sh | bash

Windows (PowerShell):

powershell
irm https://gopls-mcp.org/install.ps1 | iex

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

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  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