Feedback

Basic information

Runtime
go
Category
License
Apache-2.0
Transports
stdio
Author
hloiseaufcms
Submitted by
Community
Quality
40
Stars
93

About MCP LSP Go Server

Model Context Protocol (MCP) server for Go using gopls – LSP-powered analysis, tests, coverage, and tooling.

MCP LSP Go is a MCP server in the Other category listed in the AddMCP.net directory, published by hloiseaufcms. Supported transport: stdio. Runtime: go. License: Apache-2.0. The repository has 93 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "mcp-gopls": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "\\"
            ]
        }
    }
}

MCP LSP Go config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mcp-gopls": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "\\"
            ]
        }
    }
}

MCP LSP Go tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MCP LSP Go?

An MCP server that bridges AI assistants (Claude, Cursor, Copilot) with Go’s language server (gopls) to provide navigation, diagnostics, testing, coverage, and code tooling capabilities via the Model Context Protocol.

How to use MCP LSP Go?

Install with go install github.com/hloiseau/mcp-gopls/v2/cmd/mcp-gopls@latest, then configure your AI client (Cursor, Claude Desktop, GitHub Copilot) to run mcp-gopls --workspace /absolute/path/to/your/go/project. A Docker image is also available for containerized setups.

Key features of MCP LSP Go

  • Configurable runtime via flags and environment variables
  • Structured logging with text or JSON output
  • Full LSP surface: navigation, diagnostics, formatting, rename, code actions
  • Go tooling helpers: test, coverage, mod tidy, vulncheck, module graph
  • Extra MCP resources and prompts for diagnostics and refactoring
  • Progress streaming for long-running operations

Use cases of MCP LSP Go

  • Navigate to symbol definitions and find references across a workspace
  • Run Go tests and analyze code coverage with per-function stats
  • Fetch diagnostics, hover information, and code completions for any file
  • Execute code formatting, renaming, and list available code actions
  • Inspect module dependencies and run vulnerability checks

Frequently asked questions

1 How does MCP LSP Go differ from the built-in gopls MCP server?

MCP LSP Go offers a richer tool set: go-to-definition, hover, completion, formatting, code actions, go test, coverage, mod tidy, and module graph—features absent from the built-in gopls MCP. The built-in server is sufficient for read-only tools like diagnostics and symbol search.

2 What are the runtime requirements?

The server is written in Go and tested with Go 1.25.x and gopls@latest. It runs as a stdio-based MCP server and can be configured via command-line flags or the MCP_GOPLS_* environment variables.

3 Does it support progress streaming?

Yes. Long-running commands emit notifications/progress events so clients can surface status updates to the user.

4 Can I use MCP LSP Go with Docker?

Yes. An official Docker image is available at ghcr.io/hloiseau/mcp-gopls:latest. You can mount your Go project as a volume and run --workspace /workspace.

5 How is the server configured for different AI clients?

The binary and arguments are identical across clients: mcp-gopls --workspace /path/to/project. Each client (Cursor, Claude Desktop, GitHub Copilot) uses a slightly different JSON configuration file to define the server’

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬