Go Playground logo

Go Playground

Community
samber

🤹 A MCP server to execute Go code in Go Playground and generate shareable URLs

Publishersamber
Repositorygo-playground-mcp
LanguageTypeScript
Forks
3
Stars
6
Available tools
5
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Go Playground exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 5 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    6 stars and 3 forks from the linked repository.

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:

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

Examples

Reading code from a Go Playground URL

typescript
// 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

typescript
// 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:
bash
git clone https://github.com/samber/go-playground-mcp.git
cd go-playground-mcp
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Running the Server

bash
# Development mode
npm run dev

# Production mode
npm run build
npm start

Add this to your MCP client configuration:

json
{
  "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.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • 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

Use Go Playground MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Go Playground is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Go Playground as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Go Playground MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "go-playground": {
      "command": "npx",
      "args": [
        "-y",
        "go-playground-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Go Playground MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Go Playground MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Go Playground to help me with this task?
Go Playground
Sure. I read it.
Here is what I found using Go Playground.

Frequently asked questions

What is the Go Playground MCP server used for?

Go Playground is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Go Playground MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Go Playground with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Go Playground MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Go Playground connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Go Playground MCP to TypingMind?

Go Playground runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Go Playground MCP provide in TypingMind?

Go Playground exposes 5 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Go Playground MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Go Playground requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇