IPyBox

v0.9.1Developer Toolsstable

A Python code execution sandbox based on IPython and Docker. Stateful code execution, file transfer between host and container, configurable network access.

claude-code-plugincode-executioncode-interpretercode-modecode-sandbox
Share:
74
Stars
0
Downloads
0
Weekly
0/5

What is IPyBox?

IPyBox is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to python code execution sandbox based on ipython and docker. stateful code execution, file transfer between host and container, configurable network access.

A Python code execution sandbox based on IPython and Docker. Stateful code execution, file transfer between host and container, configurable network access.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Python code execution sandbox based on IPython and Docker.

Use Cases

Execute Python code in a Docker-based sandbox with stateful execution.
Transfer files between host and container with configurable network access.
gradion-ai

Maintainer

LicenseApache 2.0
Languagepython
Versionv0.9.1
UpdatedMar 30, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

PIP

pip install ipybox

Manual Installation

pip install ipybox

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use IPyBox

IPyBox is a Python code execution sandbox that combines IPython kernels with Docker containers to provide stateful, isolated code execution for AI agents. It supports unified code blocks that mix Python, shell commands, and MCP tool calls in a single session. Developers use it to give LLMs a safe, reproducible environment for running data analysis, automating workflows, and interacting with external APIs — with state persisting across executions and optional OS-level sandboxing via Anthropic's sandbox-runtime.

Prerequisites

  • Python 3.8+ and pip installed on your system
  • Docker installed and running (required for the sandboxed execution container)
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • ipybox package installed via pip (pip install ipybox)
1

Install ipybox

Install the ipybox package from PyPI using pip. For older versions (pre-0.7), use the version constraint shown below.

pip install ipybox
2

Ensure Docker is running

IPyBox uses Docker to spin up isolated IPython kernels. Verify Docker is installed and the daemon is active before starting the MCP server.

docker info
3

Start the MCP server

Run ipybox as an MCP server using the Python module entry point. This starts the stdio-based MCP interface that clients connect to.

python -m ipybox
4

Configure your MCP client

Add the ipybox MCP server to your Claude Desktop configuration file. On macOS this file is at ~/Library/Application Support/Claude/claude_desktop_config.json.

{
  "mcpServers": {
    "ipybox": {
      "command": "python",
      "args": ["-m", "ipybox"]
    }
  }
}
5

Restart your MCP client

Restart Claude Desktop (or your MCP client) to pick up the new server configuration. The ipybox server will start automatically when the client launches.

6

Test with a stateful Python execution

Send a message to Claude asking it to run Python code. The kernel maintains state across multiple executions, so variables defined in one message are available in the next.

IPyBox Examples

Client configuration

Add ipybox to your Claude Desktop MCP configuration. The server runs via the Python module interface.

{
  "mcpServers": {
    "ipybox": {
      "command": "python",
      "args": ["-m", "ipybox"]
    }
  }
}

Prompts to try

Once connected, you can ask Claude to execute Python code in the stateful sandbox.

- "Run a pandas analysis on this CSV data and show me summary statistics"
- "Write and execute a Python script that fetches data from an API and plots a chart"
- "Install numpy in the sandbox and compute the eigenvalues of a random matrix"
- "Run !ls -la to list files in the container, then read the output file"
- "Execute this data pipeline step by step, keeping variables between steps"

Troubleshooting IPyBox

Docker container fails to start or times out

Ensure Docker Desktop is running and your user has permission to run containers. Run 'docker ps' to verify Docker is accessible, and check that no firewall rules are blocking container network access.

State is lost between messages

Each MCP session maintains a single IPython kernel. If you restart Claude Desktop or the server, a new kernel is created. Keep the client running without restarting to preserve session state across multiple code executions.

pip install ipybox fails with permission errors

Use a virtual environment: 'python -m venv .venv && source .venv/bin/activate && pip install ipybox'. Then update the MCP config to use the venv's Python: '/path/to/.venv/bin/python -m ipybox'.

Frequently Asked Questions about IPyBox

What is IPyBox?

IPyBox is a Model Context Protocol (MCP) server that python code execution sandbox based on ipython and docker. stateful code execution, file transfer between host and container, configurable network access. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install IPyBox?

Install via pip with: pip install ipybox. Then configure your AI client to connect to this MCP server.

Which AI clients work with IPyBox?

IPyBox works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is IPyBox free to use?

Yes, IPyBox is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ipybox": { "command": "pip", "args": ["install", "ipybox"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use IPyBox?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides