> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up E2B in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/e2b
Last updated: 2026-11-24

Share E2B with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 20 tools (8 read-only).

---

To give your team E2B in Claude, ChatGPT, Cursor and other AI clients, an admin shares the E2B integration in a Metorial portal, and each person connects with an API key. Agents can create, inspect, pause, resume, and terminate secure Linux cloud sandboxes. The integration has 20 tools, 8 read-only, 8 write and 4 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares E2B in a portal and how each person connects
- What E2B asks for when you connect, and where to find it
- How to keep the 8 read-only tools and reject the other 12

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An API key from E2B for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

| Method | Type | What a person provides |
| --- | --- | --- |
| **API Key** | API token | `apiKey` |

### API Key

To connect, a person enters:

- `apiKey`: Your E2B API key (prefixed with e2b_). Obtain it from the E2B dashboard.

## Admin: share E2B in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose E2B. For how members connect, choose **Each person connects** so everyone enters their own API key, or **Shared connection** to enter one API key for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from E2B.

4. **Choose who gets it**

   Add the access groups that should see E2B. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user E2B integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search e2b
```

## Employee: connect E2B

### In the portal

1. **Open E2B in the catalog**

   Sign in to your portal and open E2B. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your API key (apiKey).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search e2b
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your E2B connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list e2b
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 8 read-only tools, such as `get_sandbox` and `get_webhook`, and lose the 8 write tools, such as `create_volume` or `pause_sandbox`, and the 4 destructive tools, such as `kill_sandbox` or `delete_volume`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list e2b
metorial tools <integration-id>
metorial call <integration-id> list_volumes -d '{}'
```

`metorial tools` lists the 20 tools, minus any you rejected. `list_volumes` takes no input. It lists all storage volumes available to the authenticated team.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (8)

- `list_webhooks`: List all registered webhooks for sandbox lifecycle events on the authenticated team.
- `list_sandboxes`: List sandboxes associated with the authenticated team.
- `get_lifecycle_events`: Retrieve sandbox lifecycle events.
- `list_snapshots`: List persistent snapshots.
- `list_templates`: List all sandbox templates available to the authenticated team.
- `list_volumes`: List all storage volumes available to the authenticated team.
- `get_sandbox`: Retrieve detailed information about a specific sandbox by its ID, including its state, resource allocation, template, timeout, and metadata. Needs `sandboxId`.
- `get_webhook`: Read the configuration of one sandbox lifecycle webhook.

### Write tools (8)

- `update_webhook`: Update an existing webhook's configuration. Needs `webhookId`.
- `create_webhook`: Register a new webhook to receive notifications for sandbox lifecycle events. Needs `name`, `url` and `events`.
- `create_volume`: Create a new persistent storage volume. Needs `name`.
- `create_sandbox`: Create a new E2B cloud sandbox environment.
- `set_sandbox_timeout`: Extend or reduce the timeout of a running sandbox. Needs `sandboxId` and `timeout`.
- `pause_sandbox`: Pause a running sandbox, preserving its full state including filesystem, memory, and running processes. Needs `sandboxId`.
- `resume_sandbox`: Resume a paused sandbox, restoring it to its previous state including filesystem, memory, and running processes. Needs `sandboxId`.
- `create_snapshot`: Create a persistent snapshot of a running sandbox's state. Needs `sandboxId`.

### Destructive tools (4)

- `delete_volume`: Permanently delete a storage volume. Needs `volumeId`.
- `delete_template`: Permanently delete a sandbox template. Needs `templateId`.
- `delete_webhook`: Permanently delete a registered webhook. Needs `webhookId`.
- `kill_sandbox`: Permanently terminate a running or paused sandbox. Needs `sandboxId`.

## Triggers

E2B has 1 trigger, which fire on events in E2B:

- `sandbox_lifecycle`: Receive real-time notifications for sandbox lifecycle events including creation, termination, updates, pause, resume, and snapshots.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use E2B there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [E2B on metorial.com](https://metorial.com/integrations/e2b): the integration overview