Python Exec Sandbox MCP Server

Sandboxed Python execution for AI agents. PEP 723 inline deps, multi-version Python, zero pollution.

Local serverstdioPython

What is the Python Exec Sandbox MCP Server?

Sandboxed Python execution for AI agents. PEP 723 inline deps, multi-version Python, zero pollution.

The short version

Sandboxed Python execution for AI agents. Scripts run in ephemeral, isolated environments with inline dependencies (PEP 723) -- zero host pollution, zero leftover venvs, zero package conflicts.

  • Scripts execute in a sandbox (bubblewrap on Linux, Docker on macOS/other platforms)
  • Dependencies are declared inline and resolved ephemerally via uv
  • Nothing touches your host's Python, site-packages, or virtualenvs
  • Each execution is isolated and disposable

What it needs from you

All setups require: - Python 3.13+ -- to run the MCP server process - uv -- manages script execution, dependency resolution, and Python version downloads. Also provides uvx for running the server without installing it globally. Additional requirements depend on your chosen sandbox backend: | Setup | Additional requirements |

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
execute_pythonExecute a Python script with automatic dependency management.
check_environmentReturns information about the execution environment: Python version, uv version, platform, sandbox status, and configuration.
validate_scriptValidates a script's PEP 723 metadata and dependencies without executing it.

How to install the Python Exec Sandbox MCP Server

{
  "mcpServers": {
    "python-exec-sandbox": {
      "command": "npx",
      "args": ["-y", "@devcontainers/cli"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

All setups require: - Python 3.13+ -- to run the MCP server process - uv -- manages script execution, dependency resolution, and Python version downloads. Also provides uvx for running the server without installing it globally. Additional requirements depend on your chosen sandbox backend: | Setup | Additional requirements |

Example prompts to try

  • “Use Python Exec Sandbox to Cursor.”
  • “Use Python Exec Sandbox to execute python.”
  • “Use Python Exec Sandbox to check environment.”

Frequently asked questions

Sandboxed Python execution for AI agents. PEP 723 inline deps, multi-version Python, zero pollution. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.