ipybox
Project description
ipybox
mcp-name: io.github.gradion-ai/ipybox
[!NOTE] Next generation ipybox
This is the next generation of ipybox, a complete rewrite. Older versions are maintained on the 0.6.x branch and can be obtained with
pip install ipybox<0.7.
ipybox is a Python code execution sandbox with first-class support for programmatic MCP tool use. It generates a typed Python tool API from MCP server tool schemas, supporting both local stdio and remote HTTP servers. Code that calls the generated API executes in a sandboxed IPython kernel, providing a stateful environment where variables and definitions persist across executions. The generated API delegates MCP tool execution to a separate environment that enforces tool call approval, requiring applications to explicitly accept or reject each tool call before it executes.
CodeExecutor coordinates sandboxed code execution, tool execution, and tool call approval.
Agent integration
ipybox is designed for agents that interact with their environment through code actions rather than JSON tool calls, a more reliable approach since LLMs are heavily pretrained on Python code compared to JSON tool call post-training. Agents generate and execute Python code that composes multiple MCP tool calls into a single action, using loops, conditionals, and data transformations that keep intermediate results out of the agent's context window. Since agent-generated code cannot be trusted, it must run in a secure sandboxed environment, and all MCP tool calls must be approved by the application. ipybox supports both with minimal setup.
Features
- Stateful code execution — state persists across executions in IPython kernels
- Lightweight sandboxing — kernel isolation via Anthropic's sandbox-runtime
- Generated Python tool API — functions and models generated from MCP tool schemas
- Programmatic MCP tool use — MCP tools called via Python code, not JSON directly
- MCP tool call approval — every MCP tool call requires application-level approval
- Any MCP server — supports stdio, Streamable HTTP, and SSE transports
- Any Python package — install and use any Python package in IPython kernels
- Local code execution — no cloud dependencies, everything runs on your machine
- Python SDK and MCP server — use ipybox programmatically or as an MCP server
- Claude Code plugin — programmatic MCP tool use and code action development
Documentation
See the documentation for installation instructions, quickstart guide, and detailed usage information. For LLM-friendly documentation, see llms.txt and llms-full.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipybox-0.7.0.tar.gz.
File metadata
- Download URL: ipybox-0.7.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d397228aa6744f6b2a99dd5ee5b7f6342978d67f4068f5c192127d566a1bc265
|
|
| MD5 |
ab7f7bfa4a86a3fdfae262f82f8464ef
|
|
| BLAKE2b-256 |
51ca9cdc7298feb1328df92ee075671955e45a389d50b18555a1653c9278c51d
|
Provenance
The following attestation bundles were made for ipybox-0.7.0.tar.gz:
Publisher:
release.yml on gradion-ai/ipybox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipybox-0.7.0.tar.gz -
Subject digest:
d397228aa6744f6b2a99dd5ee5b7f6342978d67f4068f5c192127d566a1bc265 - Sigstore transparency entry: 753278914
- Sigstore integration time:
-
Permalink:
gradion-ai/ipybox@bba6717c43986c8ff5705e9a778df5987f6b197e -
Branch / Tag:
refs/tags/0.7.0 - Owner: https://github.com/gradion-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bba6717c43986c8ff5705e9a778df5987f6b197e -
Trigger Event:
push
-
Statement type:
File details
Details for the file ipybox-0.7.0-py3-none-any.whl.
File metadata
- Download URL: ipybox-0.7.0-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e16ac5ffab1ce713f127a2f604d15f5251308d105e5dc76ba5bad06e20ea8a
|
|
| MD5 |
4abcd81f1d95b163cda2ffc064815261
|
|
| BLAKE2b-256 |
3dde8eb03fddb2faa0a1d7731951290c4a6d840a660cd4ddcb2aebe156ef48da
|
Provenance
The following attestation bundles were made for ipybox-0.7.0-py3-none-any.whl:
Publisher:
release.yml on gradion-ai/ipybox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipybox-0.7.0-py3-none-any.whl -
Subject digest:
56e16ac5ffab1ce713f127a2f604d15f5251308d105e5dc76ba5bad06e20ea8a - Sigstore transparency entry: 753278915
- Sigstore integration time:
-
Permalink:
gradion-ai/ipybox@bba6717c43986c8ff5705e9a778df5987f6b197e -
Branch / Tag:
refs/tags/0.7.0 - Owner: https://github.com/gradion-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bba6717c43986c8ff5705e9a778df5987f6b197e -
Trigger Event:
push
-
Statement type: