Isolated email inbox for Claude Code via Streamable HTTP MCP, avoiding risky Gmail OAuth
uriwa · reddit · 2026-11-27
The author argues connecting personal Gmail to Claude Code via OAuth is a bad tradeoff—one prompt injection in an email could reach password resets and billing threads. He open-sourced agentmail, a zero-install Streamable HTTP remote MCP endpoint giving agents their own isolated @theagentmail.net mailbox.
Key implementation details:
- Per-mailbox scoped keys (am...): no org-level tokens; tools/list exposes only the 8 tools for that inbox, physically preventing enumeration of other mailboxes.
- MCP tool annotations (readOnlyHint, destructiveHint, openWorldHint): noticeably cleaner tool selection and safe-read vs. external-write distinction.
- Unauthenticated discovery, strict auth on execution: initialize/tools/list are open; tools/call fails closed with 401 without a Bearer key.
- Outbound spam/phishing guard: every outbound message passes a synchronous LLM classifier inside a Cloudflare Durable Object lock, rejecting phishing with 400 SPAMREJECTED to protect shared domain reputation.
Full stack (Cloudflare Workers, Durable Objects, InstantDB, Resend) is MIT open source; a hosted version is free for 30 days, then $1/mo, or self-host.
Related event: Open-Source AgentMail Gives AI Agents Their Own Inboxes(2 posts)→
More from coding & agent
- Agent benchmarks measure the environment: same model scores 63% vs 82% depending on prompt — ManlingLi_ · 2026-11-27
- Dev seance meme nails it: git blame can't tell a bug from a genius tradeoff — cto_junior · 2026-11-27
- Software engineering fundamentals matter even more in the AI coding era — bendee983 · 2026-11-27
- He gets paid to read Claude, so he built a /tldr skill to fix the bottleneck — rubenhassid · 2026-11-27
- Founder ships MCP-driven video studio that Claude runs end-to-end, $49/mo with free month giveaway — swarmagent · 2026-11-27
- German host's MCP server breached via one SSH-key tool that built shell commands from inputs — shoumikgoswami · 2026-11-27