ipybox
The ipybox server provides a secure, sandboxed IPython kernel environment in a Docker container for executing Python code with state preservation across executions.
Execute Python code securely within a stateful IPython kernel that preserves variables, imports, and definitions across calls
Support direct execution of asynchronous Python code within the kernel's active event loop
Install Python packages at runtime using
!pip installcommandsUpload files from the host to the container's
/appdirectory for use in code executionDownload files from the container's
/appdirectory to retrieve results or generated artifactsStream code execution output as it is generated
Return plots generated with visualization libraries
Reset the IPython kernel to a clean state, clearing memory while preserving installed packages and files
Provides secure Python code execution in Docker containers with IPython kernels, supporting data analytics, package installation, and plot generation with configurable network restrictions
Enables safe execution of Python code through IPython kernels in sandboxed environments, supporting stateful code execution, package management, and visualization library output
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ipyboxrun this Python code to calculate the average of these numbers: [45, 67, 89, 23, 56]"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
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: Sandbox MCP 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 |
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 API for building applications on ipybox | |
ipybox as MCP server for code actions and programmatic tool calling | |
Plugin that bundles the ipybox MCP server and a code action skill |
Freeact agent
Freeact is a general-purpose agent built on ipybox.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gradion-ai/ipybox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server