Self-hosted email for AI agents — the open-source alternative to AgentMail. One compose file → unlimited inboxes, OTP extraction, MCP server.
git clone https://github.com/openagentemail/openagentemail{
"mcpServers": {
"openagentemail": {
"command": "node",
"args": ["/path/to/openagentemail/dist/index.js"]
}
}
}Resumen de MCP Servers
# openagent.email
**Self-hosted email for AI agents. The open-source alternative to AgentMail.**
**[openagent.email](https://openagent.email)** · website: [openagentemail/website](https://github.com/openagentemail/website)
[](LICENSE)
[](https://github.com/openagentemail/openagentemail)
One `docker compose up` on your own VPS gives every agent you run unlimited real
mailboxes on your own domain — over REST and MCP — with OTP and verification-link
extraction built in. No per-inbox pricing, no third party ever seeing your mail.
## Quickstart
Prerequisites: a VPS with outbound/inbound port 25 open, and a domain you control.
```bash
git clone https://github.com/openagentemail/openagentemail.git && cd openagentemail
cp .env.example .env # set DOMAIN, API_KEYS, and the mailbox password
docker compose up -d && ./deploy/dns-records.sh # prints the exact DNS records to create
```
Then verify everything end to end:
```bash
./deploy/doctor.sh # checks DNS, TLS, IMAP/SMTP login, and a round-trip send
```
Create an identity and hand your agent its scoped token (shown once):
```bash
curl -X POST http://localhost:3100/v1/identities \
-H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
-d '{"name":"signup-bot"}'
# → 201 {"address":"fox-k7d2@example.com","name":"signup-bot","token":"oa_…"}
```
The API binds to `127.0.0.1` by default — reach it from other hosts over an
SSH tunnel or a TLS proxy: [docs/security.md](docs/security.md).
## Features
- **Unlimited identities** — one catch-all mailbox, unlimited `anything@yourdomain`
addresses. No provisioning, no per-inbox cost.
- **Scoped tokens** — every identity gets its own token that can only read and
send as that address. The admin key never has to touch your agents.
- **REST + MCP** — the same six operations over a plain HTTP API and a first-class
MCP server your agents can call directly.
- **`mail_wait_for` / `POST /v1/messages/wait`** — long-poll an inbox until a
matching message arrives, with OTP codes and verification links already extracted.
Built for automated signups.
- **Safety rails built in** — per-identity send rate limits (20/hour default),
automatic mail retention (30 days default), localhost-only API binding.
- **Bring your own relay** — send directly from the VPS, or route outbound through
Amazon SES / SMTP2GO / any SMTP relay with one env var.
- **DNS wizard + doctor** — `deploy/dns-records.sh` generates your exact DNS records;
`deploy/doctor.sh` diagnoses deliverability before your agents depend on it.
- **Single dependency: Docker.** The stack is the API plus
[docker-mailserver](https://github.com/docker-mailserver/docker-mailserver). Nothing else.
## How it works
```
┌─────────────┐ MCP (stdio) ┌──────────────────┐
│ AI agents ├──────────────────▶ │
│ (Claude Code,│ │ openagent api │
│ Cursor, …) │ REST /v1/* │ (Node, imapflow │
└─────────────┘──────────────────▶ │ + nodemailer) │
└────────┬─────────┘
│ IMAP + SMTP (localhost)
┌────────▼─────────┐ SMTP 25
│ docker-mailserver│ ◀──────────▶ the world
│ catch-all mailbox│ (or your relay: SES, …)
└──────────────────┘
```
One catch-all account on your domain receives everything. The API logs into it over
IMAP, matches messages to identities by the `To`/`Delivered-To` header, and sends
via SMTP with the `From` rewritten to the chosen identity. Polling + IMAP IDLE for
low-latency waits.
## Use it from your agent (MCP)
```json
{
"mcpServers": {
"openagentemail": {
"command": "bun",
"args": ["run", "/path/to/openagentemail/packages/mcp/src/main.ts"],
"env": {
"OPENAGENTEMAIL_API_URL": "http://localhost:3100",
"OPENAGENTEMAIL_API_KEY": "oa_…identity-token"
}
}
}
}
```
Tools: `mail_new_identity`, `mail_list_identities`, `mail_list_messages`,
`mail_read_message`, `mail_wait_for`, `mail_send`.
Full per-client setup (Claude Code, Claude Desktop, Cursor, Kimi Code, generic):
[docs/mcp-clients.md](docs/mcp-clients.md) · server details:
[packages/mcp/README.md](packages/mcp/README.md)
## Why self-host?
- **Privacy** — OTP codes and verification links are credentials. Self-hosted, they
never leave a machine you own. No third party reads, stores, or trains on your mail.
- **Cost** — a $5 VPS and a domain you already have vs. per-inbox/per-message SaaS
pricing that scales linearly with your agent fleet.
- **Control** — your IPs, your reputation, your retention. No rate limits, no
account suspensions, no sudden API deprecations.
## Server requirements
Measured on our own production instance, idle: **~190 MB RAM total, ~0% CPU**,
and ~2 GB of disk for the Docker images. Mail itself is a rounding error —
retention auto-deletes after 30 days.
| Tier | Spec | Notes |
|---|---|---|
| Minimum | 1 vCPU / 1 GB RAM / 10 GB disk | works with the defaults (ClamAV and SpamAssassin off) |
| Comfortable | 1 vCPU / 2 GB RAM / 20 GB disk | headroom to enable SpamAssassin |
| With antivirus | 4 GB RAM | ClamAV alone needs ~1 GB extra |
That's a $5/mo VPS — or a $10–15/**year** deal box. The real prerequisite isn't
size, it's **port 25**: AWS, GCP, Azure, DigitalOcean and Vultr block it by
default (some unblock on request). Check before you buy — or route outbound
through a [relay](docs/deliverability.md) and you don't need port 25 out at all.
## Comparison
| | **openagent.email** | AgentMail.to | MailSlurp |
|---|---|---|---|
| Open source | ✅ Apache-2.0 | ❌ | ❌ |
| Self-hosted | ✅ | ❌ | ❌ |
| Price | Flat VPS cost | Per-inbox subscription | Usage-based subscription |
| Unlimited inboxes | ✅ (catch-all) | Paid tiers | Paid tiers |
| MCP-native | ✅ | ✅ | ❌ (REST/SDKs) |
| OTP/link extraction | ✅ | ✅ | ✅ |
| Data leaves your infra | Never | Always | Always |
## Roadmap
- **v0.1** — REST + MCP, catch-all identities, `wait_for` with OTP/link
extraction, DNS wizard + doctor, optional SMTP relay.
- **v0.2 (current)** — scoped per-identity tokens, send rate limits, automatic
retention, localhost-safe defaults, expanded OTP corpus.
- **Next** — outbound webhooks (push instead of `wait_for` polling), admin web UI,
multi-domain support, Sieve-style per-identity rules.
- **Distribution** — planned one-click app in the
[OpenShip](https://github.com/oblien/openship) catalog.
## Docs
- [docs/api.md](docs/api.md) — REST API reference with curl examples
- [docs/security.md](docs/security.md) — tokens, exposure, rate limits, retention
- [docs/mcp-clients.md](docs/mcp-clients.md) — MCP setup for every major client
- [docs/dns-setup.md](docs/dns-setup.md) — DNS records, explained one by one
- [docs/deliverability.md](docs/deliverability.md) — the field guide to actually
landing in the inbox
## Contributing
Issues and PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md).
## License
[Apache-2.0](LICENSE)
Lo que la gente pregunta sobre openagentemail
¿Qué es openagentemail/openagentemail?
+
openagentemail/openagentemail es mcp servers para el ecosistema de Claude AI. Self-hosted email for AI agents — the open-source alternative to AgentMail. One compose file → unlimited inboxes, OTP extraction, MCP server. Tiene 0 estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala openagentemail?
+
Puedes instalar openagentemail clonando el repositorio (https://github.com/openagentemail/openagentemail) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar openagentemail/openagentemail?
+
openagentemail/openagentemail aún no ha sido auditado por nuestro agente de seguridad. Revisa el repositorio original en GitHub antes de usarlo en producción.
¿Quién mantiene openagentemail/openagentemail?
+
openagentemail/openagentemail es mantenido por openagentemail. La última actividad registrada en GitHub es de today, con 0 issues abiertos.
¿Hay alternativas a openagentemail?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega openagentemail en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/openagentemail-openagentemail)<a href="https://claudewave.com/repo/openagentemail-openagentemail"><img src="https://claudewave.com/api/badge/openagentemail-openagentemail" alt="Featured on ClaudeWave: openagentemail/openagentemail" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!