piston-mcp
Click on "Deploy 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., "@piston-mcprun python code that prints the first 10 Fibonacci numbers"
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.
As of Feb 15, 2026,Piston API is no longer publicly available and requires an authorization token. This means piston-mcp will no longer work with the publicly hosted instance of Piston.
Installation
You can try out piston-mcp locally without cloning it.
Install uv
To try out piston-mcp you'll need to install uv:
# On MacOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Install MCP Client
You will also need to download an MCP client to connect to piston-mcp, such as Claude Desktop.
Update MCP Client Configuration
Update the MCP client's configuration with the following configuration to connect to piston-mcp:
{
"mcpServers": {
"piston": {
"command": "uv",
"args": [
"tool",
"run",
"--from",
"git+https://github.com/alvii147/piston-mcp.git@main",
"piston_mcp"
]
}
}
}For Claude Desktop, the configuration file is usually found in:
# On MacOS and Linux
~/Library/Application\ Support/Claude/claude_desktop_config.json
# On Windows
%APPDATA%\Claude\claude_desktop_config.jsonRelated MCP server: microsandbox-mcp
Usage
Once you've followed the steps above, your MCP client should be able to run code for you:

Acknowledgements
Available Tools
1 toolrun_codeB
Runs given code in the given language in the Piston remote code execution engine.
Parameters
language: str Programming language to run code in.
code : str Code to run.
Return
str Output of code execution.
| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | ||
| code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry full burden. It states code is run but omits details on side effects, permissions, timeout, or whether stderr is captured. The return is described as 'Output of code execution' without specifics.
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?
Well-structured with a header line and parameter descriptions in a list format. Could be slightly more concise by removing the 'Parameters' and 'Return' headers if not needed, but overall efficient.
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?
The description covers the core function and parameter semantics, but lacks important context like supported languages, error handling, or sandboxing behavior. With an output schema present, return explanation is adequate.
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?
Despite 0% schema description coverage, the description provides clear parameter meanings: 'language' as the programming language and 'code' as the code to run. This adds value beyond the schema's bare titles.
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's purpose: running code in a given language using the Piston remote code execution engine. It specifies the verb 'runs' and the resource 'code', making it 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?
No guidance on when to use this tool versus alternatives. With no sibling tools, it still lacks explicit context on prerequisites, safety considerations, or when not to use it.
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.
1 tool update
v0.1.0- First observed
run_code
TDQS
Scored across 1 tool
Only one tool exists, so there is no ambiguity or overlap with other tools.
With a single tool named 'run_code', the naming is consistent and follows a clear verb_noun pattern.
A single tool is borderline for a code execution server; it may be sufficient but feels thin compared to typical implementations that also expose language listing or version info.
The server only provides code execution but lacks essential operations like listing supported languages, which agents would likely need to use the server effectively.
Maintenance
Related MCP Connectors
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Run Python code from natural language prompts, with optional PyPI package install.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to safely execute code in isolated Docker containers with resource limits and security controls, supporting session management and automatic dependency installation.MIT
- AlicenseAqualityBmaintenanceConnects AI agents to microsandbox for creating lightweight sandboxes, executing code, managing files, and monitoring resources.19539 npm15Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables LLMs to execute Python code securely in a sandboxed environment. Supports configurable restrictions like no network access and returns results including files.MIT
- AlicenseAqualityDmaintenanceEnables LLMs to securely execute code and manage reusable tools using Riza's isolated code interpreter API.615 npmISC