Email infrastructure for AI agents
An agent that sends and receives email needs an identity, a way to poll for messages without losing one on a crash, and none of the OAuth consent screens or MIME-parsing plumbing a human-inbox integration requires.
Create a mailbox and the agent has a real address on inbound.euromail.dev — no domain to verify, no OAuth grant, no mailbox provider account. From there the lifecycle is four steps, and the third one is the part most inbox integrations get wrong.
- Create. One
POST /v1/agent-mailboxescall returns an address like[email protected]. Pass a customlocal_partfor a fixed address such as[email protected]instead of a generated one. - Poll.
GET /messages/nextlong-polls for up to 60 seconds and returns as soon as a message arrives — no webhook endpoint to expose, no queue infrastructure to run. - Lease. A successful poll leases the message for 5 minutes, hiding it from other pollers, and hands back a
lease_token. If the agent crashes mid-processing, the lease expires and the message returns to the queue automatically — nothing is silently dropped. - Acknowledge. Ack the
lease_tokenonce processing succeeds, or nack it to requeue immediately instead of waiting out the lease.
Or skip the API entirely
The @euromail/mcp-server package exposes sending, delivery status, domain management, and more as Model Context Protocol tools. Add it to Claude Desktop, Cursor, or any MCP-compatible client with an API key in the environment, and the assistant calls the tools directly — no integration code to write or maintain.
{
"mcpServers": {
"euromail": {
"command": "npx",
"args": ["@euromail/mcp-server"],
"env": { "EUROMAIL_API_KEY": "em_live_..." }
}
}
}
Related
-
Agent mailboxes
A persistent address on inbound.euromail.dev with at-least-once delivery.
-
MCP server
Model Context Protocol tools so an assistant can send and check email without glue code.
-
Inbound email
Route incoming mail to a webhook or a mailbox by address or pattern.