AI Agents Accessible APIsCode execution sandboxes

Code execution sandboxes APIs and MCP servers for AI agents

Isolated cloud environments where an agent can run code, shells and whole dev environments safely.

10 code execution sandboxes APIs an AI agent can call: auth method and header, official MCP server (6), free tier (5), docs links. Machine-readable JSON included. Agents: fetch catalog/code-execution-sandbox.json instead of parsing this page. Last checked 2026-09-24.

Ratings and usage (★) fetched: .

ServiceWhat an agent can doAuthMCP serverFree tierDetails (with sources)NotesProof (ratings, usage)
Cloudflare Sandbox SDKDeploy a Cloudflare Worker embedding this SDK to run untrusted code in per-request container sandboxes.API key
Cloudflare API token to deploy the Worker; the sandbox itself is reached through your own deployed Worker route
officialrequires Workers Paid plan ($5/mo) for Containers; no free tier for container-backed sandboxesBase URL: https://api.cloudflare.com/client/v4
Free plan: none ↗
Rate limits: Worker subrequests per request: 50 on Free, 1,000 on Paid (HTTP transport); RPC transport avoids extra subrequests ↗
MCP tools: 7: container_initialize, container_ping, container_file_write, container_files_list, container_file_read, container_file_delete … ↗
Not a hosted API called directly with a key - you deploy your own Worker using the SDK on Cloudflare Containers/Durable Objects. The official Container MCP is a generic sandbox, not a Sandbox SDK wrapper.—
CodeSandbox SDKProgrammatically create, resume, and control cloud VM sandboxes to run and preview AI-written code.API key
CSB_API_KEY env var, passed to the CodeSandbox() SDK constructor
—Free plan: 400 VM credits/mo (~40 Nano-VM hrs), up to 10 concurrent VMsBase URL: https://api.codesandbox.ioAlso powers Together AI's white-labeled 'Code Sandbox' product; unofficial community MCP wrappers exist but none vendor-maintained.—
DaytonaCreate elastic remote sandboxes via SDK/API to run AI-generated code with sub-second startup.API key
Authorization: Bearer <DAYTONA_API_KEY>
officialTrial: $200 free compute credit one-time on signup, no credit card required; first 5 GiB storage free; startup program up to $50k creditsBase URL: https://app.daytona.io/api
Free plan: $200 free compute; first 5 GiB storage free, one-time, no card ↗
Rate limits: Tier 1: 10,000 general requests/min, 300 sandbox creations/min, 10,000 lifecycle ops/min; higher tiers up to 50,000/600/50,000 ↗
Example call: create a sandbox: POST https://app.daytona.io/api/sandbox ↗
Unit price: billed per second: $0.0504 per vCPU-hour, $0.0162 per GiB RAM-hour, $0.000108 per GiB disk-hour (first 5 GiB free) ↗
Billed per second; supports sandbox snapshots and preview URLs for web apps. Official MCP server runs locally via the Daytona CLI (daytona mcp start); no hosted endpoint.—
E2BSpin up isolated Firecracker cloud sandboxes via SDK/REST to execute AI-generated code and return results.API key
E2B_API_KEY env var / X-API-Key: <key> header (Bearer works only together with an X-Team-ID header)
officialTrial: one-time $100 usage credit on signup (Hobby, no card); up to 1 h per sandbox, 20 concurrent; then pay-as-you-goBase URL: https://api.e2b.app
Free plan: One-time $100 in usage credits; up to 1 hour per sandbox session, 20 concurrent sandboxes, one-time, no card ↗
Rate limits: Hobby: 1 sandbox creation/sec, 20 concurrent sandboxes, max 1 hour continuous runtime ↗
Example call: create a sandbox: POST https://api.e2b.app/v2/sandboxes ↗
Unit price: Per running second: $0.000014 per vCPU + $0.0000045 per GiB RAM (default 2 vCPU = $0.000028/s CPU) ↗
Sandboxes auto-expire after a configurable timeout (default ~5 min); used by many agent frameworks (OpenHands, etc.). The e2b-dev/mcp-server repo was archived and deprecated on 2026-04-16.GitHub 394★ e2b-dev/mcp-server
Judge0Submit source code and stdin via REST to compile/run it in 60+ languages and poll for the result.API key
X-Auth-Token header (self-hosted, if enabled) or X-RapidAPI-Key (RapidAPI-hosted); can run with none if self-hosted unauthenticated
—Paid only on Judge0 Cloud (Pro EUR 27/mo for 2,000 submissions/day and up); self-host free & open-source (GPLv3)Base URL: https://ce.judge0.com
Rate limits: Cloud plans: Pro 2,000, Ultra 5,000, Mega 10,000 submissions/day; extra submissions EUR 0.001 each ↗
Async jobs: POST /submissions returns a token; poll GET /submissions/{token} (wait=true for sync where enabled) ↗
Built for compile-run-compare judging (like competitive programming), not long-lived interactive agent sandboxes; self-hosting recommended for production agent use.—
PistonCall a free public REST API to compile and run code in 70+ languages inside isolated containers.API key
authorization token for the public emkc.org instance, granted by EngineerMan (Discord) only for non-commercial educational projects; none when self-hosted
—Free: self-host (open source); public emkc.org API no longer open since 2026-02-15, token only for non-commercial educational projectsBase URL: https://emkc.org/api/v2/pistonPublic emkc.org instance closed to open use on 2026-02-15; self-host via Docker for agent workloads. Widely used by Discord/Slack bots.GitHub 2,823★ engineer-man/piston
RizaCall a REST API to execute untrusted Python/JS/Ruby/PHP code in sandboxes that start in under 10ms.API key
Authorization: Bearer <RIZA_API_KEY>
officialFree tier: Hobby plan free forever, 100,000 requests/month, 30 s execution limit; then usage-based pricingBase URL: https://api.riza.io
Free plan: 100,000 requests/month (Hobby, free forever), 30 s execution limit, no card ↗
Rate limits: Hobby: 100,000 requests/month, 30 s max execution, 128 MB memory per invocation ↗
Example call: execute untrusted Python code in a sandbox: POST https://api.riza.io/v1/execute ↗
MCP tools: 6: create_tool, fetch_tool, execute_tool, edit_tool, list_tools, execute_code ↗
Also supports saving reusable 'tools' (functions) via a Tools API for repeated agent calls.—
RunloopCreate, snapshot, suspend/resume, and run commands in Linux Devboxes via API/SDK for agent coding tasks.API key
Authorization: Bearer <RUNLOOP_API_KEY> (auto-loaded from RUNLOOP_API_KEY env var)
official$50 free credits on signup, then usage-based ($0.108/CPU-hr, $0.0252/GB-hr)Base URL: https://api.runloop.ai
Free plan: $50 in credits; trial limits 3 running devboxes, 5 blueprints, 10 snapshots, one-time, no card ↗
Example call: create a devbox: POST https://api.runloop.ai/v1/devboxes ↗
Unit price: Devbox: $0.108 per CPU-hour + $0.0252 per GB-hour memory; blueprint build $0.252/hour ↗
Official local MCP server @runloop/api-client-mcp (npx, RUNLOOP_API_KEY) exposes the Runloop API; the 'MCP Hub' feature lets Devboxes connect outward to other MCP servers.—
Vercel SandboxBoot ephemeral Firecracker microVMs via SDK/REST to run agent- or AI-generated code and shell commands.API key / OAuth
VERCEL_OIDC_TOKEN (recommended, auto on Vercel) or VERCEL_TOKEN Bearer + team/project IDs
officialusage included on Hobby plan, otherwise usage-based on Pro/EnterpriseBase URL: https://api.vercel.com
Free plan: Hobby: 5 h Active CPU, 420 GB-h memory, 5,000 creations, 20 GB data transfer; paused when exceeded, per month ↗
Rate limits: Hobby: 10 concurrent sandboxes, 45 min max session, 20-40 vCPUs/min allocation, 1,000 control-plane req/min; Pro: 10,000 concurrent, 24 h ↗
Example call: create a sandbox microVM: POST https://api.vercel.com/v4/sandboxes?teamId={teamId} ↗
Unit price: Pro: $0.60 per 1M sandbox creations + $0.128 per active CPU hour + $0.0212 per GB-hour of memory (iad1); Hobby includes 5,000 creations and 5 CPU hours/month ↗
Pricing = active CPU + provisioned memory + per Sandbox.create() call + data transfer; 64 GB ephemeral NVMe per sandbox (SDK 3.0.0+ and custom images).—

Other categories