AgentMail MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with AgentMail MCP or direct API to create inboxes, send and reply to emails, search threads, and manage drafts and calendar events through natural language.

AgentMail MCP logoAgentMail MCP
Dcr Oauth

AgentMail MCP is a hosted email and calendar service for AI agents. It gives agents managed access to inboxes, threads, drafts, files, and events.

55 Tools

Try AgentMail MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
AgentMail MCP
Try asking
TOOLS

Supported Tools

Every AgentMail MCP action and event your agent gets out of the box.

Agent attach human

Attach the human you work for to an unverified agent organization, and email them a 6-digit verification code for agent_verify.

Agent verify

Verify an unverified agent organization using the 6-digit code emailed to the human attached to it, lifting the unverified plan's caps (1 inbox, 10 sends/day) at no cost.

Authorize inbox

Finish an AgentID sign-in that a browser already started at an app: when the app's Sign in with AgentID page says it is waiting for your agent and shows an auth token, pass that token with the inbox to sign in as.

Connect app

Create an account at an app as an inbox, or sign an inbox that already holds one back in: mints a browser sign-in session and returns a single-use magic URL to open in the client that will hold the sign-in (usually the agent's own browser session), plus the ID of the pending sign-in key.

Create draft

Create a draft email.

Create event

Create a one-off or recurring event on an inbox's calendar, with this inbox as organizer.

Create inbox

Create an inbox and return it, including the email address that is its inboxId.

Create list entry

Add an email address or domain to one of an inbox's allow or block lists.

Delete draft

Permanently delete a draft; this cannot be undone.

Delete event

Delete a calendar event, or cancel dates of a recurring one; this cannot be undone.

Delete file

Permanently delete a file from an inbox's drive (Agent Drive); this cannot be undone.

Delete inbox

Permanently delete an inbox and all of its threads, messages, and drafts; this cannot be undone.

Delete list entry

Remove an email address or domain from one of an inbox's allow or block lists — for a send block, this is the remedy a blocked-recipient send error names.

Delete thread

Permanently delete a thread and all of its messages; this cannot be undone.

Forward message

Forward a message to new recipients; it is sent right away and cannot be recalled.

Get agenda

List what is on an inbox's calendar in a time window, ordered by start: one-off events and each date of recurring events, with cancelled dates left out.

Get app

Get one app by ID, or by the slug of an app in the catalog (such as "firecrawl").

Get attachment

Get an attachment from a thread.

Get calendar

Get an inbox's calendar: its default time zone (used for events created without one), how many events it holds, and its etag.

Get draft

Get a draft by ID, including its content, status, and scheduled send time.

Get event

Get one calendar event in full, with its description, attendees and their responses, and its etag: a one-off or recurring event by its UUID, or one date of a recurring event by its dated ID (_).

Get file

Get a file from an inbox's drive (Agent Drive), with a download link that works for up to an hour without an API key.

Get inbox

Get one inbox by its inboxId: its email address, display name, metadata, and when it was created and last updated.

Get labs

Check whether the organization is in AgentMail Labs, which offers features still in preview, such as Agent Armor, and whether Labs is offered in this deployment.

Get list entry

Get one entry from one of an inbox's allow or block lists, by the email address or domain it holds: whether it is an address or a domain, why it was added, whether AgentMail added it (readOnly), and when.

Get message

Get one message by ID with its full body.

Get started

Start here when the user is new to AgentMail, asks to set it up or try it, or has no inbox yet.

Get thread

Get a thread by ID, including its messages.

Join labs

Join AgentMail Labs for the whole organization, making its preview features, such as Agent Armor, available to every inbox; some, Agent Armor among them, are then turned on by an organization admin in the console.

List accounts

List your organization's accounts: the inboxes signed in at apps.

List apps

List the app marketplace: services where an agent can create an account using an inbox (for example a web scraping, search, or database API), most popular first.

List drafts

List drafts in an inbox, most recently updated first, paginated.

List files

List the files in an inbox's drive (Agent Drive) in path order, optionally only those under a path prefix such as reports/.

List inboxes

List the organization's inboxes, newest first, paginated.

List list entries

List the entries on one of an inbox's allow or block lists.

List messages

List messages in an inbox, newest first, paginated.

List organizations

List the organizations you belong to and show which one is currently selected for AgentMail operations: each with its ID, its name, and whether it is selected.

List threads

List email threads in an inbox, most recently received first, paginated.

Reply to message

Reply to a message in its thread; the reply is sent right away and cannot be recalled.

Respond to invitation

Accept, decline, or tentatively accept a calendar invitation this inbox received by email, and by default email the answer to the organizer right away, which cannot be recalled.

Search apps

Search the app marketplace by name prefix, for when the user names a service ("create an account at Firecrawl").

Search inboxes

Find inboxes by address or display name (word-prefix match, best match first) without paging the whole organization.

Search messages

Search messages in an inbox with a full-text query, ranked by relevance.

Search threads

Search threads in an inbox with a full-text query, ranked by relevance.

Select organization

Choose which organization your AgentMail operations target (for users who belong to multiple orgs).

Send draft

Send a draft right away; once sent it cannot be recalled.

Send feedback

Records feedback about this MCP server, including unexpected tool failures, unhelpful responses, or missing capabilities observed by the agent or reported by the user.

Send message

Send an email from an inbox right away; once sent it cannot be recalled.

Update calendar

Set an inbox's calendar default time zone, used for events created later without one; existing events keep their own.

Update draft

Update a draft email.

Update event

Change a calendar event: send only the fields to change.

Update inbox

Update an inbox's display name or metadata.

Update message

Add or remove labels on one message, for example remove unread to mark it read.

Update thread

Add or remove labels on every message in a thread: add trash to move it to trash, or remove unread to mark it read.

Upload file

Store a file at a path in an inbox's drive (Agent Drive) and get it back ready, with a download link when the credential may read files.

SETUP GUIDE

Connect AgentMail MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["agent_mail_mcp"],
  mcp: true,
});
Create a session scoped to AgentMail MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Send an email from my AgentMail inbox to billing@example.com with the subject Invoice follow-up and ask for an updated payment date.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a AgentMail MCP request
SETUP GUIDE

Connect AgentMail MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["agent_mail_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to AgentMail MCP
3

Run AgentMail MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Send an email from my AgentMail inbox to billing@example.com with the subject Invoice follow-up and ask for an updated payment date." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the AgentMail MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native AgentMail MCP Integration

  • Supports both AgentMail MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable inbox, email, file, and calendar actions
  • Rich coverage for creating inboxes, sending replies, searching threads, and managing drafts

Managed Auth

  • Connect AgentMail MCP with DCR OAuth credentials through a single Composio session
  • Central place to manage, scope, and revoke AgentMail MCP access
  • Per user and per environment credentials instead of hard-coded secrets

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Clear schemas help agents choose the right AgentMail MCP action and provide required email details
  • Comprehensive execution logs show what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access AgentMail MCP
  • Scoped, least privilege access to inboxes, messages, files, and calendar resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use AgentMail MCP with any AI Agent Framework

Choose a Framework you want to connect AgentMail MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with AgentMail MCP.It takes 30 seconds.

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

Start building