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.
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
{
"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
Platform Resources
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, their shared security risks including indirect prompt injection, and when to use one, both, or a hybrid architecture.
12 min
MCP vs API: What Hundreds of Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building hundreds of connectors that serve both, here's when each approach wins.
14 min read
AgentMail MCP Server FAQ
Does StackOne have a AgentMail MCP server?
AgentMail MCP server vs direct API integration: what's the difference?
How does AgentMail authentication work for AI agents?
origin_owner_id.Are AgentMail MCP tools vulnerable to prompt injection?
What is the context bloat of a AgentMail agent and how do I avoid it?
Can I limit which actions my AgentMail agent can access?
Can I create custom agent actions for my AgentMail MCP server?
When should I NOT use a AgentMail MCP server?
What AI frameworks and AI clients does the StackOne AgentMail MCP server support?
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.