MCP.so
登录
G

Gopls Go Language Server

@Yantrio

关于 Gopls Go Language Server

暂无概览

基本信息

分类

其他

传输方式

stdio

发布者

Yantrio

提交者

James Humphries

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-gopls": {
      "command": "mcp-gopls",
      "args": [
        "-workspace",
        "/path/to/your/go/project"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Gopls Go Language Server?

Gopls Go Language Server is an MCP (Model Context Protocol) server that wraps the official Go language server, gopls, to expose its features through MCP. It is intended for developers who want to interact with Go code using MCP clients such as Claude Code or Claude Desktop.

How to use Gopls Go Language Server?

Install it with go install github.com/yantrio/mcp-gopls/cmd/mcp-gopls@latest, then add it to an MCP client. For Claude Code, run claude mcp add mcp-gopls "$(which mcp-gopls)". For Claude Desktop, add the executable to claude_desktop_config.json under mcpServers. Launch the server with mcp-gopls; you can optionally specify a gopls binary path and workspace directory via flags or environment variables.

Key features of Gopls Go Language Server

  • Navigate to symbol definitions
  • Find all references to a symbol
  • Get compile errors and static analysis diagnostics
  • Rename symbols with direct file changes
  • Search symbols across the workspace
  • Format code according to gofmt standards

Use cases of Gopls Go Language Server

  • Explore and navigate large Go codebases through an MCP client
  • Refactor code by renaming symbols across the workspace
  • Identify compilation errors and lint warnings without leaving the chat interface
  • Quickly locate definitions and references of a function or type
  • Automatically format and organize imports in Go source files

FAQ from Gopls Go Language Server

What are the runtime requirements?

Go 1.24.3 or later and the official gopls language server are required. Install gopls with go install golang.org/x/tools/gopls@latest.

How do I specify a custom workspace or gopls path?

Use the -workspace and -gopls flags, or set the environment variables MCP_GOPLS_WORKSPACE and GOPLS_PATH respectively.

What transport protocol does this server use?

The README only describes command-line invocation; this is consistent with an MCP server using stdio transport. No other transports are mentioned.

Is the code safe for production use?

The README includes a strong warning that the entire project was generated by AI without human code review. It advises extreme caution in production environments and notes that security, performance, and edge cases have not been audited.

评论

其他 分类下的更多 MCP 服务器