Agent Mail Gateway MCP server
io.github.dominikamann/agent-mail-gateway·v0.5.0Self-hosted email for AI agents: own IMAP/SMTP mailbox per key, allow lists, calendar invites.
not scanned yet
0 stars
Reviews
Write oneNobody has reviewed Agent Mail Gateway yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Agent Mail Gateway tools
No tool declarations could be read from the package source. They show once the server is installed.
How Agent Mail Gateway compares
Against every graded Email MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 82% of 916 Email servers
Release history: 5 versions in the registry since 2026-10-02, latest 2026-10-20, typically one every 1 day.
Install Agent Mail Gateway in Claude Code, Cursor or VS Code
claude mcp add agent-mail-gateway -- docker run -i --rm ghcr.io/dominikamann/agent-mail-gateway:0.5.0
What the publisher says
From the Agent Mail Gateway repository's README, as published. We do not edit it. Read it on GitHub
Agent Mail Gateway
Give every AI agent its own email mailbox — without giving it the keys to that mailbox.
Agent Mail Gateway is a small self-hosted Docker service that sits between your agents and ordinary IMAP/SMTP mailboxes (Plesk, IONOS, Outlook, your own server — any provider). Each agent gets one API key bound to exactly one mailbox. Through the gateway it can read mail, send mail with attachments, and send, update or cancel calendar invitations. You decide who each agent may receive mail from and who it may write to; everything else is filtered out.
Mail bodies are delivered to the agent as Markdown (converted from HTML) and the agent writes Markdown that is sent as HTML — far fewer tokens than raw HTML email.
In short: a self-hosted email MCP server and REST API for AI agents — IMAP/SMTP mailbox access with sender/recipient allow lists, HTML-to-Markdown, attachments and calendar invites, packaged as one Docker container.
Typical use cases
Outlook, Postfix/Dovecot, …) without exposing the mailbox passwords to them.
- An assistant agent that sends you daily reports, summaries or alerts by email.
- Agents that receive tasks or documents by email and answer them in the same thread.
- Agents that schedule, move and cancel meetings with you via calendar invitations.
- Giving several agents separate mailboxes on your existing mail server (Plesk, IONOS,
injection by email and against agents mailing the wrong people.
- Locking an agent down so it can only talk to approved people — useful against prompt
Works with any MCP client (for example Hermes Agent, Cursor, VS Code, n8n, LangChain/LangGraph MCP adapters) and with anything that can make HTTP requests.
Features
Non-allowed mail is moved to Trash (default) or left untouched.
- N mailboxes, one key each — a key can never reach another mailbox.
- Allow lists per mailbox for receiving and sending (name@domain or *@domain).
- Filtered mail is invisible — not listed, not readable, not even by guessing an id.
- Spoofing protection — senders must pass SPF/DKIM/DMARC as reported by your mail server.
- HTML ⇄ Markdown conversion in both directions.
- Attachments in and out.
- Calendar invites (iCalendar) that update or cancel cleanly in Outlook, Gmail and Apple Calendar.
- REST API with OpenAPI docs at /docs, and an MCP server at /mcp with the same tools.
- Webhooks (HMAC-signed) when an allowed message arrives; new mail is detected instantly via IMAP IDLE.
- Send rate limit per mailbox and an audit log of every send, rejection and deletion.
- Works with any IMAP/SMTP server: TLS on 993/465 or STARTTLS on 143/587.
How it works
Agent ──REST/MCP + API key──▶ ┌──────────────────────────────────────┐
│ Auth key → exactly one mailbox │
Agent ◀──signed webhook────── │ Policy sender/recipient checks │
│ Converter HTML ⇄ Markdown │
│ Calendar build/update/cancel .ics │
│ Mailbox IMAP read + IDLE watcher │──IMAP──▶ mail server
│ Sender SMTP + copy to Sent │──SMTP──▶
│ Store SQLite (small state) │
└──────────────────────────────────────┘
config.yaml + .env (read-only)The gateway stores no mail content; mail stays on your mail server.
Quick start
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Agent Mail Gateway: common questions
- Is Agent Mail Gateway MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Agent Mail Gateway safety report
- How do I install Agent Mail Gateway?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Agent Mail Gateway need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Agent Mail Gateway maintained?
- The last commit was 32 days ago (2026-10-02). The latest release is v0.5.0.
- What can I use instead of Agent Mail Gateway?
- Servers from other publishers that do the same job: Mailoo - Email MCP Server, e2a — email for AI agents MCP server and Email MCP server.
Alternatives to Agent Mail Gateway
Same job from other publishers: the closest match first, then the best rated.
- Mailoo - Email MCP ServerEmail MCP server for AI agents: IMAP/SMTP, Gmail, Outlook, calendar, ManageSieve, AI triage, OAuth2.5.0(1)GrowingA
- e2a — email for AI agentsAuthenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.not reviewedEstablishedA
- EmailIMAP/SMTP email MCP server — 52 tools, stdio + HTTP, IMAP IDLE push, multi-account, AI triage.not reviewedEstablishedB
- ImapIMAP/SMTP MCP server to search, read, organize, send, reply & forward email for AI assistantsnot reviewedEstablishedA
Outlook AssistantMicrosoft Outlook MCP server — 22 tools for email, calendar, contacts, and mailbox management.not reviewedEstablishedA