This MCP server integrates with the Go Playground API to execute, share, and manage Go code snippets.
Core Capabilities:
Execute Go code - Run Go code in the Go Playground sandbox with optional
go vetstatic analysis (enabled by default)Share code snippets - Generate persistent, shareable Go Playground URLs
Execute and share simultaneously - Run code and get both execution results and a shareable URL in one operation
Read from URLs - Extract Go code from existing Go Playground URLs
Execute from URLs - Run Go code directly from existing Go Playground URLs
Multiple URL format support - Works with go.dev/play/, go.dev/play/p/, and play.golang.org/p/ URLs
MCP protocol compliance - Seamless integration with Model Context Protocol clients
Go Playground MCP Server
A Model Context Protocol (MCP) server that integrates with the Go Playground API to execute Go code and generate shareable URLs.
🧙 Features
Run Go Code: Execute Go code in the Go Playground sandbox
Share Code: Generate shareable URLs for Go code snippets
Run and Share: Execute code and get both results and share URL in one operation
Read from URL: Read Go code from existing Go Playground URLs
Execute from URL: Execute Go code from existing Go Playground URLs
MCP Integration: Full Model Context Protocol compliance
🏃♂️ Usage
The server can be used with any MCP-compatible client. The server provides five tools:
run_go_code- Execute Go code and return resultsshare_go_code- Share Go code and get a URLrun_and_share_go_code- Execute code and get both results and share URLread_go_playground_url- Read Go code from an existing Go Playground URLexecute_go_playground_url- Execute Go code from an existing Go Playground URL
Add this to your MCP client configuration:
Examples
Reading code from a Go Playground URL
Executing code from a Go Playground URL
URL Formats Supported
The new URL-based tools support these Go Playground URL formats:
https://go.dev/play/<snippet-id>https://go.dev/play/p/<snippet-id>https://play.golang.org/p/<snippet-id>
🤝 Contributing
Ping me on Twitter @samuelberthe (DMs, mentions, whatever :))
Fork the project
Fix open issues or request new features
Don't hesitate ;)
Install
Clone this repository:
Install dependencies:
Build the project:
Running the Server
Add this to your MCP client configuration:
👤 Contributors
💫 Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2025 Samuel Berthe.
This project is MIT licensed.
Related MCP Servers
- Asecurity-licenseAqualityCreate sandboxed local development environments directly from Github and execute tests, see coverage and more! Supports Python, Node, Bun and many test runners.Last updated -426
- -securityFlicense-qualityProvides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.Last updated -13
- AsecurityAlicenseAqualityFacilitates searching and accessing programming resources across platforms like Stack Overflow, MDN, GitHub, npm, and PyPI, aiding LLMs in finding code examples and documentation.Last updated -641AGPL 3.0
- -securityFlicense-qualityProvides code generation and completion capabilities using the DeepSeek API, with support for tool chaining and cost optimization.Last updated -4