Skip to main content
Glama

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.

Related MCP server: MCP Executor Server

Documentation:

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

Application-level approval

Individual approval of tool calls and shell commands during code execution

Lightweight sandboxing

Optional kernel isolation via Anthropic's sandbox-runtime

Local execution

No cloud dependencies, everything runs locally on your machine

Usage

Component

Description

Python SDK

Python API for building applications on ipybox

MCP server

ipybox as MCP server for code actions and programmatic tool calling

Claude Code plugin

Plugin that bundles the ipybox MCP server and a code action skill

TIP

Freeact agent

Freeact is a general-purpose agent built on ipybox.

Available Tools

4 tools
download_fileA

Download a file from the container's /app directory to the host filesystem.

Retrieves files created or modified during code execution from the container. The file at '/app/{relpath}' in the container will be saved to the specified location on the host.

Parent directories are created automatically if they don't exist.

Inputs: local_path (required), relpath (required).

execute_ipython_cellA

Execute Python code in a stateful IPython kernel within a Docker container.

    The kernel maintains state across executions - variables, imports, and definitions
    persist between calls. Each execution builds on the previous one, allowing you to
    build complex workflows step by step. Use '!pip install package_name' to install
    packages as needed.

    The kernel has an active asyncio event loop, so use 'await' directly for async
    code. DO NOT use asyncio.run() or create new event loops.

    Executions are sequential (not concurrent) as they share kernel state. Use the
    reset() tool to clear the kernel state and start fresh.

    Returns:
        str: Output text from execution, or empty string if no output.
    

Inputs: code (required), timeout. Returns: result

resetA

Reset the IPython kernel to a clean state.

Creates a new kernel instance, clearing all variables, imports, and definitions from memory. Installed packages and files in the container filesystem are preserved. Useful for starting fresh experiments or clearing memory after processing large datasets.

Inputs: no named parameters.

upload_fileA

Upload a file from the host filesystem to the container's /app directory.

    Makes a file from the host available inside the container for code execution.
    The uploaded file can then be accessed in execute_ipython_cell using the
    path '/app/{relpath}'.
    

Inputs: local_path (required), relpath (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: download_file retrieves files from container to host, execute_ipython_cell runs Python code in a persistent kernel, reset clears kernel state, and upload_file sends files from host to container. The boundaries are unambiguous, preventing agent misselection.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (download_file, execute_ipython_cell, reset, upload_file) with clear, descriptive actions. Reset is a single verb but fits naturally as it describes a clear action without needing a noun, maintaining overall consistency in style and readability.

    Tool Count5/5

    With 4 tools, the server is well-scoped for its purpose of interactive Python execution in a container. Each tool earns its place by covering essential operations: file transfer (upload/download), code execution, and state management (reset). This count avoids bloat while providing complete workflow coverage.

    Completeness5/5

    The tool set provides complete coverage for the domain of container-based IPython execution. It supports the full lifecycle: uploading files, executing code with state persistence, resetting the environment, and downloading results. No obvious gaps exist; agents can perform end-to-end workflows without dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An interactive Python code execution environment that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.
      39
      Apache 2.0
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A secure server that enables code execution in isolated Docker environments, supporting Python with strict security constraints including network isolation, limited filesystem access, and resource limitations.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to safely execute code in isolated Docker containers with resource limits and security controls, supporting session management and automatic dependency installation.
      MIT