gopls-mcp MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add gopls-mcp -- npx -y @xieyuschen/gopls-mcp
README.md

Give your AI Agent the compiler's brain, not a text searcher.

gopls-mcp

Give your AI Agent the compiler's brain, not a text searcher.

Documentation: https://gopls-mcp.org.

gopls-mcp delivers lightning-fast, language-level analysis directly to your LLM. Unlike standard retrieval tools that flood the context window with irrelevant text, this tool performs surgical code navigation.

By providing only the scientifically accurate definitions and references, it maximizes your model's attention span and keeps the reasoning chain pure. Zero noise, absolute structural accuracy, and instant response times.

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 specfic 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.

Tools (1)

gopls_analysisPerforms language-level code analysis and navigation for Go projects.

Configuration

claude_desktop_config.json
{"mcpServers": {"gopls": {"command": "npx", "args": ["-y", "@xieyuschen/gopls-mcp"]}}}

Try it

Find all references to the 'User' struct in my Go project.
Explain the implementation of the 'ProcessRequest' function in main.go.
Identify where the 'Database' interface is defined and implemented.
List all function signatures in the current package.

Frequently Asked Questions

What are the key features of gopls-mcp?

Language-level code analysis for Go. Surgical code navigation instead of text search. Provides scientifically accurate definitions and references. Optimized for LLM context window efficiency.

What can I use gopls-mcp for?

Refactoring complex Go codebases with AI assistance. Debugging Go applications by tracing function calls and definitions. Generating documentation for Go packages based on actual code structure.

How do I install gopls-mcp?

Install gopls-mcp by running: npx -y @xieyuschen/gopls-mcp

What MCP clients work with gopls-mcp?

gopls-mcp works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep gopls-mcp docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare