Go Language Server
A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.
What is Go Language Server?
Go Language Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that allows ai assistants like claude to interact with go's language server protocol (lsp) and benefit from advanced go code analysis features.
A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol (MCP) server that allows AI assista
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-goplsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Go Language Server
mcp-gopls is an MCP server that bridges AI assistants like Claude to Go's official language server, gopls, enabling advanced Go code analysis directly from a chat interface. It exposes 14 tools covering navigation (go-to-definition, find-references, hover), diagnostics, formatting, symbol search, test execution with coverage, module tidying, vulnerability checking, and dependency graphing. Developers use it to let Claude understand large Go codebases, find usages of a symbol across packages, and run `govulncheck` without leaving their MCP client.
Prerequisites
- Go 1.25 or later installed and on your PATH
- gopls installed (`go install golang.org/x/tools/gopls@latest`)
- Optional: govulncheck installed for vulnerability scanning (`go install golang.org/x/vuln/cmd/govulncheck@latest`)
- An MCP client such as Claude Desktop, Cursor, or GitHub Copilot Agent Mode
- A Go workspace/project directory to analyze
Install gopls
Install Go's official language server if it is not already present. This is a required dependency for mcp-gopls.
go install golang.org/x/tools/gopls@latestInstall mcp-gopls
Install the mcp-gopls binary using Go's package manager. The binary will be placed in your GOPATH/bin.
go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latestVerify installation
Confirm the binary is accessible and review available flags before configuring your MCP client.
mcp-gopls --helpConfigure your MCP client
Add the server to your `claude_desktop_config.json`, setting `--workspace` to the root of the Go project you want to analyze. Use the `MCP_GOPLS_WORKSPACE` environment variable as an alternative.
Restart your MCP client and start analyzing Go code
After restarting, Claude can use tools like `go-to-definition`, `find-references`, and `get-diagnostics` against your Go workspace.
Go Language Server Examples
Client configuration
Add this to `claude_desktop_config.json` to connect Claude Desktop to your Go project. Adjust `--workspace` to the absolute path of your project.
{
"mcpServers": {
"mcp-gopls": {
"command": "mcp-gopls",
"args": ["--workspace", "/path/to/your/go/project"],
"env": {
"MCP_GOPLS_LOG_LEVEL": "info",
"MCP_GOPLS_RPC_TIMEOUT": "30s"
}
}
}
}Prompts to try
Use these prompts to navigate and analyze your Go codebase through Claude.
- "Find all references to the function `ProcessOrder` in this Go project."
- "Show me the definition of the `UserRepository` interface."
- "Run diagnostics on the entire workspace and list any errors or warnings."
- "Check this module for known vulnerabilities using govulncheck."
- "Rename the `OldHandler` function to `NewHandler` across the codebase."Troubleshooting Go Language Server
mcp-gopls fails to start with 'gopls not found'
Ensure gopls is installed and on your PATH: `go install golang.org/x/tools/gopls@latest`. Use `--gopls-path /absolute/path/to/gopls` in the args if it is installed in a non-standard location.
Tools time out for large codebases
Increase the RPC timeout by setting `MCP_GOPLS_RPC_TIMEOUT=60s` in the env block of your MCP config, or passing `--rpc-timeout 60s` in args.
No results from find-references or go-to-definition
Verify the `--workspace` path is the module root (contains `go.mod`). Run `gopls version` and `go build ./...` in that directory to confirm the project compiles and gopls can index it.
Frequently Asked Questions about Go Language Server
What is Go Language Server?
Go Language Server is a Model Context Protocol (MCP) server that model context protocol (mcp) server that allows ai assistants like claude to interact with go's language server protocol (lsp) and benefit from advanced go code analysis features. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Go Language Server?
Follow the installation instructions on the Go Language Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Go Language Server?
Go Language Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Go Language Server free to use?
Yes, Go Language Server is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
Go Language Server Alternatives — Similar Developer Tools Servers
Looking for alternatives to Go Language Server? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Go Language Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Go Language Server?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.