Skip to main content Announcing Tool Policies: AI agent permissions down to the field Read the announcement
Live 63 Actions

AgentMail MCP Server
for AI Agents

Connect your AI agent to StackOne's AgentMail MCP server and give it 63 MCP tools out of the box. Auth, tool execution, and security all managed.

AgentMail logo
AgentMail MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

63 Agent Actions

Agents can read, write, delete and run operations in AgentMail. Extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your AgentMail MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every AgentMail tool response scanned for prompt injection in milliseconds, with 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every AgentMail call.

Tools Discovery →

What is the AgentMail MCP Server?

A AgentMail MCP server lets AI agents read and write AgentMail data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's AgentMail MCP server ships with 63 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All AgentMail MCP Tools

Every StackOne action for AgentMail, ready for your agent. Read, write, delete and run operations, scoped to exactly what you need.

Calendars

  • Get Calendar

    Gets the inbox's calendar.

  • Update Calendar

    Updates the calendar's default time zone.

Events

  • Create Event

    Creates a one-off or recurring event on the inbox's calendar.

  • List Events

    Lists the events stored on the calendar: one item per one-off or recurring event, plus one item for each edited date of a recurring event (as that dated event, with is_exception: true).

  • Get Event

    Gets an event by its UUID, or one date of a recurring event by its dated ID (<uuid>_<slot>).

  • Update Event

    Update a calendar event on an inbox's calendar, optionally guarded by its ETag.

  • Delete Event

    Deletes an event, or cancels dates of a recurring event.

Domains

  • Create Domain

    Register a custom domain so inboxes can send and receive on it.

  • List Domains

    List the custom sending domains registered in the AgentMail organization.

  • Get Domain

    Get a custom domain with its DNS records and verification status.

  • Update Domain

    Update the settings of a registered custom domain.

  • Delete Domain

    Delete a custom domain from the organization.

Drafts

  • Create Draft

    Create a draft in an inbox for review or scheduled sending.

  • Send Draft

    Send an existing draft from its inbox.

  • List Drafts

    List drafts, most recent first.

  • Get Draft

    Get a draft with its full body, recipients and attachments.

  • List Drafts

    List drafts, most recent first across every inbox in the organization.

  • Get Draft

    Get a draft with its full body, recipients and attachments.

  • Update Draft

    Edit fields on an existing draft.

  • Delete Draft

    Permanently delete a draft, cancelling any scheduled send.

Attachments

  • Get Attachment

    Get a download URL and metadata for one attachment of a draft.

  • Get Attachment

    Get a download URL and metadata for one attachment of a draft.

  • Get Attachment

    Get a download URL and metadata for one attachment of a message.

  • Get Attachment

    Get a download URL and metadata for one attachment in a thread.

  • Get Attachment

    Get a download URL and metadata for one attachment in a thread.

Inboxes

  • List Inboxes

    List the inboxes in the AgentMail organization.

  • Search Inboxes

    Searches inboxes in the organization by address or display name, ranked by relevance.

Inboxs

  • Create Inbox

    Create a new inbox (email address) for an agent.

  • Get Inbox

    Get an inbox with its email address, display name and metadata.

  • Update Inbox

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

  • Delete Inbox

    Permanently delete an inbox along with its messages, threads and drafts.

Messages

  • Send Message

    Send a new email from an inbox.

  • List Messages

    Lists messages in the inbox, most recent first.

  • Search Messages

    Full-text search across messages in the inbox, ranked by relevance.

  • Get Message

    Get a single message with its full text, HTML, headers and attachment metadata.

  • Update Message

    Add or remove labels on a single message.

  • Batch Get Messages

    Fetch metadata for up to 500 messages in one request.

  • Batch Update Messages

    Apply one label change to up to 50 messages in a single request.

  • Delete Message

    Permanently deletes a message.

Threads

  • List Threads

    Lists threads in the inbox, most recent first.

  • Search Threads

    Full-text search across threads in the inbox, ranked by relevance.

  • Get Thread

    Get a thread with all of its messages.

  • List Threads

    Lists threads, most recent first.

  • Search Threads

    Full-text search across threads in the organization, ranked by relevance.

  • Get Thread

    Get a thread with all of its messages.

  • Update Thread

    Add or remove labels on a thread.

  • Update Thread

    Add or remove labels on a thread.

  • Delete Thread

    Permanently deletes a thread and all of its messages.

  • Delete Thread

    Permanently deletes a thread and all of its messages.

Other (14)

  • Create Agent Armor Feedback

    Tell us whether Agent Armor's verdict on a message was right.

  • Get Agenda

    Lists every date on the calendar in a time window, ordered by start time: one-off events, and recurring events expanded into their individual dates, with cancelled dates left out.

  • List Event Instances

    Lists the dates of one recurring event in a time window, in start order, with each date's edits applied.

  • Get Zone File

    Get the DNS zone file of records needed to set up a custom domain.

  • Get Setup Link

    Build a one-click DNS setup link for the domain via the Domain Connect standard.

  • List Inbox Events

    List label change events for an inbox.

  • Get Raw Message

    Get a signed download URL for the raw .eml source of a message.

  • Respond To Event

    Accepts, declines or tentatively accepts an invitation the inbox received by email.

  • Verify Domain

    Trigger DNS verification of a custom domain.

  • Authorize Inbox

    Authorizes the AgentID sign-in a client is already waiting in, for the inbox in the path, and returns the ID of the pending public key it will activate.

  • Release Agent Armor Message

    Release a message Agent Armor held for review in hold mode: your agents are sent its message.received event, message.security.override is sent too, in either order, and its agent-armor-held label...

  • Reply To Message

    Reply to a message in an inbox, keeping it in the same thread.

  • Reply All Message

    Reply to every recipient of a message in an inbox.

  • Forward Message

    Forward a message from an inbox to new recipients.

Set Up Your AgentMail MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to AgentMail in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

Check More productivity-collaboration MCP Servers

AgentMail MCP Server FAQ

Does StackOne have a AgentMail MCP server?
Yes. StackOne offers a hosted AgentMail MCP server with 63 pre-built actions, and every action is tested and QA'd by StackOne. Connect it to Claude, Cursor, and any other MCP client, or to any agent framework through the AI Action SDK. It ships with managed agent authentication, prompt injection defense, and tool discovery with server-side execution that preserve your agent's context window and keep reasoning performance.
AgentMail MCP server vs direct API integration: what's the difference?
A AgentMail MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software work, where backend code calls AgentMail. A AgentMail MCP server is for AI agents that discover and call AgentMail at runtime, such as MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI. StackOne provides both.
How does AgentMail authentication work for AI agents?
AgentMail authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK to get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own AgentMail account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are AgentMail MCP tools vulnerable to prompt injection?
Yes. AgentMail MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content, such as documents, messages, tickets, records, or free-text fields, is a potential vector. StackOne Defender scans every tool response before it enters the agent's context. It runs regex patterns in ~1ms, then a MiniLM classifier in ~4ms. Accuracy is 88.7%, and it runs entirely on CPU.
What is the context bloat of a AgentMail agent and how do I avoid it?
Context bloat happens when AgentMail tool schemas and API responses eat your AgentMail agent's memory, preventing it from reasoning effectively. A single AgentMail query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery reduces it by loading only the tools relevant to each query.
Can I limit which actions my AgentMail agent can access?
Yes. You can limit which actions your AgentMail agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my AgentMail MCP server?
Yes. You can create custom agent actions for your AgentMail MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research AgentMail's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a AgentMail MCP server?
Skip a AgentMail MCP server if your integration is purely software-to-software, because direct AgentMail API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call AgentMail actions at runtime.
What AI frameworks and AI clients does the StackOne AgentMail MCP server support?
The StackOne AgentMail MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.