
Developer Tools
v0.6.7
active
ipybox
io.github.gradion-ai/ipybox
An MCP server for sandboxed Python code execution with IPython and Docker, and file transfer.
Documentation
ipybox
mcp-name: io.github.gradion-ai/ipybox
ipybox is a lightweight and secure Python code execution sandbox based on IPython and Docker. It can run locally on your computer or remotely in an environment of your choice. ipybox is designed for AI agents that need to execute Python code securely e.g. for data analysis or executing code actions, like freeact agents.
Features
- Secure code execution inside Docker containers
- Restrict network access with a configurable firewall
- Stateful code execution with IPython kernels
- Stream code execution output as it is generated
- Install Python packages at build time or runtime
- Return plots generated with visualization libraries
- Exposes an MCP server interface for AI agent integration
- Invocation of MCP servers via generated client code
- Flexible deployment options, local or remote
asyncioAPI for managing the execution environment
Documentation
MCP server
ipybox can be installed as MCP server.
{
"mcpServers": {
"ipybox": {
"command": "uvx",
"args": ["ipybox", "mcp"]
}
}
}
Python example
Install ipybox Python package:
pip install ipybox
Execute code in an ipybox container:
import asyncio
from ipybox import ExecutionClient, ExecutionContainer
async def main():
async with ExecutionContainer(tag="ghcr.io/gradion-ai/ipybox:0.6.7") as container:
async with ExecutionClient(port=container.executor_port) as client:
result = await client.execute("print('Hello, world!')")
print(f"Output: {result.text}")
if __name__ == "__main__":
asyncio.run(main())
PYPI
ipyboxInstall Command
pip install ipyboxRuntime: uvx