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

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

Share Agent Mail with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 33 tools (17 read-only).

---

To give your team Agent Mail in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Agent Mail integration in a Metorial portal, and each person connects with an API key. Agents can create and manage email inboxes for AI agents to send, receive, and reply to emails programmatically. The integration has 33 tools, 17 read-only, 8 write and 8 destructive, plus 2 triggers.

**What you will learn**

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

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An API key from Agent Mail 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 | `token` |

### API Key

To connect, a person enters:

- `token`: AgentMail API key (starts with am_). Get yours from the AgentMail Console at https://console.agentmail.to

### Setup settings

Setup also asks for:

- `podId` (optional): Pod ID to scope all operations to a specific pod for multi-tenant setups

## Admin: share Agent Mail 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 Agent Mail. 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 Agent Mail.

4. **Choose who gets it**

   Add the access groups that should see Agent Mail. 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 Agent Mail integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search "agent mail"
```

## Employee: connect Agent Mail

### In the portal

1. **Open Agent Mail in the catalog**

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

2. **Authenticate**

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

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 "agent mail"
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Agent Mail 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 "agent mail"
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 17 read-only tools, such as `get_draft` and `get_inbox`, and lose the 8 write tools, such as `send_email` or `create_inbox`, and the 8 destructive tools, such as `manage_pod` or `delete_draft`.

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 "agent mail"
metorial tools <integration-id>
metorial call <integration-id> list_list_entries -d '{"direction":"send","listType":"allow"}'
```

`metorial tools` lists the 33 tools, minus any you rejected. `list_list_entries` needs `direction` and `listType`, so replace the placeholders. It lists entries in an email allow or block list.

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

## Tools

### Read-only tools (17)

- `list_drafts`: List email drafts in an inbox. Needs `inboxId`.
- `get_message`: Retrieve the full details of a specific email message including headers, body content, attachments metadata, and extracted text. Needs `inboxId` and `messageId`.
- `get_inbox`: Retrieve details of a specific email inbox by its ID, including its display name, pod association, and timestamps. Needs `inboxId`.
- `list_threads`: List email conversation threads in an inbox. Needs `inboxId`.
- `list_list_entries`: List entries in an email allow or block list. Needs `direction` and `listType`.
- `get_attachment`: Get a presigned download URL for an email attachment. Needs `inboxId` and `attachmentId`.
- `list_pods`: List all pods in the account.
- `list_messages`: List email messages in an inbox with filtering by labels, date range, and inclusion of spam/blocked/trash. Needs `inboxId`.
- `get_thread`: Retrieve a page of messages from an email thread. Needs `inboxId` and `threadId`.
- `list_domains`: List all custom email domains in the account with their verification status and DNS records.
- `list_inboxes`: List all email inboxes in the account.
- `get_domain`: Read a custom email domain, its current verification status, DNS records, and diagnostic reason without starting verification.
- `get_draft`: Read an email draft, including its complete body, recipients, labels, attachments, and scheduled send state before editing or sending it.
- `search_messages`: Find email messages by sender, recipients, subject, and body text, ranked by relevance.
- `list_webhooks`: Discover existing email webhooks, their delivery URLs, event subscriptions, enabled state, and pod or inbox filters before updating or deleting them.
- `get_raw_message`: Download the original MIME email as an EML file, including its original headers and complete message structure.
- `search_threads`: Find email threads by sender, recipients, subject, and body text, ranked by relevance.

### Write tools (8)

- `update_message_labels`: Add or remove labels from an email message. Needs `inboxId` and `messageId`.
- `manage_draft`: Create, update, or send an email draft. Needs `action` and `inboxId`.
- `reply_to_email`: Reply to an existing email message. Needs `inboxId` and `messageId`.
- `update_inbox`: Update an inbox's display name. Needs `inboxId` and `displayName`.
- `send_email`: Send a new email from an inbox. Needs `inboxId` and `to`.
- `create_inbox`: Create a new email inbox for an AI agent.
- `forward_email`: Forward an existing email message to new recipients. Needs `inboxId`, `messageId` and `to`.
- `update_thread_labels`: Add or remove custom labels on every message in a thread.

### Destructive tools (8)

- `manage_domain`: Create, verify, or delete a custom email domain. Needs `action`.
- `manage_pod`: Create or delete a pod for multi-tenant isolation. Needs `action`.
- `manage_webhook`: Create, update, or delete webhooks for receiving email and domain events. Needs `action`.
- `manage_list_entry`: Add or remove entries from email allow/block lists. Needs `action`, `direction`, `listType` and `entry`.
- `delete_draft`: Delete an email draft from an inbox. Needs `inboxId` and `draftId`.
- `delete_thread`: Delete an email thread and all its messages from an inbox. Needs `inboxId` and `threadId`.
- `delete_inbox`: Permanently delete an email inbox and all its associated data (messages, threads, drafts). Needs `inboxId`.
- `delete_message`: Permanently delete a single email message from an inbox.

## Triggers

Agent Mail has 2 triggers, which fire on events in Agent Mail:

- `message_events`: Triggered when email message events occur: received, sent, delivered, bounced, complained, or rejected.
- `domain_events`: Triggered when a custom domain is successfully verified and ready to use for sending emails.

## 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 Agent Mail there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Agent Mail on metorial.com](https://metorial.com/integrations/agent-mail): the integration overview