Python Code Execution
Provides secure Python code execution in a sandboxed Pyodide environment with automatic dependency installation, stdout/stderr cap
MCP server implementation by Pydantic that provides secure Python code execution in a sandboxed environment using Pyodide running in Deno. The server offers a single run_python_code tool that executes Python code with dependency installation support, capturing stdout/stderr and return values while maintaining isolation from the host system. Built with TypeScript for the Deno runtime and Python for the client interface, it supports both stdio and HTTP transports, automatic dependency management through micropip, and includes comprehensive error handling for installation and runtime failures. Designed for AI assistants that need to perform data analysis, mathematical computations, or general Python scripting tasks without security risks to the underlying system.
Source
Repository: https://github.com/pydantic/mcp-run-python
Maintain Python Code Execution?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/mcp/pydantic-mcp-run-python?ref=badge)