wong2/cf-mailroom
Self-hosted email for humans and AI agents, entirely on Cloudflare
What it solves
Mailroom provides a self-hosted email system that allows humans and AI agents to collaborate on the same inbox. It solves the problem of integrating AI into email workflows by allowing agents to triage mail and draft replies that humans can review and approve before they are sent, preventing AI from sending unverified messages autonomously.
How it works
The system is built entirely on Cloudflare's infrastructure (Workers, D1, R2, and Email Routing). It functions as a unified workspace where multiple email addresses can be managed.
- For Humans: A Gmail-style web interface is used to read, compose, and manage threads.
- For AI Agents: An MCP (Model Context Protocol) server allows external agents to read conversations and send mail via scoped OAuth access.
- Automation: Incoming mail is automatically labeled using natural-language rules. If enabled, the system uses a drafting agent to create suggested replies based on custom instructions and playbooks, which are then held in a queue for human approval.
Who it’s for
It is designed for users who want a private, self-hosted email management system where AI can assist with triaging and drafting without having full, unsupervised control over outbound communication.
Highlights
- Human-in-the-loop AI: AI drafts replies but never sends them without explicit human approval.
- MCP Integration: Enables external AI agents to interact with the email system using a standardized protocol.
- Cloudflare Native: Deploys as a serverless application using Workers, D1 (SQL database), and R2 (object storage).
- Automatic Triage: Uses natural-language rules to automatically tag incoming emails.
- Unified Inbox: Supports multiple domains and addresses within a single workspace.
Related
- Project
- Project
- Project
- Project