# ipybox

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 76
- Author: gradion-ai
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/gradion-ai/ipybox
- Updated: 2026-06-11
- HTML: https://affpapa.org/en/nevibecode/mcp/ipybox

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add ipybox -- uvx ipybox
```
uvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>

### Codex

**Platform CLI**
```bash
codex mcp add ipybox -- uvx ipybox
```
uvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add ipybox uvx ipybox
```
uvx runs the command named after the package; if the README names another one, use uvx --from ipybox <command>

## When to use it
- 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
- Run this Python code with ipybox and keep its variables for the next execution.
- Use ipybox to run `!pwd` and store the output in a Python variable.
- Call the required MCP tool through ipybox's Python API and ask me before executing it.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
