email infrastructure · built for autonomous agents

Email for AI agents

Hand your agent one API key and it spins up real inboxes on demand, enough to verify a one-time code, follow a magic link or claim a trial. We do not gate you behind bot checks, and we do not meter your sending by plan.

Get an agent keyUse the MCP server

MCP server included

Drop-in tools for Claude Desktop, Cursor, Hermes, OpenClaw and any MCP client.

One key, many inboxes

Spin up real, deliverable inboxes on demand with a single API key.

Real addresses, not a sandbox

Deliverable inboxes on our own mail servers, DKIM-signed on the way out, with nothing in our terms forbidding automation.

An agent needs an address it can come back to

An agent that signs up for a service is not finished when the signup succeeds. The confirmation link arrives minutes later, the password reset arrives next week, the renewal notice arrives next month. A throwaway address that expires between those moments turns every one of them into a dead end.

Here the address persists and only the messages expire, so an agent can register today and still read that service's mail on a later run.

Tools, not a REST reference

A model does not read API documentation well, and it should not have to. MailFlat ships ready-made tool sets for the common agent frameworks: an MCP server for clients like Claude Desktop and Cursor, a tool suite for the Vercel AI SDK, and a toolkit for LangChain including a real async variant. The model calls tools by name; the HTTP lives in the SDK underneath.

The tool descriptions are written for the model rather than for a human skimming a table, because the description is the only instruction the model actually gets.

The part agents get wrong

Sending mail is accepted immediately and delivered on a queue, which means an agent that sends and hears nothing back has no idea whether the message went out. The reasonable next move for an agent in that position is to send again, so the real failure is not a lost email, it is the recipient getting two.

So there is a tool that answers the question directly, and it distinguishes between "still queued, do not resend" and "permanently failed". Those are different answers and an agent that confuses them behaves badly in opposite directions.

What the model never sees

Tool output is stripped of per-inbox credentials before it reaches the model, so a key cannot leak into a transcript or a prompt log. File bytes stay out of the model surface too: an agent can send attachments from code, but a multi-megabyte file has no business travelling through a context window.

Read the details

Agents and testingHow agent inboxes differ from ordinary ones.Agent signup recipeA worked end-to-end flow: register, get the code, confirm.LangChain toolkitSync and async toolkits with identical tool surfaces.Vercel AI SDKSpread the tool suite straight into generateText.
from mailflat import MailFlat
 
inbox = MailFlat(api_key).create(label="signup")
browser.fill("#email", inbox.address)
otp = inbox.wait_for_otp(timeout=30) # real OTP
browser.fill("#code", otp)

Frequently asked questions

Which agent frameworks work?

Any MCP client (Claude Desktop, Cursor, Hermes, OpenClaw), plus Python and JS SDKs and a copy-paste tool spec for GPT/Claude.

How long do the inboxes last?

The address stays until you delete it; messages auto-purge every two hours by default.

Will the addresses get flagged?

They're real, deliverable inboxes rather than throwaway domains, so they behave like normal email.

Related

mcp email toolemail testing apidisposable email

Ready to try it?

Get an agent key

MailFlat for instant email inboxes for testing, automation & AI agents.