runloop-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@runloop-mcpCreate a devbox and run 'python3 --version'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
runloop-mcp
A FastMCP server that exposes Runloop Devbox operations as Model Context Protocol (MCP) tools. It uses the official runloop-api-client Python SDK and lets AI agents (Claude, Cursor, etc.) create and manage isolated Linux sandboxes, run commands, edit files, snapshot disks, and drive interactive PTY sessions.
Features
Category | Tools |
Devbox lifecycle |
|
Execution & files |
|
Snapshots |
|
Interactive PTY |
|
Related MCP server: mcp-devtools
Requirements
Python 3.10+
A Runloop API key — get one at app.runloop.ai
Installation
# Clone
git clone https://github.com/contributory/runloop-mcp.git
cd runloop-mcp
# (Optional) virtual environment
python -m venv .venv && source .venv/bin/activate
# Install
pip install -e .
# Set your API key
export RUNLOOP_API_KEY=your_runloop_api_key_hereUsage
stdio transport (default, for local MCP clients)
runloop-mcp
# or
python -m runloop_mcpHTTP/SSE transport (for remote MCP clients)
runloop-mcp --transport http --host 0.0.0.0 --port 8000Running from Python
from runloop_mcp import mcp
if __name__ == "__main__":
mcp.run(transport="stdio")Connecting from an MCP client
Configure Claude Desktop / Cursor with the command, e.g.:
{
"mcpServers": {
"runloop": {
"command": "runloop-mcp",
"env": { "RUNLOOP_API_KEY": "your_runloop_api_key_here" }
}
}
}Examples
The tools mirror the Runloop SDK. Some examples:
# Create a devbox
create_devbox(
name="my-agent-box",
blueprint_name="runloop/universal-ubuntu-24.04-x86_64",
resource_size="SMALL",
)
# List running devboxes
list_devboxes(status="running")
# Execute a command (blocking)
execute_command(devbox_id="dev_...", command="python3 --version")
# Write a file
write_file(devbox_id="dev_...", file_path="/home/user/app.py", contents="print('hi')")
# Snapshot the disk
create_snapshot(devbox_id="dev_...", name="before-refactor")
# Suspend / resume
suspend_devbox(devbox_id="dev_...")
resume_devbox(devbox_id="dev_...")
# Interactive PTY
pty_send_command(session_name="repl", command="python3 -i", max_wait=30.0)See examples/example.py for a complete walkthrough.
Tools reference
Devbox lifecycle
create_devbox— create a devbox with optional blueprint, snapshot, env vars, file mounts, launch commands, instance size, architecture, TTL, and idle lifecycle policy.list_devboxes— list devboxes, optionally filtered bystatus.get_devbox— retrieve a single devbox by id.update_devbox— update a devbox'snameand/ormetadata.suspend_devbox— suspend a devbox (disk state preserved).resume_devbox— resume a suspended devbox.shutdown_devbox— shut down / delete a devbox.
Execution & files
execute_command— run a command and block until completion, returningstdout,stderr,exit_status. Optionalshell_namegives you a stateful named shell.execute_command_async— start a command and return immediately with anexecution_id(use for long-running servers/watchers).write_file— create or overwrite a file on a devbox.read_file— read a file's contents from a devbox.
Snapshots
create_snapshot— snapshot a devbox's disk (synchronous).list_snapshots— list disk snapshots, optionally filtered by devbox.
PTY sessions
pty_connect— create or reconnect to an interactive PTY session; returns the WebSocketconnect_url.pty_send_command— send a command through the PTY WebSocket and capture output (for TTY-aware programs, REPLs, TUIs).pty_control— resize the terminal, deliver a POSIXsignal, orclosethe session.
Notes & gotchas
Prefer
execute_commandfor normal, non-interactive commands; PTY is heavier and intended for true interactive use.Each
execute_commandspawns an isolated shell unless you reuse ashell_name.Background processes started in
launch_commandsmust redirect output (> /tmp/out.log 2>&1 &) or the devbox will never become active.Only one WebSocket client may attach to a PTY session at a time.
Snapshots and suspended devboxes accrue storage charges until deleted/shut down.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server for managing Incus virtual machines through structured tools for command execution, file management, and snapshot operations. It enables AI agents to puppeteer VMs on a masternode by wrapping the Incus CLI.9
- AlicenseBqualityDmaintenanceProduction-grade MCP server that gives AI agents safe access to your local dev environment: filesystem, databases, processes, and OpenAPI specs.15323MIT
- FlicenseCqualityCmaintenanceA security-first MCP server that provides LLMs with structured tools for filesystem, process, search, build/test/lint, IDE integration, and more.402
- FlicenseAqualityCmaintenanceA simple MCP server that exposes a terminal tool, allowing AI agents to execute shell commands.1
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server exposing the Backtest360 engine API as tools for AI agents.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/contributory/runloop-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server