How to integrate E2b MCP with Atomic Agent

Connect Atomic Agent to E2b MCP. Run a python script to analyze csv data, execute javascript code to validate user input, and more using natural language, with authentication handled for you.

E2b logoE2b
Api Key

E2b is an open-source platform for running code in secure, sandboxed environments. It enables safe multi-language code execution for AI-powered apps.

59 Tools

Introduction

Atomic Agent is an open-source AI agent that runs on your machine and supports local models through llama.cpp. Connect it to 1,700+ apps through Composio, including E2b.

This guide uses Atomic Agent's built-in Composio integration. You need Atomic Agent v0.5.6 or later, your own Composio API key, and a E2b account. See the Atomic Agent documentation for installation instructions.

For exact tool slugs and parameter tables, see the tool catalog in the Composio docs.

Also integrate E2b with

How Atomic Agent connects to E2b

Atomic Agent connects to Composio's Tool Router over Streamable HTTP MCP. It discovers the tools needed for your request, and Composio handles account authentication.

Execution and account-connection tools follow Atomic Agent's configured approval policy. Review any approval prompt before allowing an action on your connected account.

Connect E2b to Atomic Agent

  1. Sign up or sign in to the Composio dashboard. Copy your API key.
  2. In Atomic Agent, open the Integrations tab and select Composio. Select API key, press e, paste the key, and press Enter. The tools become available immediately, without a restart.
  3. Ask Atomic Agent to do something in E2b. It searches Composio for the right tool.
  4. On first use, open the sign-in link returned in the chat. Connect your E2b account, then return to Atomic Agent to continue.

Headless setup

Add the following line to ~/.atomic-agent/.env, replacing YOUR_COMPOSIO_API_KEY with your key. Start Atomic Agent after saving the file.

bash
COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY

What is the E2b MCP server, and what's possible with it?

The E2b MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your E2b account. It provides structured and secure access to your sandboxes, templates, and webhooks, so your agent can create and manage sandboxes, configure templates, control sandbox lifecycles, and manage webhook notifications on your behalf.

  • Sandbox creation and monitoring: Have your agent create sandboxes from templates, connect to existing environments, inspect sandbox details, and list active or paused sandboxes.
  • Sandbox lifecycle control: Let the agent pause, refresh, or permanently delete sandboxes based on your development and testing needs.
  • Timeout management: Direct your agent to set sandbox timeouts and extend how long an active environment remains available.
  • Template creation and builds: Instruct your agent to create sandbox templates, review available templates, and start template builds with your chosen configuration.
  • Lifecycle event notifications: Have your agent register, review, list, or remove webhooks that receive sandbox lifecycle events for your team.

Use E2b from Atomic Agent

With your account connected, ask Atomic Agent to work with E2b in natural language. You can connect more apps through the same Composio integration as you need them.

Visit the Atomic Agent website or inspect the Atomic Agent source code.

Troubleshooting

Why is my API key rejected?

Copy the key directly from the Composio dashboard. Atomic Agent requires ASCII characters because it sends the key in an HTTP header. Remove any extra characters introduced when copying.

Why are Composio tools unavailable after saving a key?

Check that you use Atomic Agent v0.5.6 or later and that Composio is enabled in your configuration. A "composio": { "enabled": false } setting disables the integration while keeping the saved key on disk.

Does Composio have a free plan?

The Hobby plan includes 100,000 tool calls per month. Composio-managed OAuth apps have a lower included allowance. See Composio pricing for the current limits that apply to your connection.

TOOLS

Supported Tools

Every E2b action and event your agent gets out of the box.

Assign Template Tags

Assign tags to an existing E2B template build identified by a name:tag target.

Check Template Alias

Check whether an E2B template alias exists and return its template ID and visibility.

Check Template Tag

Check whether an E2B template tag has at least one ready build.

Connect to Sandbox

Tool to connect to an existing E2B sandbox and retrieve its details.

Connect to Sandbox (V2)

Connect to an existing E2B sandbox and return its details, resuming it if paused.

Count Template Tags

Count distinct tags of an E2B template that have at least one ready build.

Create Secured Sandbox (V2)

Create a sandbox from a template using POST /v2/sandboxes.

Create Sandbox Snapshot

Create a persistent snapshot from an existing E2B sandbox's current state.

Create Template

Tool to create a new E2B template with specified configuration.

Create Volume

Create a new E2B team volume and return its identifier and content access token.

Create Webhook

Tool to register a new webhook to receive sandbox lifecycle events for the team.

Delete Sandbox

Tool to terminate and permanently delete a running E2B sandbox instance.

Delete Template

Permanently delete an E2B template that is no longer needed.

Delete Template Tags

Delete multiple tags from a named E2B template.

Delete Volume

Delete an existing E2B team volume by its identifier.

Delete Webhook

Tool to unregister a webhook and stop receiving lifecycle events.

Fork Sandbox

Fork a running E2B sandbox by briefly pausing it, taking a full-memory snapshot, and resuming it with its ID and expiration unchanged.

Check API Health

Tool to check the health status of the E2B API.

Get Sandbox

Tool to retrieve detailed information about a specific sandbox by its ID.

Get Sandbox Logs

Tool to retrieve logs from a specific E2B sandbox instance.

Get Sandbox Lifecycle Events

Retrieve lifecycle events for a specific sandbox, with pagination and sort options.

Get Sandbox Logs V2

Retrieve structured logs for an existing E2B sandbox using the v2 API.

Get Sandbox Metrics

Tool to retrieve timestamped CPU, memory, and disk usage metrics for a sandbox.

Get Secret

Get an existing secret's metadata by identifier or canonical lower-case name.

Get Team Metrics

Retrieve timestamped team metrics, including concurrent sandbox counts and sandbox start rates, with optional time bounds.

Get Team Maximum Metrics

Tool to retrieve the maximum value for a specific team metric in a given interval.

Get Template Build Logs

Retrieve structured logs for an existing E2B template build.

Get Template Build Status

Tool to get the status of a template build.

Get Template Files

Tool to get an upload link for a tar file containing build layer files.

Get Volume

Get a team volume's ID, name, content auth token and optional BYOC domain.

Get Webhook Configuration

Tool to retrieve the current webhook configuration for a specific webhook.

Get Webhook Stats

Get aggregate delivery counts, failures, durations, and time buckets for an existing webhook.

List API Keys

List all API keys for the selected team, including masked key details.

List Default Templates

List platform default templates, ordered by template ID, excluding deleted templates.

List All Sandboxes

List team sandboxes with state and metadata filters, a page size, and an optional pagination token.

List Sandboxes Metrics

Retrieve timestamped CPU, memory, and disk usage metrics for multiple sandboxes, keyed by sandbox ID.

List Sandboxes V2

List a page of team sandboxes using GET /v2/sandboxes with optional filters.

List Secrets

List a page of the project's secret metadata, without stored secret values.

List Snapshots

List a page of team snapshots, optionally filtered by source sandbox or name.

List Teams

List all teams for the authenticated user, including their API keys.

List Team Sandbox Lifecycle Events

Tool to retrieve the latest lifecycle events across all sandboxes associated with the team.

List Template Builds

List a page of builds for an existing E2B template, including template metadata.

List All Templates

Tool to list all available E2B templates for your team.

List Templates V2

List a page of E2B templates using GET /v2/templates, optionally selecting a team.

List Template Tag Assignments

List one page of ready build assignments for an E2B template tag, newest first.

List Template Tag Groups

List a page of E2B template tags with their most recent ready assignments.

List Template Tags

List all tags for an existing E2B template, including build IDs and assignment times.

List Volumes

List all volumes belonging to the authenticated team.

List Webhook Deliveries

List a page of delivery attempts for an existing team webhook, grouped by event.

List All Webhooks

Tool to retrieve all registered webhooks for your team.

Pause Sandbox

Tool to pause a running E2B sandbox preserving its filesystem and memory state.

Create Sandbox

Tool to create a new E2B sandbox from a template.

Set Sandbox Timeout

Tool to set the timeout for an E2B sandbox.

Refresh Sandbox

Tool to refresh an E2B sandbox and extend its time to live.

Start Template Build

Start a build for an E2B template with specific configuration.

Update Sandbox Network

Replace the network configuration of a running E2B sandbox.

Update Template

Update an E2B template's public or private visibility by template ID.

Update Template (V2)

Update an existing E2B template's public or team-only visibility using the v2 API and return its names.

Update Webhook Configuration

Tool to update an existing webhook configuration including URL, enabled status, and subscribed events.

FAQ

Frequently asked questions

Start with E2b.It takes 30 seconds.

Managed auth, hosted MCP servers, and every E2b tool your agent needs.Free to start.

Start building