ipybox — Claude Code MCP server: features and setup
ipybox runs Python, shell commands, and MCP tool calls in a stateful environment. Use it when an agent needs to execute code alongside access to local data.
claude mcp add ipybox -- uvx ipyboxWhat ipybox does
ipybox runs code in an IPython kernel that keeps its state between executions. A single code block can combine Python, shell commands written as !cmd, and MCP tool calls through generated Python APIs. Those APIs include typed functions and Pydantic models built from tool schemas.
The server runs on your computer, with no cloud dependency. You can require approval for individual tool calls and shell commands; optional isolation through sandbox-runtime applies filesystem and network restrictions at OS level. The sandbox is optional, so local execution does not depend on it.
What it helps with
- keep Python state across code executions
- run a shell command and capture its output in Python
- call MCP tools through generated Python functions
- approve individual tool calls and shell commands
Example prompts for the agent
- Run this Python code with ipybox and keep its variables for the next execution.
- Use ipybox to run
!pwdand store the output in a Python variable. - Call the required MCP tool through ipybox's Python API and ask me before executing it.
How to install ipybox
Platform CLI
claude mcp add ipybox -- uvx ipyboxuvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>
Platform CLI
codex mcp add ipybox -- uvx ipyboxuvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>
Config file
{
"mcpServers": {
"ipybox": {
"command": "uvx",
"args": [
"ipybox"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>
Config file
{
"servers": {
"ipybox": {
"type": "stdio",
"command": "uvx",
"args": [
"ipybox"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>
Platform CLI
gemini mcp add ipybox uvx ipyboxuvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ipybox
How do I install ipybox in Claude Code?
Run claude mcp add ipybox -- uvx ipybox to add ipybox as an MCP server.
What does ipybox do?
It executes Python, shell commands, and programmatic MCP tool calls in an IPython kernel that retains state between runs.
Does ipybox require sandboxing?
No. Kernel isolation with sandbox-runtime is optional and can enforce filesystem and network restrictions at OS level.