AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP unreviewed Apache-2.0 Self-run

Coderunner

mcp-instavm-coderunner · by instavm

A local sandbox for your AI agents

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add mcp-instavm-coderunner

Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Dangerous shell/eval execution.

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Reliability & compatibility

Not yet reviewed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Coderunner? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

[](https://github.com/instavm/coderunner/stargazers) [](https://github.com/instavm/coderunner/blob/master/LICENSE)

CodeRunner: A local sandbox for your AI agents

CodeRunner helps you sandbox your AI agents and its actions inside a sandbox.

Key use case: You can run multiple Claude Code or AI agents in our sandbox without any fear of data loss and exfilteration.

Quick Start

Prerequisites: Mac with macOS and Apple Silicon (M1/M2/M3/M4), Python 3.10+

git clone https://github.com/instavm/coderunner.git
cd coderunner
chmod +x install.sh
./install.sh

Stop and resume

Stop the sandbox when you are done:

container stop coderunner

Resume the same sandbox later, preserving uploads, kernels, and installed packages:

container start coderunner

To start over with a clean sandbox, delete the container and run the installer again:

container delete coderunner && ./install.sh

Run Claude Code inside a Sandbox

./install.sh (if not already done)

container exec -it coderunner /bin/bash

root@coderunner:/app# npm install -g @anthropic-ai/claude-code

Other Integration Options

MCP server will be available at: http://coderunner.local:8222/mcp

Install required packages (use virtualenv and note the python path):

pip install -r examples/requirements.txt
1. Claude Desktop Integration

Configure Claude Desktop to use CodeRunner as an MCP server:

  1. Copy the example configuration:

``bash cd examples cp claude_desktop/claude_desktop_config.example.json claude_desktop/claude_desktop_config.json ``

  1. Edit the configuration file and replace the placeholder paths:
  • Replace /path/to/your/python with your actual Python path (e.g., /usr/bin/python3 or /opt/homebrew/bin/python3)
  • Replace /path/to/coderunner with the actual path to your cloned repository

Example after editing: ``json { "mcpServers": { "coderunner": { "command": "/opt/homebrew/bin/python3", "args": ["/Users/yourname/coderunner/examples/claude_desktop/mcpproxy.py"] } } } ``

  1. Update Claude Desktop configuration:
  • Open Claude Desktop
  • Go to Settings → Developer
  • Add the MCP server configuration
  • Restart Claude Desktop
  1. Start using CodeRunner in Claude:

You can now ask Claude to execute code, and it will run safely in the sandbox!

2. Claude Code CLI

Use CodeRunner with Claude Code CLI for terminal-based AI assistance:

Quick Start:

# 1. Install and start CodeRunner (one-time setup)
git clone https://github.com/instavm/coderunner.git
cd coderunner
sudo ./install.sh

# 2. Install the Claude Code plugin
claude plugin marketplace add https://github.com/instavm/coderunner-plugin
claude plugin install instavm-coderunner

# 3. Reconnect to MCP servers
/mcp

Installation Steps:

  1. Navigate to Plugin Marketplace:
  1. Add the InstaVM repository:
  1. Execute Python code with Claude Code:

That's it! Claude Code now has access to all CodeRunner tools:

  • executepythoncode - Run Python code in persistent Jupyter kernel
  • navigateandgetallvisible_text - Web scraping with Playwright
  • list_skills - List available skills (docx, xlsx, pptx, pdf, image processing, etc.)
  • getskillinfo - Get documentation for specific skills
  • getskillfile - Read skill files and examples

Learn more: See the plugin repository for detailed documentation.

3. OpenCode Configuration

Configure OpenCode to use CodeRunner as an MCP server:

Create or edit ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "coderunner": {
      "type": "remote",
      "url": "http://coderunner.local:8222/mcp",
      "enabled": true
    }
  }
}

After saving the configuration:

  1. Restart OpenCode
  2. CodeRunner tools will be available automatically
  3. Start executing Python code with full access to the sandboxed environment
4. Python OpenAI Agents

Use CodeRunner with OpenAI's Python agents library:

  1. Set your OpenAI API key:

``bash export OPENAI_API_KEY="your-openai-api-key-here" ``

  1. Run the client:

``bash python examples/openai_agents/openai_client.py ``

  1. Start coding:

Enter prompts like "write python code to generate 100 prime numbers" and watch it execute safely in the sandbox!

5. Gemini-CLI

Gemini CLI is recently launched by Google.

~/.gemini/settings.json

{
  "theme": "Default",
  "selectedAuthType": "oauth-personal",
  "mcpServers": {
    "coderunner": {
      "httpUrl": "http://coderunner.local:8222/mcp"
    }
  }
}
6. Kiro by Amazon

Kiro is recently launched by Amazon.

~/.kiro/settings/mcp.json

{
  "mcpServers": {
    "coderunner": {
      "command": "/path/to/venv/bin/python",
      "args": [
        "/path/to/coderunner/examples/claude_desktop/mcpproxy.py"
      ],
      "disabled": false,
      "autoApprove": [
        "execute_python_code"
      ]
    }
  }
}
7. Coderunner-UI (Offline AI Workspace)

Coderunner-UI is our own offline AI workspace tool designed for full privacy and local processing.

coderunner-ui

Security

Code runs in an isolated container with VM-level isolation. Your host system and files outside the sandbox remain protected.

From @apple/container: >Each container has the isolation properties of a full VM, using a minimal set of core utilities and dynamic libraries to reduce resource utilization and attack surface.

Skills System

CodeRunner includes a built-in skills system that provides pre-packaged tools for common tasks. Skills are organized into two categories:

Built-in Public Skills

The following skills are included in every CodeRunner installation:

  • pdf-text-replace - Replace text in fillable PDF forms
  • image-crop-rotate - Crop and rotate images

Using Skills

Skills are accessed through MCP tools:

# List all available skills
result = await list_skills()

# Get documentation for a specific skill
info = await get_skill_info("pdf-text-replace")

# Execute a skill's script
code = """
import subprocess
subprocess.run([
    'python',
    '/app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py',
    '/app/uploads/input.pdf',
    'OLD TEXT',
    'NEW TEXT',
    '/app/uploads/output.pdf'
])
"""
result = await execute_python_code(code)

Adding Custom Skills

Users can add their own skills to the ~/.coderunner/assets/skills/user/ directory:

  1. Create a directory for your skill (e.g., my-custom-skill/)
  2. Add a SKILL.md file with documentation
  3. Add your scripts in a scripts/ subdirectory
  4. Skills will be automatically discovered by the list_skills() tool

Skill Structure:

~/.coderunner/assets/skills/user/my-custom-skill/
├── SKILL.md              # Documentation with usage examples
└── scripts/              # Your Python/bash scripts
    └── process.py

Example: Using the PDF Text Replace Skill

# Inside the container, execute:
python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
    /app/uploads/tax_form.pdf \
    "John Doe" \
    "Jane Smith" \
    /app/uploads/tax_form_updated.pdf

Architecture

CodeRunner consists of:

  • Sandbox Container: Isolated execution environment with Jupyter kernel
  • MCP Server: Handles communication between AI models and the sandbox
  • Skills System: Pre-packaged tools for common tasks (PDF manipulation, image processing, etc.)

Examples

The examples/ directory contains:

  • openai-agents - Example OpenAI agents integration
  • claude-desktop - Example Claude Desktop integration

Building Container Image Tutorial

https://github.com/apple/container/blob/main/docs/tutorial.md

Roadmap

  1. Linux support with Firecracker
  2. Guardrails for external agentic actions
  3. CLI for Coderunner

Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

License

This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.