Go Playground

Go Playground

samber

Execute Go code remotely using the official Go Playground API and share code snippets with public URLs.

Enables remote execution of Go code using the official Go Playground API with tools for running code with optional vet checking, sharing snippets via public URLs, and combining execution with sharing for immediate testing and distribution.

5256 views3Local (stdio)

What it does

  • Execute Go code in sandbox environment
  • Generate shareable URLs for Go snippets
  • Read code from existing Go Playground URLs
  • Run code with optional vet checking
  • Combine execution and sharing in single operation

Best for

Go developers testing code snippetsSharing Go examples with colleaguesCode review and collaborationLearning and experimenting with Go
Uses official Go Playground APINo API key requiredZero setup via npx

About Go Playground

Go Playground is a community-built MCP server published by samber that provides AI assistants with tools and capabilities via the Model Context Protocol. Run and share Go code instantly with Go Playground. Features include code execution, vet checking, and public URLs for e It is categorized under developer tools. This server exposes 5 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Go Playground in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Go Playground is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (5)

run_go_code

Run Go code in the Go Playground and return execution results

share_go_code

Share Go code and get a shareable URL

run_and_share_go_code

Run Go code and get both execution 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

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.

tag Build Status Coverage npm License

🧙 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:

  1. run_go_code - Execute Go code and return results
  2. share_go_code - Share Go code and get a URL
  3. run_and_share_go_code - Execute code and get both results and share URL
  4. read_go_playground_url - Read Go code from an existing Go Playground URL
  5. execute_go_playground_url - Execute Go code from an existing Go Playground URL

Add this to your MCP client configuration:

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

Examples

Reading code from a Go Playground URL

// Read code from https://go.dev/play/xyz123
const result = await mcpClient.callTool("read_go_playground_url", {
  url: "https://go.dev/play/xyz123"
});

Executing code from a Go Playground URL

// Execute code from https://go.dev/play/xyz123
const result = await mcpClient.callTool("execute_go_playground_url", {
  url: "https://go.dev/play/xyz123",
  withVet: true
});

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

Don't hesitate ;)

Install

  1. Clone this repository:
git clone https://github.com/samber/go-playground-mcp.git
cd go-playground-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Running the Server

# Development mode
npm run dev

# Production mode
npm run build
npm start

Add this to your MCP client configuration:

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

👤 Contributors

Contributors

💫 Show your support

Give a ⭐️ if this project helped you!

GitHub Sponsors

📝 License

Copyright © 2025 Samuel Berthe.

This project is MIT licensed.

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

6
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

2
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

0
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

0
ydc-ai-sdk-integration

Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.

0
mcp-developer

Use when building MCP servers or clients that connect AI systems with external tools and data sources. Invoke for MCP protocol compliance, TypeScript/Python SDKs, resource providers, tool functions.

0