How to integrate Agent mail MCP with Atomic Agent

Connect Atomic Agent to Agent mail MCP. Show me unread emails from today, send a status update to your team, and more using natural language, with authentication handled for you.

Agent mail logoAgent mail
Api Key

Agent mail provides AI agents with dedicated email inboxes for sending, receiving, and managing emails. It empowers agents to communicate autonomously with people, services, and other agents—no human intervention needed.

93 Tools1 Triggers

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,500+ apps through Composio, including Agent mail.

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 Agent mail account. See the Atomic Agent documentation for installation instructions.

Also integrate Agent mail with

How Atomic Agent connects to Agent mail

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 Agent mail 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 Agent mail. It searches Composio for the right tool.
  4. On first use, open the sign-in link returned in the chat. Connect your Agent mail 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 Agent mail MCP server, and what's possible with it?

The Agent mail MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Agent mail account. It provides structured and secure access to your agent's dedicated inbox, so your agent can send emails, receive incoming messages, fetch specific conversations, and automate email-based workflows on your behalf.

  • Automated email sending: Instruct your agent to compose and send emails to any recipient, perfect for status updates, notifications, or outreach.
  • Message listing and inbox scanning: Let your agent quickly list all recent messages in the inbox to summarize, monitor, or trigger follow-up actions.
  • Targeted message retrieval: Have your agent fetch a specific message by ID, making it easy to pull full email content for context-aware decisions or replies.
  • Streamlined agent-to-agent communication: Enable your AI to directly interact with other agents or services via email, automating routine communication flows.

Use Agent mail from Atomic Agent

With your account connected, ask Atomic Agent to work with Agent mail 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 & TRIGGERS

Supported Tools and Triggers

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

Batch Get Messages

Return metadata for up to 500 messages from one inbox in a single request.

Batch Update Message Labels

Atomically add or remove the same labels on up to 50 messages in one inbox.

Complete File Upload

Mark a pending Agent Drive file ready after its bytes have been PUT to the presigned URL returned by CREATE_FILE.

Create Agent Armor Feedback

Record whether Agent Armor's completed verdict on a message was correct.

Create Calendar Event

Create a one-off or recurring event on a US-only inbox calendar.

Create Draft

Create a draft, optionally scheduling its automatic delivery with send_at.

Create File

Initialize a pending Agent Drive file and return instructions for a direct storage upload.

Create Inbox

Create a new AgentMail inbox via API.

Create Inbox API Key

Create an inbox-scoped bearer key and return its one-time secret.

Create Inbox in Pod

Create an inbox inside an explicitly selected AgentMail pod, optionally choosing its address, initial status, idempotency ID, and metadata.

Create Inbox Polling Webhook

Create or resume a polling webhook scoped to one inbox.

Create Inbox Webhook

Create a regular webhook scoped to one AgentMail inbox for a non-empty set of event types.

Create Allowlist or Blocklist Entry

Add an email address or domain to an organization-wide send, receive, or reply allowlist or blocklist.

Create Pod

Create an AgentMail pod for grouping inboxes and related resources.

Create Polling Webhook

Create or resume an organization-level polling webhook for a non-empty set of event types, optionally filtered to at most 10 inboxes and pods combined.

Create Webhook

Create an organization-level webhook for a non-empty set of event types, optionally filtered to at most 10 inboxes and pods combined.

Delete Calendar Event

Accept asynchronous deletion of a US-only calendar event or cancel recurring dates.

Delete Draft

Permanently delete one unsent draft from an inbox.

Delete File

Permanently delete a pending or ready Agent Drive file and free its path.

Delete Inbox

Permanently delete one inbox by ID.

Delete Inbox Polling Webhook

Permanently delete an inbox-scoped polling webhook by webhook_id or client_id, invalidate its polling token, and free its subscription slot.

Delete Inbox Webhook

Permanently delete a regular webhook created for a selected AgentMail inbox and stop future deliveries.

Delete Allowlist or Blocklist Entry

Remove one email address or domain from an organization-wide send, receive, or reply allowlist or blocklist.

Delete Message

Permanently delete one message from an inbox.

Delete Pod

Permanently delete one AgentMail pod by its unique ID.

Delete Pod Inbox

Permanently delete an inbox through its explicitly selected AgentMail pod, preserving the pod tenant boundary.

Delete Polling Webhook

Permanently delete an organization-level polling webhook by webhook_id or client_id, invalidate its polling token, and free its subscription slot.

Delete Thread

Permanently delete one AgentMail thread and all of its messages.

Delete Webhook

Permanently delete an organization-level webhook and stop future deliveries.

Forward Message

Immediately forward an existing message to new recipients with optional added content and attachments.

Get Agenda

Get one page of non-cancelled calendar dates in a UTC window, expanding recurring events and ordering dates by start time.

Get API Key

Retrieve API-key metadata without exposing bearer secret values.

Get Calendar

Get an inbox's US-only calendar settings, event count, and ETag.

Get Calendar Event

Get the full current form of a US-only calendar event or recurring-event date, including its opaque ETag for conditional mutations.

Get Current Identity

Return the connected AgentMail identity and its organization, pod, or inbox access boundary without exposing the credential itself.

Get Domain

Return an AgentMail custom domain, its domain and tracking verification statuses, and all required DNS records.

Get Domain Setup Link

Build a one-click Domain Connect DNS setup link when supported.

Get Domain Zone File

Download the AgentMail-generated DNS zone file for a custom domain as a bounded binary file reference.

Get Draft

Retrieve the complete contents and scheduling details of one draft.

Get Draft Attachment

Get a temporary download reference for one draft attachment.

Get File

Get Agent Drive file metadata.

Get Inbox

Retrieve one AgentMail inbox and its metadata by ID or email address.

Get Inbox Polling Webhook

Get one inbox-scoped polling webhook by webhook_id or client_id.

Get Inbox Webhook

Get one regular webhook created for a selected AgentMail inbox.

Get Inbox Webhook Headers

List only the names of custom delivery headers on an inbox-scoped regular webhook.

Get Message

Retrieve the complete details of a specific email message from an AgentMail inbox.

Get Message Attachment

Get a temporary download reference for one message attachment.

Get Organization

Return the connected AgentMail organization's identifiers, current inbox and domain counts, configured resource limits, and timestamps.

Get Pod

Retrieve one AgentMail pod by its unique ID.

Get Pod Inbox

Get an AgentMail inbox through an explicitly selected pod, preserving the pod tenant boundary.

Get Polling Webhook

Get one organization-level polling webhook by webhook_id or client_id.

Get Raw Message

Get a temporary download reference for one message's raw RFC 5322 source, including its original headers and MIME structure.

Get Thread

Retrieve one AgentMail thread and a paginated page of its messages.

Get Thread Attachment

Get a temporary download reference for an attachment using its thread and attachment IDs.

Get Webhook

Get one organization-level webhook configuration by ID.

Get Webhook Headers

List only the names of custom delivery headers on an organization-level webhook.

List Calendar Event Instances

List one page of non-cancelled dates computed for a recurring US-only calendar event in a UTC window, including dates beyond the agenda horizon.

List Calendar Events

List one US-only calendar page of stored one-off events, recurring series, and edited series dates, including cancelled events, by most recent update.

List Domains

List one page of AgentMail custom domains and return the continuation token for the next page.

List Drafts

List unsent drafts in an AgentMail inbox with filters and pagination.

List Files

List one page of an inbox's Agent Drive files in path order, including pending files.

List Inbox API Keys

List API-key metadata scoped to an inbox without exposing secret values.

List Inboxes

List all inboxes available to the authenticated AgentMail account.

List Inbox Events

List label-change events from an AgentMail inbox.

List Inbox Polling Webhooks

List polling webhooks created through one inbox route.

List Inbox Webhooks

List one page of regular webhooks created for a selected AgentMail inbox.

List Allowlist or Blocklist Entries

List one page of organization-wide send, receive, or reply allowlist or blocklist entries.

List Messages

List messages from an AgentMail inbox.

List Pod Inboxes

List one page of inboxes inside an explicitly selected AgentMail pod, or supply query to search addresses and display names.

List Pods

Return one page of AgentMail pods and its continuation token.

List Polling Webhooks

List organization-level polling webhooks created through the organization route.

List Threads

List conversation threads in an AgentMail inbox with filters.

List Webhooks

List AgentMail webhook configurations.

Query Inbox Event Metrics

Query timestamped email-event counts for an AgentMail inbox.

Query Metrics

Query organization-wide email event counts or cumulative resource-usage time series over a bounded time range.

Query Rate Metrics

Query organization-wide rolling bounce and complaint rates.

Release Held Message

Release a message that Agent Armor held for review, emit its delivery and security override events, and remove the agent-armor-held label.

Reply To Message

Reply to a selected message while preserving its AgentMail thread.

Respond to Calendar Event

Accept, decline, or tentatively accept an email invitation on a US-only inbox calendar.

Send Draft

Immediately send and consume a draft, optionally changing message labels.

Send Email

Send an email using AgentMail API

Send Message

Immediately send a new email from an AgentMail inbox with optional HTML, attachments, custom headers, labels, and open tracking.

Update Calendar

Change an inbox calendar's default time zone in US production.

Update Calendar Event

Patch a US-only calendar event, one recurring date, or that date and future dates.

Update Draft

Edit a draft, reschedule delivery, or cancel a scheduled send with null.

Update Inbox

Update an inbox's display name, status, or custom metadata.

Update Inbox Webhook

Update an inbox-scoped regular webhook's enabled state or replace its event types.

Update Inbox Webhook Headers

Atomically set, replace, or remove custom delivery headers on an inbox-scoped regular webhook.

Update Message Labels

Add or remove labels from one message in an inbox.

Update Pod Inbox

Update the display name, active or paused status, or metadata of an inbox inside an explicitly selected AgentMail pod.

Update Thread Labels

Add or remove custom labels from every message in one thread.

Update Webhook

Update an organization-level webhook's enabled state, event types, or inbox and pod subscriptions.

Update Webhook Headers

Atomically set, replace, or remove custom delivery headers on an organization-level webhook.

FAQ

Frequently asked questions

With a standalone Agent mail MCP server, the agents and LLMs can only access a fixed set of Agent mail tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Agent mail and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Atomic Agent fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Agent mail tools.

Yes, absolutely. You can configure which Agent mail scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Agent mail data and credentials are handled as safely as possible.

Start with Agent mail.It takes 30 seconds.

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

Start building