Basic information
About AgentMail MCP Server
Give AI agents their own email inboxes: create inboxes, send, reply and search mail through AgentMail's hosted MCP server.
AgentMail is a remote MCP server in the Communication category listed in the AddMCP.net directory, published by AgentMail. It exposes 1 tool, including Cursor. Supported transport: Streamable HTTP. Related topics: ai-agents, api, email, inbox, messaging.
Connection details
https://mcp.agentmail.to/mcp
Setup
claude mcp add agentmail-mcp --transport http https://mcp.agentmail.to/mcp
[mcp_servers.agentmail-mcp] url = "https://mcp.agentmail.to/mcp"
{
"mcpServers": {
"agentmail-mcp": {
"url": "https://mcp.agentmail.to/mcp"
}
}
}
{
"servers": {
"agentmail-mcp": {
"type": "http",
"url": "https://mcp.agentmail.to/mcp"
}
}
}
AgentMail MCP Server (Communication) config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"agentmail-mcp": {
"type": "http",
"url": "https://mcp.agentmail.to/mcp"
}
}
}
AgentMail MCP Server (Communication) tools
- Cursor
Overview
What is AgentMail?
The AgentMail MCP server is AgentMail's official hosted endpoint (https://mcp.agentmail.to/mcp) that lets AI assistants create email inboxes and send, read, reply to and search email on behalf of an agent.
AgentMail describes itself as an email provider built for AI agents. Instead of sharing a human's mailbox, each agent gets its own inbox through a REST API, with threading, webhooks and WebSockets for real-time events, custom domains with DKIM, SPF and DMARC, IMAP and SMTP access, and Python and TypeScript SDKs. The hosted MCP server exposes that inbox API to Claude, ChatGPT, Cursor and other MCP clients, so an assistant can run an email workflow end to end.
How to use AgentMail?
You need an AgentMail account (console.agentmail.to). There are two ways to authenticate:
- OAuth (default): recommended for Claude Desktop, claude.ai and ChatGPT. The client sends you to
console.agentmail.toto sign in, and the server acts as your console identity. No API key is needed. - API key: for Cursor, Windsurf and other clients without MCP OAuth. Create a key in the console under Settings > API Keys and send it in an
x-api-keyheader. AgentMail warns against putting the key in the URL query string, because it ends up in logs and history.
Claude Code
AgentMail documents this command; OAuth sign-in runs in the browser on first use:
claude mcp add --transport http agentmail https://mcp.agentmail.to/mcp
Connectors added on claude.ai do not sync to Claude Code, so add it separately. To use an API key instead of OAuth:
claude mcp add --transport http agentmail https://mcp.agentmail.to/mcp --header "x-api-key: ${AGENTMAIL_API_KEY}"
Claude Desktop and claude.ai
Go to Settings > Connectors > Add custom connector. Name it AgentMail, enter https://mcp.agentmail.to/mcp, click Add, then Connect. Sign in at console.agentmail.to, choose an organization if you have several, and test with "List my AgentMail inboxes."
Cursor
Add the server in Cursor's MCP settings (~/.cursor/mcp.json) with the x-api-key header:
{
"mcpServers": {
"agentmail": {
"url": "https://mcp.agentmail.to/mcp",
"headers": {
"x-api-key": "${AGENTMAIL_API_KEY}"
}
}
}
}
VS Code
Add the server to .vscode/mcp.json. VS Code opens the OAuth sign-in in the browser when it connects:
{
"servers": {
"agentmail": {
"type": "http",
"url": "https://mcp.agentmail.to/mcp"
}
}
}
If a client cannot send custom headers or do OAuth, AgentMail offers a stdio compatibility bridge in its agentmail-mcp GitHub repository that reads AGENTMAIL_API_KEY from the environment.
Key features of AgentMail
- Official hosted server; no local install needed for clients that support remote Streamable HTTP servers.
- OAuth sign-in through the AgentMail console, with organization selection, or an
x-api-keyheader. - AgentMail's docs list 43 tools plus 2 organization tools for OAuth sessions.
- Full inbox lifecycle: list, search, create, update, delete and authorize inboxes.
- Threads, messages and drafts: search and read threads; send, reply to and forward messages; create, update and send drafts; download attachments.
- Allow and block lists to control who can email an agent.
- Agent Drive file storage and AgentID tools that help an agent create accounts at services such as Firecrawl, with single-use sign-in links that expire after five minutes.
- An MCP event,
message.received, that carries metadata only; the assistant then reads the full message withget_message.
Use cases of AgentMail
- Give a support agent its own address: "Create an AgentMail inbox called support-bot and tell me its address."
- Triage incoming mail: "Search my AgentMail inboxes for unread threads about invoices and summarize them."
- Reply in context: "Reply to the latest message in the onboarding thread and confirm the meeting time."
- Draft for review: "Draft a follow-up to everyone who emailed the sales inbox this week, but don't send it yet."
- Sign agents up for tools: "Use AgentID to create a Firecrawl account for this agent."
- Keep inboxes clean: "Block emails from this domain on the support-bot inbox."
Troubleshooting AgentMail MCP Server
- "Unauthorized" (401): the client connected without OAuth or a key. Finish the browser sign-in, or add the
x-api-keyheader. - The connector works on claude.ai but not in Claude Code: claude.ai connectors do not sync to Claude Code. Add the server with
claude mcp add. - Your client cannot send headers or do OAuth: use the stdio compatibility bridge from the
agentmail-mcpGitHub repo and passAGENTMAIL_API_KEYthrough the environment. - Key shows up in logs: you passed it as a query parameter. Send it as an
x-api-keyheader and rotate the key.
Frequently asked questions
1 Is the AgentMail MCP server official?
Yes. AgentMail hosts it at https://mcp.agentmail.to/mcp and documents it in the integrations section of docs.agentmail.to.
2 Is AgentMail free?
AgentMail has a free tier with 3 inboxes and 3,000 emails per month, no credit card required. Paid plans start with Developer at $20 per month for 10 inboxes and 10,000 emails per month.
3 Do I need an API key for the AgentMail MCP server?
Not with OAuth, which is the default for Claude Desktop, claude.ai and ChatGPT. Clients without MCP OAuth, such as Cursor and Windsurf, use an API key in an x-api-key header.
4 Does the AgentMail MCP server work with Claude Code and Cursor?
Yes. Claude Code uses claude mcp add --transport http agentmail https://mcp.agentmail.to/mcp with OAuth on first use. Cursor uses the same URL with an x-api-key header.
5 Can the assistant send real email?
Yes. The tools can send, reply to and forward messages from your AgentMail inboxes, and delete inboxes and threads. Review what the assistant plans to send, especially when it emails external contacts.
6 Is there a local version?
AgentMail's agentmail-mcp GitHub repository provides a stdio compatibility bridge for clients that cannot use the hosted server's OAuth or custom headers.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In