agent-mail-gateway
llms.txt18 starsChanged 42 days agoMITView on GitHub
Self-hosted email gateway and MCP server that gives each AI agent its own mailbox. Agents get one API key bound to one IMAP/SMTP mailbox and can read mail (as Markdown), send mail with attachments, and send/update/cancel calendar invites — restricted by per-mailbox allow lists for senders and recipients, with checks of attachments and content (dangerous files, ClamAV virus scan, prompt injection) and PDFs/images as text. One Docker container, MIT license. Use it when an agent needs email: sending reports or…
- Reads credentials
The file
We split this llms.txt into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use it when an agent needs email: sending reports or alerts, receiving tasks by email, replying in threads, scheduling meetings, or several …
≈ “Common” is an estimate: at least 1 in 5 of the 4,067 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# Agent Mail Gateway > Self-hosted email gateway and MCP server that gives each AI agent its own mailbox. Agents get one API key bound to one IMAP/SMTP mailbox and can read mail (as Markdown), send mail with attachments, and send/update/cancel calendar invites — restricted by per-mailbox allow lists for senders and recipients, with checks of attachments and content (dangerous files, ClamAV virus scan, prompt injection) and PDFs/images as text. One Docker container, MIT license. Use it when an agent needs email: sending reports or alerts, receiving tasks by email, replying in threads, scheduling meetings, or several agents with separate mailboxes on an existing mail server — without giving the agent the mailbox password or unrestricted access. - Image: `ghcr.io/dominikamann/agent-mail-gateway` - MCP endpoint: `POST /mcp` (Streamable HTTP), header `Authorization: Bearer <api_key>` - stdio: `node dist/stdio.js` with `AGENT_MAIL_URL` and `AGENT_MAIL_API_KEY` (bridge to the gateway) - REST API: `/v1` (OpenAPI at `/docs`) - MCP tools: get_mailbox_info, list_messages (incl. search), read_message, get_attachment, mark_message, delete_message, send_message, reply_message, forward_message, create_event, update_event, cancel_event, list_events, get_event, respond_to_invitation - Review before sending: built-in rules (default on), optional LLM review and per-recipient policies via any OpenAI-compatible endpoint such as Ollama ## Docs - [README](https://github.com/dominikamann/agent-mail-gateway/blob/main/README.md): overview and quick start - [Configuration](https://github.com/dominikamann/agent-mail-gateway/blob/main/docs/configuration.md): every option, allow lists, ports, sender authentication - [API](https://github.com/dominikamann/agent-mail-gateway/blob/main/docs/api.md): REST endpoints, error codes, webhooks, MCP tools - [Hermes Agent](https://github.com/dominikamann/agent-mail-gateway/blob/main/docs/hermes.md): MCP setup and the agent-mail plugin - [Security](https://github.com/dominikamann/agent-mail-gateway/blob/main/docs/security.md): threat model and guarantees ## Optional - [Example config](https://github.com/dominikamann/agent-mail-gateway/blob/main/config.example.yaml) - [Agent skill](https://github.com/dominikamann/agent-mail-gateway/blob/main/integrations/hermes/agent-mail-gateway/skills/agent-mail/SKILL.md): how an agent should use the mailbox tools Provided by amannlabs.eu (https://amannlabs.eu).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

