MCP LSP Go

MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls, for advanced code intelligence and analysis. Developed for Go software engineers using tools like Cursor, Claude Desktop, and GitHub Copilot, it bridges large language models directly to workspace tools and language analysis features. By serving as an intermediary between Model Context Protocol clients and gopls, the server enables assistants to run definitions navigation, symbol references, document hover queries, code completions, formatting, and workspace-wide symbol lookups without manual copy-pasting. Beyond standard language server protocol functions, it also incorporates native Go CLI tooling directly into the model context. Assistants can execute Go unit tests, generate structured code coverage breakdowns, organize imports with module tidy operations, check dependencies via module graph inspection, and perform security vulnerability scans through govulncheck. It also exposes standard MCP workspace resources and structured analysis prompts, letting developers orchestrate code refactoring and diagnostics evaluation natively within AI chat sessions.

Category: Developer Tools & Code Intelligence

Tags: code analysis, go, golang, language-server, lsp

Visit MCP LSP Go

How to install and configure MCP LSP Go

  1. Install the server binary using the Go toolchain: bash go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latest 2. Verify that the binary is available on your system PATH by running mcp-gopls --help. 3. To configure Claude Desktop, open claude_desktop_config.json and add the server definition under mcpServers: json { "mcpServers": { "mcp-gopls": { "command": "mcp-gopls", "args": ["--workspace", "/absolute/path/to/your/go/project"] } } } 4. For Cursor IDE, navigate to Settings -> MCP Servers -> Edit JSON and insert the identical mcp-gopls configuration block, then run the command Developer: Reload Window to enable the server.

What you can do with MCP LSP Go

  • Resolving symbol definitions and references across large Go projects during AI-assisted code walkthroughs and debugging. - Running automated test suites and parsing structured code coverage reports directly inside AI development interfaces. - Performing refactoring tasks, such as symbol renaming and document formatting, using language server protocol actions. - Auditing project dependencies for known security vulnerabilities by executing govulncheck from assistant prompts.

Key facts

  • https://github.com/hloiseaufcms/mcp-gopls
  • Developer Tools & Code Intelligence
  • code analysis, go, golang, language-server, lsp

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab — MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…
  • MCP Neurolora — MCP Neurolora is an MCP server that provides code analysis, code collection, and automated documentation generation using the OpenAI API.…

How do I install MCP LSP Go?

You can install MCP LSP Go using the standard Go CLI by running go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latest. Alternatively, you can run the official Docker container image ghcr.io/hloiseau/mcp-gopls:latest mounted to your local project directory.

What can MCP LSP Go do?

MCP LSP Go provides code navigation including go-to-definition, reference finding, hover details, and symbol search. It also executes formatting, symbol renaming, code actions, Go test execution, coverage analysis, dependency audits with go mod tidy, and vulnerability scanning with govulncheck.

Which MCP clients work with MCP LSP Go?

MCP LSP Go works with any standard Model Context Protocol client over standard input and output. It has documented configuration support for Cursor, Claude Desktop, and GitHub Copilot Agent Mode in Visual Studio Code.

Is MCP LSP Go open source?

Yes, MCP LSP Go is open source software published under the Apache 2.0 license. The source code, issue tracking, and container configuration files are publicly available on GitHub.

How does MCP LSP Go compare to the built-in gopls MCP?

While the built-in gopls MCP focuses on read-only diagnostics and workspace metadata, MCP LSP Go adds tools for definition navigation, document formatting, code completion, running go test suites, calculating test coverage, and managing Go module graphs.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories