Agent Mail MCP server

Connect Agent Mail to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Agent Mail MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the manage domain tool in Agent Mail
  • Use the update message labels tool in Agent Mail
  • Use the manage draft tool in Agent Mail
  • Use the list drafts tool in Agent Mail
  • Use the get message tool in Agent Mail
  • Use the get inbox tool in Agent Mail

Supported Tools

manage_domain

Manage Domain

Create, verify, or delete a custom email domain. Use `action` to specify the operation: - **create**: Register a new domain (returns DNS records to configure) - **verify**: Trigger verification of DNS records for a pending domain - **delete**: Remove a domain Custom domains require a paid plan. After creating, configure the DNS records and then verify.

update_message_labels

Update Message Labels

Add or remove labels from an email message. Labels are used for organizing, filtering, and managing the state of conversations.

manage_draft

Manage Draft

Create, update, or send an email draft. Use `action` to specify the operation: - **create**: Create a new draft in an inbox - **update**: Update an existing draft's content - **send**: Send an existing draft as an email Drafts support scheduling via `sendAt` for delayed sending.

list_drafts

List Drafts

List email drafts in an inbox. Returns draft metadata including subject, recipients, and scheduled send time. Supports pagination.

get_message

Get Message

Retrieve the full details of a specific email message including headers, body content, attachments metadata, and extracted text. The `extractedText` and `extractedHtml` fields contain the reply content without quoted history.

get_inbox

Get Inbox

Retrieve details of a specific email inbox by its ID, including its display name, pod association, and timestamps.

list_threads

List Threads

List email conversation threads in an inbox. Threads group related messages together. Supports filtering by labels, date range, and pagination.

list_list_entries

List Allow/Block Entries

List entries in an email allow or block list. Specify the direction (send/receive) and list type (allow/block) to view the corresponding list entries.

reply_to_email

Reply to Email

Reply to an existing email message. Replies stay linked to the original thread. Use `replyAll` to reply to all original recipients. You can also add additional recipients via `to`, `cc`, and `bcc`.

get_attachment

Get Attachment

Get a presigned download URL for an email attachment. The URL is temporary and expires after a set time. You can look up attachments from either a message or a thread.

list_pods

List Pods

List all pods in the account. Pods are multi-tenant containers that group inboxes and domains for isolated email management. A default pod is created with every account.

list_messages

List Messages

List email messages in an inbox with filtering by labels, date range, and inclusion of spam/blocked/trash. Supports pagination. Returns messages sorted by timestamp (newest first by default).

manage_pod

Manage Pod

Create or delete a pod for multi-tenant isolation. Pods group inboxes and domains for a single customer/user/agent, keeping email data separate. A default pod is created when you sign up. - **create**: Create a new pod - **delete**: Delete an empty pod (all inboxes and domains must be removed first)

manage_webhook

Manage Webhook

Create, update, or delete webhooks for receiving email and domain events. Webhooks can be scoped to specific pods or inboxes. Common event types: `message.received`, `message.sent`, `message.delivered`, `message.bounced`, `message.complained`, `message.rejected`, `domain.verified`.

manage_list_entry

Manage List Entry

Add or remove entries from email allow/block lists. Lists control which emails or domains can send to or receive from your inboxes. Specify `direction` (send or receive) and `listType` (allow or block) to target the correct list.

update_inbox

Update Inbox

Update an inbox's display name. The display name format is typically "Display Name <[email protected]>".

get_thread

Get Thread

Retrieve a page of messages from an email thread. The first page contains the newest messages in ascending timestamp order; follow nextPageToken for older pages. messageCount is the total across the thread.

delete_draft

Delete Draft

Delete an email draft from an inbox. This permanently removes the draft.

delete_thread

Delete Thread

Delete an email thread and all its messages from an inbox. This action cannot be undone.

send_email

Send Email

Send a new email from an inbox. Supports plain text and HTML bodies, attachments (base64 or URL), CC/BCC recipients, custom headers, and labels. AgentMail handles SPF, DKIM, and DMARC automatically.

delete_inbox

Delete Inbox

Permanently delete an email inbox and all its associated data (messages, threads, drafts). This action cannot be undone.

list_domains

List Domains

List all custom email domains in the account with their verification status and DNS records. Supports pagination.

list_inboxes

List Inboxes

List all email inboxes in the account. Supports cursor-based pagination. Returns inboxes sorted by creation date (newest first by default).

create_inbox

Create Inbox

Create a new email inbox for an AI agent. The inbox can use the default `@agentmail.to` domain or a custom domain (requires a paid plan). If no username is provided, one will be auto-generated.

forward_email

Forward Email

Forward an existing email message to new recipients. The original message content is included and you can add additional text or recipients.

get_domain

Get Domain

Read a custom email domain, its current verification status, DNS records, and diagnostic reason without starting verification.

delete_message

Delete Message

Permanently delete a single email message from an inbox. This cannot be undone.

update_thread_labels

Update Thread Labels

Add or remove custom labels on every message in a thread. System labels cannot be changed. AgentMail rejects threads with 100 or more messages.

get_draft

Get Draft

Read an email draft, including its complete body, recipients, labels, attachments, and scheduled send state before editing or sending it.

search_messages

Search Messages

Find email messages by sender, recipients, subject, and body text, ranked by relevance. Spam, blocked, unauthenticated, and trashed results are excluded.

list_webhooks

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 Raw Message

Download the original MIME email as an EML file, including its original headers and complete message structure.

search_threads

Search Threads

Find email threads by sender, recipients, subject, and body text, ranked by relevance. Spam, blocked, unauthenticated, and trashed results are excluded.

Connect Agent Mail to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Agent Mail in Metorial. In your Metorial portal, enable the Agent Mail MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Agent Mail tools.

Run Agent Mail through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Agent Mail and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Agent Mail tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Agent Mail

Notion

Create, read, update, and archive pages and databases in a Notion workspace. Manage blocks (paragraphs, lists, headings, embeds, etc.) within pages. Query databases with filters and sorts across rich property types including text, numbers, dates, selects, relations, and formulas. Search across pages and databases by title. Add and read comments on pages and blocks. Upload files to pages. Manage workspace users and retrieve user profiles.

Google Sheets

Create, read, and update spreadsheets and their cell data. Read and write values to individual cells, ranges, or multiple ranges using A1 notation or named ranges. Apply cell formatting including text styles, backgrounds, borders, number formats, and conditional formatting. Manage sheets (tabs) within a spreadsheet—add, delete, copy, rename, and reorder them. Create and manage embedded charts, pivot tables, filter views, data validation rules, protected ranges, named ranges, and merged cells. Perform batch operations to apply multiple updates atomically.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Slack

Slack: connect with bot OAuth or user OAuth to work with messages, conversations, search, files, Canvases, Lists, profiles, reactions, reminders, and workspace productivity settings.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

How to use Agent Mail on Metorial

Audit SharePoint Document Permissions Across Sites and Report Violations

Scan SharePoint sites and document libraries to identify files with overly broad sharing permissions or unexpected external access, compile an audit report, and send it to the compliance team via email.

Automate HubSpot Ticket Creation from Agent Mail Inbound Emails

When support emails arrive in an Agent Mail inbox, extract key details, check for existing HubSpot contacts, create a support ticket, and send an automated acknowledgment reply—all without human triage.

Draft and Schedule Outreach Sequences via Agent Mail with HubSpot Tracking

Build and execute multi-step outreach email sequences using Agent Mail for delivery while logging each touchpoint back to HubSpot contact records so sales teams have full engagement visibility.

Keep Salesforce Opportunities Updated from Email Correspondence

Monitor a sales team's email inbox for customer replies, extract deal signals such as budget confirmations or timeline changes, and update the corresponding Salesforce opportunity fields automatically.

Onboard New HubSpot Contacts with Welcome Emails via Agent Mail

When a new contact is added to HubSpot, automatically send a personalized welcome email through Agent Mail, label the conversation for tracking, and update the contact record with the onboarding touchpoint.

Onboard New Sales Contacts from Email Introductions into HubSpot

Parse inbound introduction emails received by the sales team, extract contact and company information, and create or update CRM records in HubSpot so no relationship falls through the cracks.

Triage Inbound Support Emails and Create Helpdesk Tickets

Automatically process inbound support emails arriving in a dedicated agent inbox, extract issue details, and create corresponding tickets in HubSpot with appropriate priority and pipeline stage assignments.

Technical notes for Agent Mail

Create and manage email inboxes for AI agents to send, receive, and reply to emails programmatically. Organize conversations with threads, labels, and drafts. Search emails semantically across inboxes. Extract structured data from unstructured emails and auto-categorize messages with custom prompts. Manage custom domains, contact/mailing lists, and multi-tenant pods. Subscribe to webhook and WebSocket events for message delivery, bounces, complaints, and domain verification. Supports IMAP and SMTP access alongside the REST API.

Frequently asked questions

Common questions about connecting Agent Mail to AI agents with Metorial.

  1. How many tools does the Agent Mail MCP server have?
    The Agent Mail MCP server exposes 33 tools, including Manage Domain, Update Message Labels, Manage Draft. Each one is governed and traced through Metorial.
  2. Agent Mail exposes tools your agents call on demand; it does not publish event triggers yet. Everything still runs through one governed MCP URL.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Agent Mail MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Agent Mail and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Agent Mail MCP server yourself or use the hosted gateway.

Connect Agent Mail to production AI agents

See how Metorial gives your team governed access to Agent Mail, with tracing and security controls built in.