M

mcp-goplsmcp-gopls MCP.server

(0)
Daniel Nikulshyn审阅者 Daniel Nikulshyn·更新 2026年7月

概览

mcp-gopls 是一个 Model Context Protocol (MCP) 服务器,帮助 AI 助手利用由 gopls 提供的 Go 语言服务器协议(LSP)功能。它允许 Claude、Cursor、Copilot 等 AI 工具在 Go 代码上执行多种操作,如导航、诊断、测试和代码分析。服务器充当中介,将 MCP 请求转换为 gopls 能理解的 LSP 命令,然后将结果返回给 AI 助手,从而实现跳转到定义、引用、悬停信息、补全、代码格式化和测试等功能。该项目正在积极开发,支持 Go 1.25.x,并已在最新的 gopls 上测试。它提供可配置的运行时设置、结构化日志记录以及扩展的 LSP 功能。虽然内置的 gopls MCP 服务器具备一定功能,但 mcp-gopls 为在 Go 代码中工作的 AI 助手提供了更全面的特性。 mcp-gopls 对那些希望在产品中集成 Go 语言支持的 AI 助手开发者特别有用。使用 mcp-gopls,开发者可以为用户提供更丰富的功能,从而提升整体的开发体验。 mcp-gopls 的架构依赖于 mark3labs/mcp-go 库实现 MCP,并通过 LSP 与 gopls 通讯。该设计实现了 AI 助手与 Go 开发工具之间的无缝交互。 mcp-gopls 的一大优势是它相比 gopls 内置的 MCP 服务器,能够向 AI 助手公开更广泛的 LSP 功能。这包括高级代码分析和测试功能。 然而,像任何活跃开发的项目一样,一些功能仍在发展中,用户应做好可能的更新和路线图变更的准备。 该项目是开源的,已在 GitHub 上提供,鼓励社区参与和贡献。 mcp-gopls 还提供长时间运行命令的进度流传输,允许客户端向用户展示状态更新。 与内置 gopls MCP 服务器的对比突出了 mcp-gopls 提供的额外功能,使其成为提升 AI 辅助 Go 开发的有价值工具。

主要功能

  • 导航
  • 诊断
  • 测试
  • 代码分析
  • go-to-definition
  • references
  • hover 信息
  • completion
  • 代码格式化
  • testing

价格

模型
Free
评分
暂无评价

使用场景

基于 AI 的 Go 开发辅助

为 AI 工具如 Claude、Cursor 和 Copilot 提供 Go 代码的复杂操作,增强开发体验。

Go 代码分析

为 AI 助手提供详细的代码分析、诊断和测试能力,促进代码理解和优化。

优点 & 缺点

优点

  • 提供给 AI 助手的 LSP 功能的综合解决方案
  • 支持高级 Go 发展操作
  • 积极开发,具有社区积极参与
  • 提供可配置的运行时设置和结构化日志
  • 提供用于 Go 代码分析的进度流流
  • cons
  • :
  • 依赖于 gopls 和 LSP,它们可能会有自己的限制,作为一个开源项目,有些功能可能还在演化中,useCases,:,[object Object],[object Object]

缺点

  • 依赖于 gopls 和 LSP,可能会受到其自身限制
  • 作为一个开源项目,某些功能可能仍在演进中

评测

登录以留下评测。

暂无评测。来当第一个吧!

问答

What are the limitations of mcp-gopls?

It is dependent on gopls and LSP, which may have their own limitations, and as an open-source project, some features might still be evolving.

Asked by Larisa Ionescu · Aug 10, 2025

Is mcp-gopls actively developed?

Yes, the project is actively developed and supports Go 1.25.x, with testing done using the latest gopls.

Asked by Mia Andersen · Jul 11, 2025

What features does it support?

It supports features like go-to-definition, references, hover information, completion, code formatting, and testing.

Asked by Fernando Rojas · Jul 7, 2025

What is mcp-gopls?

mcp-gopls is a Model Context Protocol (MCP) server that enables AI assistants to leverage Go's Language Server Protocol (LSP) capabilities.

Asked by Greta Nowak · Jun 7, 2025

提问

服务配缩器 的替代品