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-mcp run 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: mcp-run-isolated-python
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.
Inputs: language (required), code (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Beta code sandbox for agents. Run Python or JavaScript with no network and a 30 s timeout.
Access Pollinations models and API capabilities through agent tools.
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
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to execute Python code securely in a sandboxed environment. Supports configurable restrictions like no network access and returns results including files.1MIT
- AlicenseAqualityDmaintenanceEnables LLMs to securely execute code and manage reusable tools using Riza's isolated code interpreter API.6ISC
- AlicenseAqualityCmaintenanceEnables AI assistants to securely execute Python and C++ code snippets inside disposable, isolated Docker containers and receive structured results.31MIT