Set up Agent Mail in Metorial for Claude, ChatGPT and Cursor
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'll 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 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, 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
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Agent Mail.
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:
Employee: connect Agent Mail
In the portal
Open Agent Mail in the catalog
Sign in to your portal and open Agent Mail. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. In the setup window, enter your API key (token).
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
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.
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.
Check it worked
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. NeedsinboxId.get_message: Retrieve the full details of a specific email message including headers, body content, attachments metadata, and extracted text. NeedsinboxIdandmessageId.get_inbox: Retrieve details of a specific email inbox by its ID, including its display name, pod association, and timestamps. NeedsinboxId.list_threads: List email conversation threads in an inbox. NeedsinboxId.list_list_entries: List entries in an email allow or block list. NeedsdirectionandlistType.get_attachment: Get a presigned download URL for an email attachment. NeedsinboxIdandattachmentId.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. NeedsinboxId.get_thread: Retrieve a page of messages from an email thread. NeedsinboxIdandthreadId.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. NeedsinboxIdandmessageId.manage_draft: Create, update, or send an email draft. NeedsactionandinboxId.reply_to_email: Reply to an existing email message. NeedsinboxIdandmessageId.update_inbox: Update an inbox's display name. NeedsinboxIdanddisplayName.send_email: Send a new email from an inbox. NeedsinboxIdandto.create_inbox: Create a new email inbox for an AI agent.forward_email: Forward an existing email message to new recipients. NeedsinboxId,messageIdandto.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. Needsaction.manage_pod: Create or delete a pod for multi-tenant isolation. Needsaction.manage_webhook: Create, update, or delete webhooks for receiving email and domain events. Needsaction.manage_list_entry: Add or remove entries from email allow/block lists. Needsaction,direction,listTypeandentry.delete_draft: Delete an email draft from an inbox. NeedsinboxIdanddraftId.delete_thread: Delete an email thread and all its messages from an inbox. NeedsinboxIdandthreadId.delete_inbox: Permanently delete an email inbox and all its associated data (messages, threads, drafts). NeedsinboxId.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, Cursor, Codex and ChatGPT: connect each client to your portal and use Agent Mail there
- Tool permissions: tool filters and what employees see
- Agent Mail on metorial.com: the integration overview