MailForge
A remote MCP connector that gives Claude hands inside your Gmail — AI-powered inbox triage, zero filter rules.
- TypeScript
- MCP
- Gmail API
- Google OAuth
- Cloudflare Workers
MailForge is a hosted MCP (Model Context Protocol) connector that plugs Claude.ai directly into your Gmail account. Instead of writing filter rules that rot, you describe what you want in plain English — Claude reads your actual inbox, reasons about it in real time, and acts only after you confirm.
The server contains zero AI and zero hardcoded logic. It exposes a small set of deliberate, granular Gmail tools and leaves every judgment call to Claude itself, live in the conversation.
How it works
You add MailForge as a custom connector in Claude.ai and complete a one-time chained consent flow (Claude → MailForge → Google’s permission screen). After that, any Claude conversation can reach into your Gmail:
- “Clean up my inbox” — Claude surveys the situation, proposes a folder taxonomy, waits for your approval, then works through the inbox in pages
- “Find that Axis Bank statement from March” — Claude searches and surfaces the exact message
- “Archive everything from Duolingo” — Claude previews the batch, you confirm, it moves them
Destructive actions (trash) always surface as an approval prompt. Starred and important messages are refused without an explicit override.
V1 tool surface
Read tools (safe, Claude can call freely):
| Tool | What it does |
|---|---|
list_labels |
All labels/folders with message counts |
search_messages |
Run any Gmail search — returns sender, subject, date, snippet |
get_message |
Fetch one full message as clean plain text |
get_inbox_stats |
Counts per category, top senders by volume — the situation report |
Write tools (flagged; Claude asks before acting):
| Tool | What it does |
|---|---|
create_label |
Create a folder (supports nesting like Finance/Banking) |
modify_messages |
Move/archive: add or remove labels on a batch |
trash_messages |
Move to Trash — refuses starred/important without override |
untrash_messages |
Pull messages back out of Trash |
Deliberately absent from V1: sending, drafting, and permanent deletion.
Design principles
- Dumb server, smart conversation — AI judgment lives in Claude, not the server
- Safety by scope — only
gmail.modify; permanent delete does not exist in V1 - Human in the loop — destructive tools flag for approval; no surprises
- Hosted for you — nothing to deploy or maintain; connect and go
Architecture
Claude.ai ──MCP──▶ MailForge (Cloudflare Workers) ──OAuth──▶ Gmail API
Two separate trust relationships: Claude ↔ MailForge (OAuth 2.1 with Dynamic Client Registration), and MailForge ↔ Gmail (standard Google OAuth with encrypted refresh token storage).