E2B
Manage E2B cloud sandboxes for AI agents: list, start, inspect, pause, resume and extend sandboxes, read their logs and CPU, memory and disk metrics, and browse the team's templates, builds and snapshots.
7-day free trial · No credit card · EU-hosted
Ask E2B anything
Try a real prompt against E2B via AnythingMCP — Claude calls the tools, returns the answer. Press Enter on your own message to install on Cloud.
Install E2B on CloudClaude is AI and can make mistakes. Please double-check responses.
Setup in 2 minutes
- 1Start a free trial on cloud.anythingmcp.com.
- 2Click E2B in the connector store. Paste credentials when prompted.
- 3Mint an MCP API key and point your AI client at the generated MCP URL.
Guides for E2B
Step-by-step setup for the most popular AI clients.
Setting up E2B
From the connector definition itself: where to find the credentials, what they need to be allowed to do, and which API this adapter talks to.
E2B
This connector uses the E2B control-plane API (https://api.e2b.app): it manages the team's cloud sandboxes (small isolated Linux VMs that AI agents use to run code), reads their logs and resource metrics, and lists templates, builds and snapshots.
Paid calls: e2b_create_sandbox starts a sandbox and e2b_resume_sandbox restarts a paused one; a running sandbox is billed per second for its CPU and memory until it times out, is paused or is killed. e2b_set_sandbox_timeout extends that time. Confirm with the user before starting sandboxes or extending them, keep timeout short, and pause or let them expire when done. Reads cost nothing.
Setup (2 minutes)
- Sign in at https://e2b.dev/dashboard.
- Open Keys (https://e2b.dev/dashboard?tab=keys) and copy a team API key (it starts with
e2b_). - Paste it into
E2B_API_KEY. It is sent in theX-API-Keyheader. - Run
e2b_list_sandboxesto check it.
Workflow
- Templates:
e2b_list_default_templatesshows E2B's ready-made templates (e.g.base,code-interpreter-v1,desktop) with CPU, memory and disk;e2b_list_templatesthe team's own templates with aliases, build status and spawn counts;e2b_list_template_buildsthe builds of one template. - Start:
e2b_create_sandboxwithtemplate_id(template id or alias, defaultbase), atimeoutin seconds (default 300), optionalmetadata(string key-value pairs to find it again),env_vars,auto_pauseandallow_internet_access. The answer has thesandboxIDanddomain. - Inspect:
e2b_list_sandboxes(filter bystaterunning or paused,template,metadatasuch asuser=abc&app=prod,started_after);e2b_get_sandboxfor one sandbox's template, resources, start and end time, state and network settings;e2b_get_sandbox_logsfor its system and process logs;e2b_get_sandbox_metricsfor CPU, memory and disk use over time. - Lifecycle:
e2b_set_sandbox_timeoutsets a new end time counted from now (the plan caps it: 1 hour on Hobby, 24 hours on Pro);e2b_pause_sandboxfreezes it with its memory and files (paused sandboxes are not billed for compute);e2b_resume_sandboxresumes a paused sandbox (or just extends a running one);e2b_list_snapshotslists saved snapshots.
Switched off at install: e2b_kill_sandbox; it cannot be undone (the sandbox and its files are gone), so an admin switches it on when the team needs it.
Running code inside a sandbox is not part of this connector. Commands, files and the code interpreter are served by the sandbox itself (its envd agent on https://<port>-<sandboxID>.e2b.app), not by this API: every sandbox has its own host and its own access token, process output is streamed, and the team API key must not be sent into a sandbox where generated code runs. Use the E2B SDKs (e2b, @e2b/code-interpreter) for that, or point the agent at a tool that wraps them.
Reading answers: times are ISO 8601, UTC; metric timestamps and log cursor values are Unix (metrics start and end in seconds, log cursors in milliseconds). cpuCount is vCPUs, memoryMB and diskSizeMB megabytes. The sandbox access tokens are removed from answers.
Paging: e2b_list_sandboxes, e2b_list_templates, e2b_list_template_builds and e2b_list_snapshots return the next page token in _headers.x-next-token (the list itself is under data when the answer is a list); pass it as next_token until it is missing. e2b_list_sandboxes also returns _headers.x-total-running.
Errors: 400 bad parameter (e.g. a timeout over the plan's maximum); 401 invalid key; 403 the team may not use the template; 404 unknown sandbox or template (a sandbox that timed out is gone); 409 the sandbox is already paused or being paused; 429 too many concurrent sandboxes or requests, wait and do not loop; 500 and 503 E2B-side errors.
Your AI is two clicks away from E2B.
Install the connector, paste your credentials, ask your AI a question. 7-day free trial, no credit card.