Skip to main content

ipybox

Project description

ipybox

mcp-name: io.github.gradion-ai/ipybox

Website PyPI - Version GitHub Release GitHub Actions Workflow Status GitHub License

[!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.

Architecture

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipybox-0.7.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipybox-0.7.0-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

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

Hashes for ipybox-0.7.0.tar.gz
Algorithm Hash digest
SHA256 d397228aa6744f6b2a99dd5ee5b7f6342978d67f4068f5c192127d566a1bc265
MD5 ab7f7bfa4a86a3fdfae262f82f8464ef
BLAKE2b-256 51ca9cdc7298feb1328df92ee075671955e45a389d50b18555a1653c9278c51d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipybox-0.7.0.tar.gz:

Publisher: release.yml on gradion-ai/ipybox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ipybox-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56e16ac5ffab1ce713f127a2f604d15f5251308d105e5dc76ba5bad06e20ea8a
MD5 4abcd81f1d95b163cda2ffc064815261
BLAKE2b-256 3dde8eb03fddb2faa0a1d7731951290c4a6d840a660cd4ddcb2aebe156ef48da

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipybox-0.7.0-py3-none-any.whl:

Publisher: release.yml on gradion-ai/ipybox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page