SSE-first wait
Durable Object pushes new messages over
/v1/inboxes/:id/events. Poll fallback at 500ms when
needed.
Disposable inbox, SSE wait, OTP and magic links — one call from MCP,
REST, or @mailagent/qa in Playwright. Clone the repo,
self-host on Cloudflare, or use our hosted API.
// mailagent_wait_and_extract — one shot
await mailagent_wait_and_extract({
service: "github",
timeoutSeconds: 90,
deleteAfter: true,
});
// → { address, verification: { otp, links } }
Runs on
Open source
Full source on GitHub: Worker, MCP server, QA SDK, and docs. No black box — deploy on your Cloudflare account with your Resend inbound domain.
api.webmailagent.com optional — ask for a keyFeatures
Not a privacy burner for humans — programmatic inboxes with strict sender allowlists and structured verification output.
Durable Object pushes new messages over
/v1/inboxes/:id/events. Poll fallback at 500ms when
needed.
expectFrom rejects unexpected senders. Presets for
GitHub, Stripe, Auth0, Google, Dribbble.
Verification codes and magic links parsed at ingest — ready for your agent without reading raw MIME.
Webhook acks instantly; Resend events processed via Queues with
DLQ and deduped provider_id.
Short-lived addresses (default 30m). Hourly cron purge. Delete after successful extract.
REST for backends, MCP tools for Cursor, JSON CLI for CI pipelines — same flows everywhere.
For QA teams
Each Playwright worker gets its own address. Filter by
label, narrow with subjectContains, optional
webhook when the letter lands — same API agents use.
label=pw-0-… per worker — list and debug inboxes for
one CI job without stepping on teammates.
subjectContains and sender allowlists so you read the
signup OTP, not yesterday’s newsletter.
Self-hosted domain on Resend inbound. Pay for mail volume, not per-seat QA SaaS — API you own.
import { createMailAgentQa, MailAgentQa } from "@mailagent/qa";
const mail = createMailAgentQa();
const { address, id } = await mail.createInbox({
label: MailAgentQa.runLabel("signup"),
service: "auth0",
});
// … fill signup form with address …
const { otp } = await mail.waitForVerification(id, {
subjectContains: "verify",
});
Read the QA guide — labels, callbacks, CI env, Playwright flow.
MCP
Add mailagent to Cursor MCP. The agent creates inboxes,
waits, and returns structured verification — no inbox UI required.
How it works
Agent calls MCP or API. You get an address on your
INBOX_DOMAIN and an inbox id.
Use the address on GitHub, Stripe, Auth0, etc. Resend inbound webhook enqueues the message.
SSE delivers the event; OTP and links return to the agent. Inbox deleted. Flow complete.
Positioning
Consumer burner mail protects your personal inbox. MailAgent automates verification for code.
| MailAgent | Mailosaur / QA SaaS | Typical burner mail | |
|---|---|---|---|
| MCP / API-first | Yes | REST | Browser UI |
| OTP + link extraction | Built-in | Built-in | Manual |
| SSE wait | Yes | Poll | — |
| Per-run isolated inbox | label + API | Yes | Shared pool |
| Sender allowlist | Yes | Patterns | Block in UI |
| Self-hosted domain | Your Resend | Their domain | Their domain |
| Long-lived aliases | TTL only | Yes | Yes |
Open source: clone and deploy in minutes. Hosted API: optional — email us for a key on the shared endpoint.