MCPSERV.CLUB
gradion-ai

ipybox

MCP Server

Secure, Docker‑based Python code sandbox for AI agents

Stale(60)
41stars
2views
Updated 20 days ago

About

ipybox provides a lightweight, secure environment to execute Python code inside Docker containers. It offers stateful IPython kernels, network restrictions, package installation, and streaming output—ideal for AI agents performing data analysis or code actions.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

ipybox MCP Server Badge

Overview

The ipybox MCP server delivers a lightweight, secure sandbox for executing Python code within IPython kernels wrapped in Docker containers. It addresses the growing need for AI assistants to run arbitrary Python snippets safely, especially when interacting with external data sources or performing analytical tasks. By isolating execution inside containers and providing a configurable firewall, ipybox ensures that potentially unsafe code cannot affect the host system or network.

Developers leveraging AI agents—such as those built with freeact—can offload code execution to ipybox without exposing their infrastructure. The server exposes a standard MCP interface, allowing agents to invoke code execution, stream results in real time, and retrieve visual outputs like matplotlib or seaborn plots. This seamless integration means an AI assistant can analyze data, generate visualizations, and return the results directly within a conversation or workflow.

Key capabilities include:

  • Secure, isolated execution: Docker containers keep code execution separate from the host and can be configured to block all outbound network traffic, mitigating security risks.
  • Stateful IPython kernels: Persistent kernel sessions enable incremental code execution, caching variables, and maintaining context across multiple calls.
  • Dynamic package handling: Packages can be pre‑installed at build time or added on demand during runtime, giving agents flexibility to use any Python library needed for a task.
  • Streaming output: Execution results are streamed as they are produced, allowing agents to provide live feedback or partial results without waiting for the entire computation to finish.
  • Plot support: Generated plots are automatically captured and returned, enabling visual data analysis directly from the agent.

Typical use cases involve data science pipelines where an AI assistant needs to run exploratory analyses, transform datasets, or generate charts on the fly. It is also valuable for automated testing frameworks that require sandboxed execution of user‑supplied scripts, or for educational platforms where students submit code to be evaluated safely. By offering both local and remote deployment options, ipybox fits into diverse environments—from on‑premise servers to cloud functions—while the async API simplifies orchestration within larger AI workflows.