This server has been archived and is no longer actively maintained.
MCP Run Python is an MCP server that MCP server to run Python code in a sandbox. Its tool list has not been published yet over stdio, sse and http, requires no API key, and scores 62/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-run-python": {
"args": [
"mcp-run-python"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server to run Python code in a sandbox.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'mcp-run-python' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
MCP Run Python has a Sandbox Escape & Server Takeover Vulnerability
### Impact **Critical Sandbox Escape & Server Takeover:** A critical security vulnerability exists in `mcp-run-python` due to a lack of isolation between the Python runtime (Pyodide) and the host JavaScript environment. The `runPython` and `runPythonAsync` functions execute Python code using Pyodide without restricting access to the JavaScript bridge. This allows any executed Python code—whether from a user or an AI model—to access the `js` module in Pyodide. Through this bridge, the Python cod
>= 0source →MCP Run Python Deno Sandbox Misconfiguration Allows SSRF Attacks via Localhost Access
### Impact **Server-Side Request Forgery (SSRF):** A security vulnerability exists in the `mcp-run-python` tool (specifically within the Pydantic-AI integration) due to an overly permissive Deno sandbox configuration. The tool configures the Deno runtime—which is intended to isolate the execution of untrusted Python code—with network permissions that include access to the host's loopback interface (`localhost`). Consequently, malicious Python code executed through the tool can bypass network is
>= 0source →Click any tool to inspect its schema.
This server is missing a description.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
MCP server for using the GitLab API
Manage Supabase projects — databases, auth, storage, and edge functions
Chrome DevTools for coding agents
MCP Security Weekly
Get CVE alerts and security updates for Mcp Run Python and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
We've decided to retire and archive this project - there's just no safe way to run Python within pyodide safely with reasonable latency.
Instead, we're working hard on Monty which should solve the usecase we initially intended for mcp-run-python, with better security, lower latency, easier install, and better ways to communicate with the OS.
If you want to use this projects code, or otherwise use pyodide to run LLM generated code, feel free to do so.
However be extremely careful about how you sandbox the service and what code you allow to run.
In particular Python code running in pyodide can run arbitrary javascript meaning it can do whatever the javascript runtime running pydodie can do, including:
These issues are not problems with Pyodide or Deno - they're behaving as advertised, it's just that those tools were not designed as sandboxes to run untrusted code.
Code is executed using Pyodide in Deno and is therefore isolated from the rest of the operating system.
(This code was previously part of Pydantic AI but was moved to a separate repo to make it easier to maintain.)
To use this server, you must have both Python and Deno installed.
The server can be run with deno installed using uvx:
uvx mcp-run-python [-h] [--version] [--port PORT] [--deps DEPS] {stdio,streamable-http,streamable-http-stateless,example}
where:
stdio runs the server with the
Stdio MCP transport — suitable for
running the process as a subprocess locallystreamable-http runs the server with the
Streamable HTTP MCP transport -
suitable for running the server as an HTTP server to connect locally or remotely. This supports stateful requests, but
does not require the client to hold a stateful connection like SSEstreamable-http-stateless runs the server with Streamable HTTP MCP transport in stateless mode and does not
support server-to-client notificationsexample will run a minimal Python scrip