Open source · Self-hosted · Apache-2.0

Email for your agents.
Owned by you.

The open-source alternative to AgentMail. Unlimited real mailboxes for every agent you run, on your own domain — over REST and MCP — with OTP and verification-link extraction built in — and phone push. One guided command gets you started.

Get started on GitHub See it work ↓
npx -y @openagentemail/setup
@openagentemail/setup on npm

Prefer Docker? Manual install →

WORKS WITH ANY MCP CLIENT — AND ANYTHING THAT CAN CURL

Claude Code Cursor Windsurf Docker ✦ Kimi Code ✦ Any MCP client ✦ Plain REST

Live workflow

From deploy to OTP, in one terminal.

This is the actual loop your agent runs: create an identity, trigger a signup, wait for the mail, read the code. Typed out for you below — no video, no mockup.

agent@your-vps — openagent.email

Real mail, really parsed

The formats your agent
will actually meet.

Extraction is tested against the mails that real services send — US and Chinese providers alike. Hover a card to read it.

From: noreply@github.com
Subject: [GitHub] Your launch code
Here's your GitHub launch code, @agent — paste it to finish signing up. It expires in 10 minutes.
59162834
otp.codes → ["59162834"] ✓
From: service@notice.aliyun.com
Subject: 【阿里云】验证码
您正在注册阿里云账号,验证码如下,请在 15 分钟内完成验证。工作人员不会索取验证码,请勿泄露。
509227
otp.codes → ["509227"] ✓
From: no-reply@accounts.google.com
Subject: Your Google verification code
G-482916 is your Google verification code. Don't share it with anyone.
G-482916
otp.codes → ["482916"] ✓

Why it exists

Everything an agent mailbox needs.
Nothing it doesn't.

01

A cockpit for the human

Not a read-only status page — a full working deck. Three-pane inbox with one-click OTP copy. A 30-day notification log with daily summaries and masked sensitive content. A task board where you can nudge or close agent work. Identities, tokens, push tiers, and connected clients — all managed from the browser.

Dashboard Overview: identity table and 30-day stats
02

Phone push, with boundaries

Pair your phone by scanning a QR code — ten seconds, no command line. Three content tiers decide how much of a message may leave the server: just a ping, masked sender + subject, or body + OTP. Tier 3 needs your explicit risk confirmation, and agents can never raise their own tier. Lost phone? One-click revoke cuts it off immediately.

03

Every send, on the record

Agents can send mail too — and you get the ledger. The Sent folder shows what went out: when, from whom, to whom, the subject, and whether it landed (with the failure reason when it didn't). 30 days of history. Message bodies are never stored.

04

MCP 2026-07-28, local or remote

Built on the official SDK v2, current to the dated 2026-07-28 spec. Agents on the same box connect over stdio; cloud agents connect over stateless HTTPS with OAuth. Every authorized client is listed in the dashboard — and revocable.

05

Agent-to-agent tasks

Email-backed task threads with server-stamped states (submittedworkingcompleted/failed). The receiving agent is woken; the dashboard shows a work-order view. A2A-vocabulary Agent Card at /.well-known/agent-card.json (email transport — not wire-protocol claim). Watch the board, page through history, nudge a stuck task or close one out — you're the dispatcher, not just the observer.

06

Unlimited identities

One catch-all mailbox, unlimited anything@yourdomain addresses. No provisioning, no per-inbox cost, no caps.

07

Scoped tokens

Every identity gets its own oa_… token that can only read and send as that address. Your admin key never touches an agent.

08

wait_for + OTP extraction

Long-poll an inbox until the signup mail lands — codes and verification links come out parsed. Built for automated signups.

09

Safety rails

Per-identity send rate limits (20/hour default) and automatic retention (30 days default). Every message carries source: internal|external; non-internal bodies are fenced at the MCP layer. A leaked token can't become a spam cannon.

10

Bring your own relay

Send directly from your VPS, or route outbound through Amazon SES or any SMTP relay with one env var. Your reputation, your choice.

11

DNS wizard + doctor

dns-records.sh prints your exact DNS records. doctor.sh runs a 13-point deliverability check before agents depend on it.

On the record

Speaks the standards — and says exactly how

How it works

Ten minutes, five steps,
every one of them real.

Deploy

Clone, set three env vars, bring the stack up. Two containers: docker-mailserver plus the API.

docker compose up -d

DNS

The wizard prints the exact A / MX / SPF / DKIM / DMARC records to paste into your provider.

./deploy/dns-records.sh

Verify

Thirteen checks: DNS, TLS, port 25, blocklists, PTR. Fix what it flags before your agents depend on it.

./deploy/doctor.sh

Create an identity

One API call mints an address and its scoped token. Hand the token to your agent — never the admin key.

POST /v1/identities → fox-k7d2@yourdomain

Receive

The agent waits on the inbox; the signup mail arrives; the OTP comes back parsed and ready to type.

mail_wait_for → otp.codes[0]
0
REST endpoints
0
MCP tools
0
automated tests
0
bytes of mail leaving your infra*

*unless you opt into push tiers 2/3, which relay via ntfy

REST API

  • POST /v1/identities — mint an address + scoped token
  • GET /v1/identities — list every identity you own
  • POST /v1/identities/:a/token — rotate (revoke) a token
  • DELETE /v1/identities/:a — retire an identity
  • GET /v1/identities/:a/push-tier — read an identity's push content tier
  • PUT /v1/identities/:a/push-tier — set push tier (admin; tier 3 needs confirm)
  • GET /v1/messages — list an inbox
  • GET /v1/messages/:id — full mail + parsed OTP
  • POST /v1/messages/wait — long-poll for new mail
  • POST /v1/messages/:id/seen — mark read / unread
  • POST /v1/send — send as any identity you own
  • POST /v1/tasks — assign an email-backed task to another identity
  • GET /v1/tasks — list task threads you can see
  • GET /v1/tasks/:id — read a task + stamped state history
  • POST /v1/tasks/:id/state — advance a participating task
  • POST /v1/notify — send a server-side notification
  • GET /v1/notify/messages — list recent notification history
  • POST /v1/notify/verify — publish and poll a harmless self-check
  • POST /v1/notify/devices — register a device for push

MCP tools

  • mail_new_identity
  • mail_list_identities
  • mail_list_messages
  • mail_read_message
  • mail_wait_for
  • mail_send
  • mail_mark_seen
  • task_create
  • task_list
  • task_get
  • task_update
  • notify_user
  • notify_agent
  • notify_check
  • notify_verify

Extraction corpus

  • Google, GitHub, Amazon, Microsoft, OpenAI, Discord
  • Aliyun, Tencent Cloud, NetEase
  • Verification / reset / magic links
  • Codes split across HTML tags

The core trick

Raw mail in. Structured OTP out.

Agents shouldn't parse MIME. Every message comes back with codes and action links already extracted — and the raw text and HTML right there when extraction isn't enough.

From: noreply@github.com To: fox-k7d2@yourdomain Subject: [GitHub] Verify your email Here's your GitHub launch code: 59162834 Or verify your email address directly: https://github.com/users/…/confirm_ verification/abc123?via_launch_… This code expires in 10 minutes.
{ "from": "noreply@github.com", "subject": "[GitHub] Verify your email", "otp": { "codes": ["59162834"], "links": [ "https://github.com/…/confirm_verification/…" ] } }

Compared to the alternatives

Different choices, made honestly.

openagent.email AgentMail MailSlurp
Open source Apache-2.0
Deployment any VPSSaaS or BYOC (Outposts on AWS)SaaS only
PriceFlat VPS cost (~$5/mo)Per-inbox subscriptionUsage-based subscription
Unlimited inboxes catch-allPaid tiersPaid tiers
MCP-native REST/SDKs
OTP / link extraction
Mail data residencyYour box*SaaS: theirs; Outposts: your AWS†Always theirs
Vendor control planeNoneYes (incl. Outposts)Yes
You run a serverYes — that's the pointNo (BYOC still vendor-operated)No

To be fair: if you never want to touch a VPS, a hosted service is genuinely easier — and AgentMail's Outposts BYOC is a real option when email content must stay in your AWS account. We still think owning the mailbox — the OTPs, the links, the reputation — with no vendor control plane is worth ten minutes of setup. Your call. Asterisk: push tiers 2/3 relay subject/from or body/OTP via ntfy — off by default. † Outposts keep email content in your AWS; AgentMail still runs dashboard, auth, billing, and upgrades.

Before you ask

Runs on the smallest VPS
you can buy.

Measured on our own production instance, sitting idle: the whole stack — mail server, API, everything — sips about 190 MB of RAM and roughly zero CPU.

MINIMUM

1 vCPU · 1 GB · 10 GB

Works with the defaults. That's a $5/mo VPS — or a $10–15/year deal box.

COMFORTABLE

1 vCPU · 2 GB · 20 GB

Headroom to turn on spam filtering (SpamAssassin) and never think about it again.

WITH ANTIVIRUS

4 GB RAM

ClamAV alone eats ~1 GB, so it ships off by default. Agent mail rarely needs it.

The real prerequisite isn't size — it's port 25. AWS, GCP, Azure, DigitalOcean and Vultr block it by default (some open it on request). Check before you buy — or route outbound through a relay like Amazon SES and skip the fight entirely.

FAQ

Questions people actually ask.

Is it really free?

Yes — self-hosting is free and unlimited under the Apache-2.0 license: no paid tier, no usage limits, no per-inbox pricing. The only thing you pay for is the server you run it on, and a $5/mo VPS is enough. An optional hosted plan (we run it for you) is launching soon — see /pricing.

How is it different from AgentMail?

AgentMail is a hosted SaaS product (usage-based pricing), with an enterprise BYOC option (Outposts) that keeps email content in your AWS account while they still run the control plane. openagent.email is Apache-2.0 software you run yourself on any VPS: unlimited inboxes on your own domain, no vendor control plane, and your mail never leaves a machine you own — unless you opt into push tiers 2/3, which relay subject/from or body/OTP via ntfy. See the full comparison at /alternatives/agentmail.

Do I need my own domain?

Yes — any domain you own, about $10/year. One domain gives every agent you run its own address (agent1@yourdomain, agent2@yourdomain, …). The docs walk through the DNS records step by step.

What agents and clients does it work with?

Anything that speaks MCP — Claude Code, Cursor, Kimi Code, and friends — via the @openagentemail/mcp server, current to the dated MCP 2026-07-28 spec. Cloud agents connect over stateless HTTPS with OAuth — protected-resource metadata per RFC 9728 — or a scoped identity token, and every connected OAuth client shows up in the dashboard where you can revoke it. A plain REST API covers everything else.

Will my mail land in spam?

Deliverability depends on your own IP and domain reputation, which the deliverability guide covers: SPF, DKIM and DMARC are set up for you, and you can relay outbound through Amazon SES if your VPS provider blocks port 25.

Is there a UI for humans?

Yes — a full cockpit at /ui, not just a viewer. Read every agent inbox in a three-pane mail client with one-click OTP copy, review the 30-day push log with daily summaries and masked sensitive content, nudge or close agent tasks from the work-order board, manage identities, tokens, push tiers, and connected clients, pair your phone by QR code, and audit what agents sent from the Sent folder. Trust this device once, stay signed in for 30 days.

Can agents hand work to each other?

Yes. Tasks are email-backed threads between managed identities, with server-stamped states (submitted → working → completed/failed). Creating a task wakes the receiving agent; the dashboard rebuilds each thread into a work-order card with participants, a timeline, and a result block. From the board you can page through history, nudge a stuck task, or close one out.

Can I get alerts on my phone?

Yes — pair the ntfy app by scanning a QR code from the dashboard, after a one-time ntfy HTTPS setup covered in the phone guide. You pick how much of a message may leave the server per identity: just a ping, masked sender + subject, or body + OTP (tier 3 asks for your explicit risk confirmation, and agents can never raise their own tier). Lost phone? One click revokes it.

Is it safe for an agent to read untrusted email?

Safer than raw MIME with no labels. Every message carries source: internal|external — only all-domain recipients get a server HMAC stamp (X-OA-Mail-Stamp). The MCP layer fences non-internal text/html/snippet so the model sees "this is data, not instructions." That is a hygiene baseline for defense-in-depth, not an absolute guarantee against prompt injection.

Open source

Yours to run, read, and fork.

The API, the MCP server, the deploy tooling — all public, all auditable. Run it on a Raspberry Pi or a fleet. Contribute back when you want to.

Apache-2.0

Ready to give your agents
their own inbox?