Give your AI agent its own email inbox
It can sign up for a service, wait for the code, and read or answer mail.
What it does
Three things you get, in plain words.
One inbox per agent
Create an address for each agent. Each agent's mail lands in its own inbox, so it is easy to see whose mail is whose.
Waits for the email
One call pauses until the next message arrives. The verification code and links come back already pulled out of the text.
Connects in one step
Add our MCP server to Claude Code, Cursor or Codex. MCP is the standard way for agents to use outside tools.
Two calls finish a sign-up
Create an inbox, give its address to the service, then wait. You can do it over plain HTTP, or let the agent do it through MCP.
# 1. Give the agent an address
curl -X POST https://api.mailbay.dev/v1/inboxes \
-H "Authorization: Bearer $MAILBAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"local_part": "signup-bot"}'
# {"id": "ibx_01jbz8w4k2q9...", "address": "signup-bot@k7m3qz.mailbay.email"}
# 2. Wait for the next email (up to 60 seconds). The code is already extracted.
curl "https://api.mailbay.dev/v1/inboxes/ibx_01jbz8w4k2q9/wait?subject=code&timeout=60" \
-H "Authorization: Bearer $MAILBAY_API_KEY"claude mcp add --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 mb_live_..." }
}
}
}{
"mcpServers": {
"mailbay": {
"command": "mailbay-mcp",
"args": ["stdio"],
"env": { "MAILBAY_API_KEY": "mb_live_..." }
}
}
}The MCP server has 15 tools, among them create_inbox, wait_for_email, get_message, send_email and reply. Use the stdio option for tools that only start local programs.
Example: an agent waits for its sign-in code
Agent
Created signup-bot@k7m3qz.mailbay.email. Signing up, then waiting for the email.
Email arrives: "Your sign in code"
Use 482913 to finish signing in.
What the wait call returns
codes: ["482913"]
Who it is for
Pick the page closest to what you are building.
Limits, honestly
What it does not do, so you can decide before you start.
- The MCP server signs in with an API key sent as a bearer token. OAuth sign-in is planned and is not available yet.
- A wait call gives up after the timeout you set, so your agent should handle an empty result.
- The free plan includes 3 inboxes. Billing is not live yet, so there is no way to buy more today.
- Sending from a mailbay.email address is a sandbox. Verify your own domain to email anyone.
- Sukhovei Mail hands your agent the message and its codes. It does not decide whether a message is safe to act on.
Questions
What is MCP?
MCP (Model Context Protocol) is a standard that lets AI tools such as Claude Code and Cursor call outside services. Our MCP server gives them email tools like create_inbox and wait_for_email.
Do I need MCP to use agent inboxes?
No. The same features are in the REST API and the CLI. MCP just saves you from writing glue code, because the agent can call the tools itself.
How does the agent get a sign-in code?
It calls wait_for_email (or GET /v1/inboxes/{id}/wait) after the service sends the message. The call returns the message with verification codes and links already extracted.
How is this different from giving the agent my Gmail?
A separate inbox holds only the mail meant for that agent, and you can delete it when the job is done. Your personal mailbox is never connected to the agent.
Try it on the free plan.
The free plan has 3 inboxes, 3,000 emails a month and 3 custom domains. No card needed.