# Repository Briefing: cloudmail-hq/cloudmail
> Source: https://repoforai.com/repo/cloudmail-hq/cloudmail (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/cloudmail-hq/cloudmail
- **Official Docs / Website**: https://trycloudmail.com
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: TypeScript
- **License**: See repository
- **Engineering Health**: B+ (73/100 · Maintenance 35/35 · Adoption 12/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v1.6.0 (2026-12-04) — https://github.com/cloudmail-hq/cloudmail/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, MCP, CLI, API
- **Momentum**: 103 ★ total (+7 24h / +102 7d) · 14 forks
- **Topics**: `ai-agents`, `cli`, `cloudflare`, `cloudflare-email`, `cloudflare-workers`, `durable-objects`, `email`, `email-client`, `email-routing`, `mcp`, `mcp-server`, `self-hosted`
- **When to Use**: Best for: Teams that operate custom-domain mail on Cloudflare and want shared webmail plus dedicated agent inboxes with human approval for outbound messages. Skip if: You need IMAP or SMTP server compatibility, a full productivity suite, deployment outside Cloudflare, or a mail service whose DNS and delivery setup someone else manages.

## Overview
```text
### Architecture & Core Mechanics
Cloudflare Email Routing sends inbound mail to a TypeScript Worker that serves both a Hono API and a React Router 7 server-rendered web client. Each mailbox has its own SQLite-backed MailboxDO. AuthDO holds accounts, sessions, tokens, domains, and licensing state. R2 stores raw messages, attachments, and exports; Vectorize uses a separate namespace for each mailbox's semantic index.

The React 19 client uses TanStack Query and TipTap for data fetching and rich-text composition. Assistant execution lives in a Cloudflare Agents SDK Durable Object; other objects handle webhooks, events, and MCP. The integration surface is the same deployment: agents can use OAuth-authenticated MCP, a CLI, REST, or OpenAPI-derived SDKs. Mailbox-sized storage is a clear isolation boundary, but these components tie the runtime to Cloudflare rather than to a portable Node.js mail server.

### Key Capabilities & Differentiators
Cloudmail combines multi-domain webmail, aliases and catch-alls, and role-based shared inboxes. The web client supports threads, search operators, snooze, scheduled sending with a 30-second undo window, and follow-up sequences that stop on reply. Outbound delivery can use Cloudflare Email Service, Amazon SES, or Resend on a per-domain basis, with suppressions, unsubscribe headers, and a spam-rate circuit breaker.

Workers AI or an Anthropic- or OpenAI-compatible gateway backs features such as summaries, triage, semantic search, inbox Q&A, and reply drafting. The agent interface includes 73 MCP tools, CLI JSON output, TypeScript and Python SDKs, and REST with idempotency keys and signed webhooks. A separate mailbox and token give each agent a distinct identity. Agent and API-token sends require human approval by default, and agents cannot approve their own sends.

### Trade-offs & Limitations
Compared with Google Workspace or Microsoft 365, Cloudmail replaces email, not the office suite. It provides shared mailboxes and agent identities without a per-seat application fee, but omits calendars, contact sync, documents, and calls. Mail clients need mail-only Exchange ActiveSync with an app password; Cloudmail is not an IMAP or SMTP server, so existing client and relay workflows need a compatibility check.

Self-hosting puts mail storage in your Cloudflare account, not on infrastructure independent of Cloudflare. You take on DNS, routing, provider configuration, and delivery checks. An external AI gateway or sending provider also changes where data is processed. The public source is described as fair source; check the license files before relying on reuse or redistribution rights. After the seven-day trial, a one-time $9 or $29 application license is required, separate from Cloudflare and provider charges. The application checks in with the vendor for licensing.

### Hardware & Deployment Guide
Use the guided Cloudflare deploy or Wrangler; local build and test tooling requires Node.js 22.5+. Enable R2 first, retain the suggested Worker name because routing rules and mailbox Durable Objects are tied to it, and set SETUP_TOKEN and AUTH_SECRET separately. Create the owner at /setup, connect a Cloudflare token, and review planned MX and catch-all changes before applying them. Migrate existing mail before switching providers, then test inbound and outbound delivery.

Workers Free can receive mail, but Cloudflare's outbound sender is limited to verified recipients there; SES or Resend can cover external recipients. Free-plan CPU and daily quotas also matter for large messages and AI work. The usual Workers Paid baseline is about $5 per account per month, with 3,000 Cloudflare-sent messages included. For upgrades, v1.4.0 calls out a manual step, v1.5.0 adds conversation context to send approval, and v1.6.0 writes message.received with the message and retries failed handoffs to the webhook service.
```

## Key Capabilities
```text
- Storage: One SQLite Durable Object per mailbox, with raw messages and attachments in R2 and a per-mailbox Vectorize namespace.
- Agent integration: OAuth MCP with 73 tools, a CLI with JSON output, OpenAPI-derived TypeScript and Python SDKs, and REST with idempotency keys.
- Send control: Agent and API-token sends require human approval by default; v1.5.0 added full thread context to the approval view.
- Event durability: v1.6.0 persists message.received alongside the inbound message and retries failed handoffs to the webhook service.
- AI backends: Workers AI or an Anthropic- or OpenAI-compatible gateway for summaries, triage, inbox Q&A, and reply drafting.
- Mail transport: Cloudflare Email Routing for inbound mail, with Cloudflare Email Service, Amazon SES, or Resend for outbound delivery.
```

## Quick Start / Clone
```bash
claude mcp add --transport http cloudmail https://mail.example.com/mcp
```
