AI agents that need to sign up for services, receive confirmations, or manage an inbox have a new option. Mails-Agent is an open-source TypeScript project that gives any agent a complete email identity with send, receive, search, and automatic verification code extraction.
The setup runs entirely on Cloudflare's free tier: Workers for the API, D1 for storage with full-text search, R2 for large attachments, and Email Routing for inbound mail. Outbound sending goes through Resend (also free for up to 100 emails per day). You bring your own domain, deploy with Wrangler, and your agent gets a working [email protected] address.
The feature list is surprisingly deep for a project that's less than two weeks old. Verification code extraction works across English, Chinese, Japanese, and Korean. Email threading uses standard In-Reply-To headers. There's automatic labeling (newsletter, notification, personal), structured data extraction for orders and receipts, webhook notifications with HMAC signatures, and as of version 1.6, semantic search powered by Cloudflare Workers AI embeddings. A dashboard console at mails0.com provides visual email management.
The project ships with a CLI (npm install -g mails-agent), a TypeScript SDK for programmatic access, a Python SDK for async agents, and an MCP server for plugging directly into Claude Desktop, Cursor, or any MCP-compatible client. That MCP integration is what makes this particularly practical: your coding agent can check its email without you writing any glue code.
Mails-Agent is a fork of chekusu/mails (263 stars), extended by Gene Dai with mailbox isolation, the delete API, R2 storage, threading, and the semantic search layer. Six releases shipped between March 25 and March 29, which is either impressive velocity or a warning sign depending on your tolerance for fast-moving dependencies. The project is MIT licensed.