Skip to content

MCP Server

Terminal window
pip install isorun[mcp]

The package ships an MCP server CLI named isorun-mcp that any Model Context Protocol client can drive — Claude Desktop, Cursor, Zed, or anything else that speaks MCP. The server exposes the canonical isorun primitives as MCP tools:

ToolWhat it does
create_sandboxBoot a fresh sandbox, return its ID
execRun a command in a sandbox
hibernatePause a sandbox to disk, free runner resources
resumeBring a hibernated sandbox back
checkpointSnapshot a running sandbox to a named ID
restoreCreate a new sandbox from a snapshot
urlPublic URL for an in-sandbox port
destroy_sandboxFree a sandbox + return CPU/mem usage
list_sandboxesList all live sandboxes for the API key

Sandboxes created via create_sandbox are cached in the MCP server process so subsequent tool calls in the same conversation can refer to the same sandbox by ID — the model can create_sandbox, run multiple exec calls, then destroy_sandbox when done.

Wiring into Claude Desktop

Add the server to claude_desktop_config.json:

{
"mcpServers": {
"isorun": {
"command": "isorun-mcp",
"env": {
"ISORUN_API_KEY": "isorun_live_<region>_<id>_<hmac>"
}
}
}
}

Restart Claude. The model now has access to isorun:create_sandbox, isorun:exec, isorun:hibernate, etc. as native tools.

Wiring into Cursor

Add to ~/.cursor/mcp.json (or your project’s .cursor/mcp.json):

{
"mcpServers": {
"isorun": {
"command": "isorun-mcp",
"env": { "ISORUN_API_KEY": "isorun_live_<region>_<id>_<hmac>" }
}
}
}

Wiring into Zed

Add to settings.json:

{
"context_servers": {
"isorun": {
"source": "custom",
"command": {
"path": "isorun-mcp",
"env": { "ISORUN_API_KEY": "isorun_live_<region>_<id>_<hmac>" }
}
}
}
}

Embedding the server in your own MCP host

The build_server() function returns the configured mcp.server.Server without binding it to stdio — useful if you want to compose isorun’s tool surface with your own tools inside a single MCP server process.

from isorun.integrations.mcp_server import build_server
import asyncio
from mcp.server.stdio import stdio_server
async def main():
server = build_server()
# Add your own tools here:
# @server.list_tools()
# async def list_more_tools(): ...
# @server.call_tool()
# async def call_more_tools(name, args): ...
async with stdio_server() as (r, w):
await server.run(r, w, server.create_initialization_options())
asyncio.run(main())