Back to Home
pydantic icon

mcp-run-python

Verified Safe

by pydantic

Overview

Execute Python code in a secure, sandboxed environment, often for AI agents or untrusted code execution.

Installation

Run Command
uvx mcp-run-python stdio

Security Notes

The server executes Python code using Pyodide within a Deno runtime, providing strong sandboxing via WebAssembly. File system write access is strictly limited to dependency installation (to a `node_modules` directory), and code execution runs with read-only access. Network access is configurable via an `allow_networking` flag (defaulting to true for the server, but can be disabled via CLI or programmatic API). Environment variables are explicitly stubbed out within the Deno sandbox (`process.env` always returns an empty object), preventing secrets leakage. The main 'eval'-like functionality is contained within the Pyodide sandbox, which is its primary purpose, and errors are formatted to remove Pyodide internal tracebacks. This architecture significantly mitigates risks associated with arbitrary code execution on the host system.

Similar Servers

Stats

Interest Score75
Security Score8
Cost ClassMedium
Avg Tokens750
Stars128
Forks15
Last Update2025-11-20

Tags

PythonSandboxDenoPyodideMCP