io.github.gradion-ai/ipybox

Unified execution environment for Python code, shell commands, and programmatic MCP tool calls

DatabasesPythonv0.9.2

ipybox

ipybox

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

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, enforcing filesystem and network restrictions at OS level.

It generates Python APIs for MCP server tools via 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 and can be obtained with pip install ipybox<0.7.

Documentation:

Capabilities

CapabilityDescription
Stateful executionState persists across executions in IPython kernels
Unified executionCombine Python code, shell commands, and programmatic MCP tool calls in a code block
Shell command executionRun shell commands via !cmd syntax, capture output into Python variables
Programmatic MCP tool callsMCP tools called via generated Python API ("code mode"), not JSON directly
Python tool API generationTyped functions and Pydantic models generated from MCP tool schemas via mcpygen
Application-level approvalIndividual approval of tool calls and shell commands during code execution
Lightweight sandboxingOptional kernel isolation via Anthropic's sandbox-runtime
Local executionNo cloud dependencies, everything runs locally on your machine

Usage

ComponentDescription
Python SDKPython API for building applications on ipybox
MCP serveripybox as MCP server for code actions and programmatic tool calling
Claude Code pluginPlugin that bundles the ipybox MCP server and a code action skill

[!TIP] Freeact agent

Freeact is a general-purpose agent built on ipybox.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
uvx ipybox

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-gradion-ai-ipybox": {
      "command": "uvx",
      "args": [
        "ipybox"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

ipyboxpypi

Compatible MCP Clients

io.github.gradion-ai/ipybox works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More