Go Playground MCP Server
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
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Go Playground MCP Serverrun this Go code and share the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: godoc-mcp
πββοΈ 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:
{
"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
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:
git clone https://github.com/samber/go-playground-mcp.git
cd go-playground-mcpInstall dependencies:
npm installBuild the project:
npm run buildRunning the Server
# Development mode
npm run dev
# Production mode
npm run build
npm startAdd this to your MCP client configuration:
{
"mcpServers": {
"go-playground": {
"command": "node",
"args": ["dist/index.js"]
}
}
}π€ Contributors
π« Show your support
Give a βοΈ if this project helped you!
π License
Copyright Β© 2025 Samuel Berthe.
This project is MIT licensed.
Available Tools
5 toolsexecute_go_playground_urlC
Execute Go code from an existing Go Playground URL
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The Go Playground URL to execute code from (e.g., https://go.dev/play/abc123 or https://play.golang.org/p/abc123) | |
| withVet | No | Whether to run go vet on the code (default: true) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits. It only says 'execute' but does not explain side effects, network requirements, or whether the execution is remote and has latency. The agent is left guessing about key behaviors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no unnecessary words. It is appropriately sized for the simple function, though a bit more detail could improve it.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description should complete the picture. It fails to indicate the return value (e.g., whether it returns output, errors, or status). This is a significant gap for a tool that executes code.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers both parameters fully (100%), so baseline is 3. The description adds no extra context about the parameters beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (execute Go code) and the resource (existing Go Playground URL). It distinguishes from siblings like 'read' or 'share' by specifying execution from a URL. However, it does not mention what the tool returns, leaving some ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not specify prerequisites, limitations, or situations where another sibling tool (e.g., run_go_code without a URL) is more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_go_playground_urlA
Read Go code from an existing Go Playground URL
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The Go Playground URL to read code from (e.g., https://go.dev/play/abc123 or https://play.golang.org/p/abc123) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool reads code, implying a non-destructive operation, but fails to mention network calls, authentication requirements, rate limits, or error handling. This is insufficient for a tool that makes external requests.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no redundant information. Every word contributes to the purpose, making it concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description minimally covers the operation. However, it does not specify what the output is (e.g., returns the Go code as a string) or mention error scenarios, leaving some gaps in completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter 'url', which includes examples. The description adds no extra meaning beyond what the schema already provides, qualifying for the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads Go code from a URL, distinguishing it from siblings like execute_go_playground_url (which executes code) and share_go_code (which shares code). The verb 'Read' and resource 'Go code from an existing Go Playground URL' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you have a URL and want to retrieve code, but it does not explicitly state when to use this tool versus siblings. No comparisons or exclusions are provided, so guidance is only implied by the tool name and context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_go_codeB
Run Go code in the Go Playground and return execution results
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The Go code to execute | |
| withVet | No | Whether to run go vet on the code (default: true) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behaviors like sandbox limitations, error handling, or side effects, but only states 'return execution results'βfailing to mention that the code runs in a restricted environment or what happens on failure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundancy. However, it could incorporate brief parameter or behavior details without sacrificing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite low complexity and no output schema, the description fails to specify output format (e.g., stdout, stderr) or mention sibling differentiation, leaving the agent with incomplete information for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds no extra meaning beyond the parameter names and defaults. It aligns with the code parameter but offers no additional context like the effect of 'withVet'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Run Go code in the Go Playground' with a specific verb and resource, and distinguishes this tool from siblings like 'execute_go_playground_url' and 'run_and_share_go_code' by focusing on execution alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives from the sibling list (e.g., 'run_and_share_go_code' or 'execute_go_playground_url'), leaving the agent to infer usage without comparison.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- Added
execute_go_playground_url - Added
read_go_playground_url
3 tool updates
- First observed
run_and_share_go_code - First observed
run_go_code - First observed
share_go_code
TDQS
The tools have overlapping purposes that could cause confusion, especially between run_go_code and run_and_share_go_code, where the latter seems to combine the former with share_go_code. However, the descriptions clarify the distinctions, such as execute_go_playground_url focusing on existing URLs versus run_go_code for direct code execution.
The naming follows a consistent verb_noun pattern with underscores, such as execute_go_playground_url and run_go_code. There is a minor deviation with run_and_share_go_code, which uses 'and' in the name, but overall the pattern is clear and predictable.
With 5 tools, the count is reasonable for a Go Playground server, covering execution, reading, and sharing functionalities. It is slightly over-scoped as some tools could be merged (e.g., run_go_code and run_and_share_go_code), but it remains well within an appropriate range.
The toolset covers core operations for a Go Playground domain: executing code from URLs, reading code, running code directly, and sharing results. A minor gap exists in update or delete operations for shared URLs, but agents can work around this, and the surface supports typical workflows effectively.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
Compile code with thousands of compilers, inspect the assembly, and share godbolt.org links
Run Python code in a secure sandbox without local setup. Declare inline dependencies and execute sβ¦
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages β sandboxed, with persistent sessions for agent loops.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables execution of code in a sandbox environment with integrated web search capabilities. Provides a basic framework for running code safely, primarily designed for AI agents and research applications.13-
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to Go package documentation, function signatures, and type definitions directly from pkg.go.dev. It enables LLMs to search for packages, retrieve specific versions, and access code examples from the official Go module ecosystem.192MIT
- AlicenseNot gradedqualityDmaintenanceEnables secure cloud-based execution of code across 14+ programming languages within a sandboxed environment. It supports file management, standard input/output handling, and automatic generation of visual artifacts like plots and charts.MIT

sandboxapi-mcpofficial
AlicenseNot gradedqualityFmaintenanceExecute code in 8 programming languages via gVisor-sandboxed Docker containers. Supports Python, JS, TS, Go, Java, C++, C, and Bash.2MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/samber/go-playground-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server