MCP Catalogs
首页

go-playground-mcp

by samber·5·综合分 40

一个可以在 Go Playground 中执行 Go 代码并生成可分享链接的 MCP 服务器。

developer-toolsai-llmother
3
Forks
12
活跃 Issue
本月
最近提交
2 天前
收录于

概述

这个 go-playground-mcp 服务器提供了五个与 Go Playground API 交互的工具,使 AI 模型能够执行 Go 代码、生成可分享链接,以及从现有的 playground 链接读取代码。它使用 TypeScript 编写,遵循 MCP 协议标准,可与各种 MCP 客户端兼容。该服务器支持代码执行和分享操作,还能直接从现有的 Go Playground URL 读取或执行代码。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:需要执行 Go 代码的 AI 助手用于代码示例或调试
:学习 Go 编程语言的教育工具
:需要包含可执行 Go 代码示例的文档系统
:支持哪些 Go Playground URL 格式?
:这个服务器在安全的环境中执行代码吗?

什么时候选它

当您需要在沙盒环境中执行 Go 代码或为 Go 代码片段生成可分享链接时,选择这个 MCP 服务器。

什么时候不要选它

如果您需要执行其他编程语言的代码或需要持久化代码存储(而不仅仅是临时的游乐场环境),则应避免使用此服务器。

此 server 暴露的工具

从 README 抽取出 5 个工具
  • run_go_code

    Execute Go code in the Go Playground sandbox

  • share_go_code

    Share Go code and get a shareable URL

  • run_and_share_go_code

    Execute Go code and get both results and a shareable URL

  • read_go_playground_url

    Read Go code from an existing Go Playground URL

  • execute_go_playground_url

    Execute Go code from an existing Go Playground URL

可对比工具

shell-mcpreplit-mcpcode-executor-mcp

安装

通过 npm 安装:npm install -g go-playground-mcp

对于 Claude Desktop,添加到 config.json

{
  "mcpServers": {
    "go-playground": {
      "command": "npx",
      "args": ["-y", "go-playground-mcp"]
    }
  }
}

FAQ

支持哪些 Go Playground URL 格式?
服务器支持 https://go.dev/play/<snippet-id>、https://go.dev/play/p/<snippet-id> 和 https://play.golang.org/p/<snippet-id> 格式。
这个服务器在安全的环境中执行代码吗?
是的,它使用 Go Playground 沙盒环境来执行代码。

go-playground-mcp 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。