MCP Gopls
MCP Gopls is an MCP server that lets AI assistants use Go’s LSP (gopls) for navigation, diagnostics, testing, coverage, and more. It has 104 GitHub stars, is released under the Apache-2.0 license and runs locally with docker run -i --rm -e MCP_GOPLS_LOG_LEVEL ghcr.io/hloiseau/mcp-gopls.
github.com/hloiseau/mcp-gopls (opens in a new tab)
Data as of from the GitHub API; description from the project's repository. Report an error
Install MCP Gopls
Generated from the server's published package. Replace your-value with your own values.
Claude Desktop
{
"mcpServers": {
"mcp-gopls": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_GOPLS_LOG_LEVEL",
"ghcr.io/hloiseau/mcp-gopls"
],
"env": {
"MCP_GOPLS_LOG_LEVEL": "your-value"
}
}
}
}Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.
Claude Code
claude mcp add --env MCP_GOPLS_LOG_LEVEL=your-value --transport stdio mcp-gopls -- docker run -i --rm -e MCP_GOPLS_LOG_LEVEL ghcr.io/hloiseau/mcp-goplsCursor
{
"mcpServers": {
"mcp-gopls": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_GOPLS_LOG_LEVEL",
"ghcr.io/hloiseau/mcp-gopls"
],
"env": {
"MCP_GOPLS_LOG_LEVEL": "your-value"
}
}
}
}Project file; use ~/.cursor/mcp.json to enable it in every project.
VS Code
{
"servers": {
"mcp-gopls": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MCP_GOPLS_LOG_LEVEL",
"ghcr.io/hloiseau/mcp-gopls"
],
"env": {
"MCP_GOPLS_LOG_LEVEL": "your-value"
}
}
}
}Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).
Environment variables
Variables the server reads at startup.
| Name | Required | Description |
|---|---|---|
MCP_GOPLS_LOG_LEVEL | No | Shown in the README's example configuration. |
Tools (14)
Parsed from the Tools section of the README; check the repository for the current list.
go_to_definitionNavigate to the definition of a symbol
find_referencesList all references for a symbol
check_diagnosticsFetch cached diagnostics for a file
get_hover_infoReturn hover markdown for a symbol
get_completionReturn completion labels at a position
format_documentReturn formatting edits for an entire document
rename_symbolReturn workspace edits for a rename
list_code_actionsList available code actions for a range
search_workspace_symbolsSearch workspace-wide symbols
analyze_coverageRun go test with coverage + optional per-function report
run_go_testExecute go test for a package/pattern
run_go_mod_tidyExecute go mod tidy
run_govulncheckExecute govulncheck ./...
module_graphReturn go mod graph output
About MCP Gopls
A Model Context Protocol (MCP) server that lets AI assistants use Go’s LSP (gopls) for navigation, diagnostics, testing, coverage, and more.
- ai-agents
- ai-tools
- developer-tools
- go
- golang
- gopls
- lsp
- mcp
- model-context-protocol
Similar MCP servers
More developer tools MCP servers
Atlassian Dc MCP Bitbucket
b1ff/atlassian-dc-mcp
MCP server for Atlassian Bitbucket Data Center - interact with repositories and code.
Active · last commit Oct 12, 2026
Developer toolsTypeScriptstalemap
Umair/stalemap
Tells coding agents which npm dependencies changed after their training cutoff, and what changed.
Too new to judge · created Oct 19, 2026
Developer toolsTypeScriptreevesagents
mertkayacs/reevesagents
Spawn, read and steer AI coding CLIs (Claude Code, Codex, Kimi and more) in local tmux windows.
Active · last commit Oct 25, 2026
Developer toolsTypeScriptCynicalsally
w1ckedxt/cynical-sally
Brutally honest code reviews: scores, real issues, and usable fixes.
Maintained · last commit Jul 4, 2026
Developer toolsTypeScriptPlaceCall
voygr-tech/placecall
Real phone calls to US businesses: book, ask, get quotes.
Active · last commit Oct 26, 2026
Developer toolsShellWTFM
SupportPages-io/wtfm
Your coding agent writes the user docs from your codebase, screenshots included.
Too new to judge · created Sep 25, 2026
OfficialDeveloper toolsJavaScript
How do I install the MCP Gopls MCP server?
Add the command docker run -i --rm -e MCP_GOPLS_LOG_LEVEL ghcr.io/hloiseau/mcp-gopls to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.
Is MCP Gopls free?
The server is open source under the Apache-2.0 license, so running it is free. It does not declare any required API key.
Is MCP Gopls actively maintained?
The most recent commit was on Jun 22, 2026. The latest release is v2.1.0, published Jun 22, 2026. appsgit only lists MCP servers with a commit in the last six months.