https://github.com/gradion-ai/ipybox
Unified execution environment for Python code, shell commands, and programmatic MCP tool calls.
https://github.com/gradion-ai/ipybox
claude-code-plugin code-execution code-interpreter code-mode code-sandbox ipython mcp mcp-client mcp-server programmatic-tool-calling python sandbox-runtime
Last synced: 3 months ago
JSON representation
Unified execution environment for Python code, shell commands, and programmatic MCP tool calls.
- Host: GitHub
- URL: https://github.com/gradion-ai/ipybox
- Owner: gradion-ai
- License: apache-2.0
- Created: 2024-12-03T15:21:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-24T07:03:14.000Z (4 months ago)
- Last Synced: 2026-03-24T11:34:55.140Z (4 months ago)
- Topics: claude-code-plugin, code-execution, code-interpreter, code-mode, code-sandbox, ipython, mcp, mcp-client, mcp-server, programmatic-tool-calling, python, sandbox-runtime
- Language: Python
- Homepage: https://gradion-ai.github.io/ipybox/
- Size: 3.58 MB
- Stars: 72
- Watchers: 3
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-mcp - gradion-ai/ipybox
- awesome-mcp-security - ipybox - based code execution sandbox that allows agents to run arbitrary P... | 71 ⚠️ | 71 | [表示](https://agentseal.org/mcp/https-githubcom-gradion-ai-ipybox) | (カテゴリ / 💻 <a name="code--ide"></a>コード・IDE)
- awesome-mcp-servers - **ipybox** - Python code execution sandbox based on IPython and Docker. Stateful code execution, file transfer between host and container, configurable network access. See ipybox MCP server for details. `file` `http` `docker` `ai` `git` (📦 Other)
README
# ipybox
mcp-name: io.github.gradion-ai/ipybox
[ipybox](https://gradion-ai.github.io/ipybox/) is a unified execution environment for Python code, shell commands, and programmatic MCP tool calls.
## Overview
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.
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.
> [!NOTE]
> **Next generation ipybox**
>
> 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`.
## Documentation:
- 📚 [Documentation](https://gradion-ai.github.io/ipybox/)
- 🏗️ [Architecture](https://gradion-ai.github.io/ipybox/architecture/)
- 🤖 [llms.txt](https://gradion-ai.github.io/ipybox/llms.txt)
- 🤖 [llms-full.txt](https://gradion-ai.github.io/ipybox/llms-full.txt)
## Capabilities
| Capability | Description |
| --- | --- |
| **Stateful execution** | State persists across executions in IPython kernels |
| **Unified execution** | Combine Python code, shell commands, and programmatic MCP tool calls in a code block |
| **Shell command execution** | Run shell commands via `!cmd` syntax, capture output into Python variables |
| **Programmatic MCP tool calls** | MCP tools called via generated Python API ("code mode"), not JSON directly |
| **Python tool API generation** | Typed functions and Pydantic models generated from MCP tool schemas via [mcpygen](https://gradion-ai.github.io/mcpygen/) |
| **Application-level approval** | Individual approval of tool calls and shell commands during code execution |
| **Lightweight sandboxing** | Optional kernel isolation via Anthropic's [sandbox-runtime](https://github.com/anthropic-experimental/sandbox-runtime) |
| **Local execution** | No cloud dependencies, everything runs locally on your machine |
## Usage
| Component | Description |
| --- | --- |
| **[Python SDK](https://gradion-ai.github.io/ipybox/api/code_executor/)** | Python API for building applications on ipybox |
| **[MCP server](https://gradion-ai.github.io/ipybox/mcpserver/)** | ipybox as MCP server for code actions and programmatic tool calling |
| **[Claude Code plugin](https://gradion-ai.github.io/ipybox/ccplugin/)** | Plugin that bundles the ipybox MCP server and a code action skill |
> [!TIP]
> **Freeact agent**
>
> [Freeact](https://github.com/gradion-ai/freeact) is a general-purpose agent built on ipybox.