Model Context Protocol server to run Python code in a sandbox.
The code is executed using pyodide in node and is therefore isolated from the rest of the operating system.
The server can be run with just npx thus:
npx @pydantic/mcp-run-python [stdio|sse]
where:
-
stdio
runs the server with the Stdio MCP transport — suitable for running the process as a subprocess locally - and
sse
runs the server with the SSE MCP transport — running the server as an HTTP server to connect locally or remotely