$git clone https://github.com/gradion-ai/ipyboxUnified execution environment for Python code, shell commands, and programmatic MCP tool calls.
| 1 | <p align="left"> |
| 2 | <img src="docs/images/ipybox-crop-nobg.png" alt="ipybox" width="300"> |
| 3 | </p> |
| 4 | |
| 5 | # ipybox |
| 6 | |
| 7 | mcp-name: io.github.gradion-ai/ipybox |
| 8 | |
| 9 | <p align="left"> |
| 10 | <a href="https://gradion-ai.github.io/ipybox/"><img alt="Website" src="https://img.shields.io/website?url=https%3A%2F%2Fgradion-ai.github.io%2Fipybox%2F&up_message=online&down_message=offline&label=docs"></a> |
| 11 | <a href="https://pypi.org/project/ipybox/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/ipybox?color=blue"></a> |
| 12 | <a href="https://github.com/gradion-ai/ipybox/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/gradion-ai/ipybox"></a> |
| 13 | <a href="https://github.com/gradion-ai/ipybox/actions"><img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/gradion-ai/ipybox/test.yml"></a> |
| 14 | <a href="https://github.com/gradion-ai/ipybox/blob/main/LICENSE"><img alt="GitHub License" src="https://img.shields.io/github/license/gradion-ai/ipybox?color=blueviolet"></a> |
| 15 | </p> |
| 16 | |
| 17 | [ipybox](https://gradion-ai.github.io/ipybox/) is a unified execution environment for Python code, shell commands, and programmatic MCP tool calls. |
| 18 | |
| 19 | ## Overview |
| 20 | |
| 21 | ipybox executes code blocks in a stateful IPython kernel. A code block can contain any combination of Python code, shell commands, and programmatic MCP tool calls. Kernels can be sandboxed with [sandbox-runtime](https://github.com/anthropic-experimental/sandbox-runtime), enforcing filesystem and network restrictions at OS level. |
| 22 | |
| 23 | It generates Python APIs for MCP server tools via [mcpygen](https://gradion-ai.github.io/mcpygen/), and supports application-level approval of individual tool calls and shell commands during code execution. ipybox runs locally on your computer, enabling protected access to your local data and tools. |
| 24 | |
| 25 | > [!NOTE] |
| 26 | > **Next generation ipybox** |
| 27 | > |
| 28 | > This is the next generation of ipybox, a complete rewrite. Older versions are maintained on the [0.6.x branch](https://github.com/gradion-ai/ipybox/tree/0.6.x) and can be obtained with `pip install ipybox<0.7`. |
| 29 | |
| 30 | ## Documentation: |
| 31 | |
| 32 | - 📚 [Documentation](https://gradion-ai.github.io/ipybox/) |
| 33 | - 🏗️ [Architecture](https://gradion-ai.github.io/ipybox/architecture/) |
| 34 | - 🤖 [llms.txt](https://gradion-ai.github.io/ipybox/llms.txt) |
| 35 | - 🤖 [llms-full.txt](https://gradion-ai.github.io/ipybox/llms-full.txt) |
| 36 | |
| 37 | ## Capabilities |
| 38 | |
| 39 | | Capability | Description | |
| 40 | | --- | --- | |
| 41 | | **Stateful execution** | State persists across executions in IPython kernels | |
| 42 | | **Unified execution** | Combine Python code, shell commands, and programmatic MCP tool calls in a code block | |
| 43 | | **Shell command execution** | Run shell commands via `!cmd` syntax, capture output into Python variables | |
| 44 | | **Programmatic MCP tool calls** | MCP tools called via generated Python API ("code mode"), not JSON directly | |
| 45 | | **Python tool API generation** | Typed functions and Pydantic models generated from MCP tool schemas via [mcpygen](https://gradion-ai.github.io/mcpygen/) | |
| 46 | | **Application-level approval** | Individual approval of tool calls and shell commands during code execution | |
| 47 | | **Lightweight sandboxing** | Optional kernel isolation via Anthropic's [sandbox-runtime](https://github.com/anthropic-experimental/sandbox-runtime) | |
| 48 | | **Local execution** | No cloud dependencies, everything runs locally on your machine | |
| 49 | |
| 50 | ## Usage |
| 51 | |
| 52 | | Component | Description | |
| 53 | | --- | --- | |
| 54 | | **[Python SDK](https://gradion-ai.github.io/ipybox/api/code_executor/)** | Python API for building applications on ipybox | |
| 55 | | **[MCP server](https://gradion-ai.github.io/ipybox/mcpserver/)** | ipybox as MCP server for code actions and programmatic tool calling | |
| 56 | | **[Claude Code plugin](https://gradion-ai.github.io/ipybox/ccplugin/)** | Plugin that bundles the ipybox MCP server and a code action skill | |
| 57 | |
| 58 | > [!TIP] |
| 59 | > **Freeact agent** |
| 60 | > |
| 61 | > [Freeact](https://github.com/gradion-ai/freeact) is a general-purpose agent built on ipybox. |