Go Playground Mcp

Go Playground Mcp

🚀 Go Playground MCP 服务器

Go Playground MCP 服务器是一个集成了 Go Playground API 的模型上下文协议(MCP)服务器,可用于执行 Go 代码并生成可共享的 URL。

tag Build Status Coverage npm

🚀 快速开始

此服务器可与任何兼容 MCP 的客户端配合使用。服务器提供了三种工具:

  1. run_go_code - 执行 Go 代码并返回结果
  2. share_go_code - 共享 Go 代码并获取一个 URL
  3. run_and_share_go_code - 执行代码并同时获取结果和共享 URL

将以下内容添加到您的 MCP 客户端配置中:

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

✨ 主要特性

  • 运行 Go 代码:在 Go Playground 沙箱中执行 Go 代码。
  • 共享代码:为 Go 代码片段生成可共享的 URL。
  • 运行并共享:在一次操作中执行代码并获取结果和共享 URL。
  • MCP 集成:完全符合模型上下文协议。

📦 安装指南

克隆仓库

git clone https://github.com/samber/go-playground-mcp.git
cd go-playground-mcp

安装依赖

npm install

构建项目

npm run build

运行服务器

# 开发模式
npm run dev

# 生产模式
npm run build
npm start

将以下内容添加到您的 MCP 客户端配置中:

{
"mcpServers": {
"go-playground": {
"command": "node",
"args": ["dist/index.js"]
}
}
}

🤝 贡献代码

不要犹豫哦 ;)

👤 贡献者

Contributors

💫 支持项目

如果这个项目对您有帮助,请给它一个 ⭐️!

GitHub Sponsors

📄 许可证

版权所有 © 2025 Samuel Berthe

本项目采用 MIT 许可证。

  • 0 关注
  • 0 收藏,23 浏览
  • system 提出于 2025-10-02 17:12

相似服务问题

相关AI产品