mcp-run-python
Verified Safeby pydantic
Overview
Execute Python code in a secure, sandboxed environment, often for AI agents or untrusted code execution.
Installation
uvx mcp-run-python stdioSecurity 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
hyper-mcp
A fast, secure Model Context Protocol (MCP) server that extends its capabilities through WebAssembly plugins, enabling AI features in applications like Cursor IDE.
mcp-server-code-execution-mode
This server enables LLM agents to execute Python code in a highly secure, isolated container environment, facilitating complex multi-tool orchestration and data analysis with minimal LLM context token usage.
zeromcp
A minimal, pure Python Model Context Protocol (MCP) server for exposing tools, resources, and prompts via HTTP/SSE and Stdio transports.
ipybox
A lightweight and secure Python code execution sandbox for AI agents to perform data analysis or execute code actions within Docker containers.