Go Playground MCP 服务器是一个集成了 Go Playground API 的模型上下文协议(MCP)服务器,可用于执行 Go 代码并生成可共享的 URL。
此服务器可与任何兼容 MCP 的客户端配合使用。服务器提供了三种工具:
run_go_code - 执行 Go 代码并返回结果share_go_code - 共享 Go 代码并获取一个 URLrun_and_share_go_code - 执行代码并同时获取结果和共享 URL将以下内容添加到您的 MCP 客户端配置中:
{
"mcpServers": {
"go-playground": {
"command": "npx",
"args": ["-y", "go-playground-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"]
}
}
}
不要犹豫哦 ;)
如果这个项目对您有帮助,请给它一个 ⭐️!
版权所有 © 2025 Samuel Berthe。
本项目采用 MIT 许可证。