Mailbay for AI agent builders
Your agents get their own inboxes
Mailbay's MCP server gives an agent 15 email tools. It creates an inbox, waits for the code and replies in the thread, on a private domain or yours.
What gets in the way
An agent that signs up for things needs a real address, has to catch the verification code, and should never touch your own mailbox.
How it goes
- 1
Paste the MCP config
One command in Claude Code, a five line file in Cursor, or a client in your agent SDK.
mcp.mailbay.dev/mcp - 2
The agent makes an inbox
create_inbox returns a live address on your private mailbay.email domain or your own.
signup-bot@k7m3qz.mailbay.email - 3
wait_for_email returns the code
It blocks until a matching email arrives and returns the codes and links already pulled out.
codes: ["482913"]
One paste per tool
The same remote server everywhere. Claude Code and Cursor are tested end to end; the SDK clients were checked to load all 15 tools.
claude mcp add --scope project --transport http mailbay https://mcp.mailbay.dev/mcp \
--header 'Authorization: Bearer ${MAILBAY_API_KEY}'{
"mcpServers": {
"mailbay": {
"url": "https://mcp.mailbay.dev/mcp",
"headers": { "Authorization": "Bearer ${env:MAILBAY_API_KEY}" }
}
}
}import { createMCPClient } from "@ai-sdk/mcp";
const mailbay = await createMCPClient({
transport: {
type: "http",
url: "https://mcp.mailbay.dev/mcp",
headers: { Authorization: `Bearer ${process.env.MAILBAY_API_KEY}` },
},
});
const tools = await mailbay.tools(); // create_inbox, wait_for_email, reply, ...# Block until the sign in code arrives (long poll, up to 120 s)
curl "https://api.mailbay.dev/v1/inboxes/ibx_.../wait?subject=code&timeout=60" \
-H "Authorization: Bearer $MAILBAY_API_KEY"
# { "message": {...}, "codes": ["482913"], "links": [...] }Works with what you use
- Claude Codevia MCP
- Cursor MCPvia MCP
- Codexvia MCP
- OpenAI Agents SDKvia MCP
- Vercel AI SDKvia MCP
- LangChainvia MCP
Every tool, with what we tested, is in the integrations directory.
What you get
Its own inbox, never your Gmail
The agent works only with Mailbay inboxes. It cannot read a personal mailbox, because it is never connected to one.
Codes already extracted
wait_for_email returns 4 to 8 digit codes and links from the message, so the agent needs no regex.
Keys scoped to one inbox
An inbox key can read, wait, reply and send from one inbox and nothing else. Give the agent that.
A Catch-all for sign ups
Any address under your private domain reaches the Catch-all, so an agent can sign up with a fresh address every time.
Replies in the thread
reply keeps the conversation together, so a human can read what the agent sent.
Questions
Does the agent get access to my email?
No. Mailbay's MCP server works only with Mailbay inboxes: ones the agent creates, your Mailbay support inboxes and the Catch-all. It never connects to a personal mailbox.
Does the MCP server support OAuth?
Not yet. It takes an API key in the Authorization header today. OAuth sign in, so a client needs no key, is planned.
How long can wait_for_email block?
60 seconds by default and 120 at most. If nothing matching arrives, it times out and calling it again is safe.
Which agent frameworks work?
Any MCP client over HTTP. We ran Claude Code end to end, checked Cursor with cursor-agent, and loaded all 15 tools with the OpenAI Agents SDK, the Vercel AI SDK and LangChain's MCP adapters.
Want the long version? Read an email inbox for your AI agent and the Claude Code guide, or see who else Mailbay is for.
Join the beta
Mailbay is in private beta and free while the beta runs: inboxes, sending, your own domains and MCP. We invite people in small batches and read every note on the form.