Give Claude Code an email inbox over MCP
Give Claude Code an inbox of its own with one command: claude mcp add --transport http trotta https://api.trotta.email/mcp. Then sign in with Trotta Mail, or pass an API key. Claude Code can wait for mail, read verification codes, send and reply, and every message it reads was screened before delivery.
Updated
What Claude Code can do with the inbox
With the server added, Claude Code can finish an email step without leaving the terminal: sign up to a service under test, wait for the message, read the code and carry on. The MCP docs list every tool.
| Tool | What it does |
|---|---|
wait_for_message | Waits for the next delivered message. Filters include has_code. |
read_message | Reads one message in the safe view. |
thread_context | Returns a thread as model-ready text with a trust level. |
send_message | Sends a new message. Screened before it leaves. |
reply_to_message | Replies in the thread. |
create_inbox | Creates an inbox and returns its address. Needs an API key. |
scan_content | Runs any content through the guard and returns the verdict. |
{
"name": "wait_for_message",
"arguments": { "inbox_id": "inb_7Qh2mXc4", "has_code": true, "timeout": 60 }
}Set up Trotta Mail in Claude Code
Claude Code connects to https://api.trotta.email/mcp in one of two ways: you sign in with your Trotta Mail account, or you pass an API key. Use the URL exactly as written, with no slash at the end.
Sign in with Trotta Mail
- Add the server.
- Sign in with Trotta Mail from your shell, or run
/mcpinside Claude Code. - Pick the inboxes Claude Code may use, and whether it may read, send or both. Then allow.
claude mcp add --transport http trotta https://api.trotta.email/ mcpclaude mcp login trottaUse an API key
- Put your key in the
TROTTA_MAIL_API_KEYenvironment variable. Your shell fills it in when the command runs. - Add the server with your key.
claude mcp add --transport http trotta https://api.trotta.email/ mcp --header "Authorization: Bearer $TROTTA_MAIL_API_KEY"For a key, create an agent inbox and a key in the console, or see the quickstart. These steps follow the Claude Code docs, checked on 2026-11-20.
What Claude Code sees and what it never sees
Claude Code sees mail in the safe view. Hidden text is gone, instructions aimed at a model are replaced by a note, and risky links are defanged. MCP tools return the safe view always, whatever scopes the key holds.
Claude Code never sees held mail. A held message shows as withheld, with the reason and no content, until a human releases it. In an inbox of its own, the sign-up codes Claude Code asks for are its to read. In a human's mailbox, login codes and password resets are sealed.
A coding agent runs commands, so mail that steers it is costly. In a human's everyday mailbox, a real-looking message can carry text written to hijack an agent. A Trotta Mail inbox screens each message before it is accepted. No filter catches everything, so uncertain mail waits for a human.
Three things to try
- Run the sign-up test with riley@trotta.email, wait for the verification email and enter the code.
- Email jordan@trotta.email a short summary of the failing tests on this branch.
- Run this email text through the guard and tell me the verdict before I act on it.
Troubleshooting
- The server answers 401. The request carried no token, or one that is not good. Finish the sign-in with
claude mcp login trotta, or check that the header readsAuthorization: Bearerfollowed by your key. create_inboxis refused after sign-in. A signed-in agent cannot create inboxes. Create the inbox in the console, or connect with an API key.wait_for_messagereturns nothing. It times out after up to 60 seconds, so call it again. It never returns held mail: checklist_held.
Questions
Does Trotta Mail for Claude Code work on the Free plan?
Yes. The Free plan is $0 with 2 inboxes and 1,000 emails a month. MCP and every check are on every plan.
Should Claude Code sign in or use an API key?
Sign in when a human is at the terminal: there is no key to paste, and you pick the inboxes. Use an API key for unattended runs, or when Claude Code should create inboxes.
Can Claude Code read verification codes?
Yes, in an inbox of its own. With has_code set, wait_for_message returns as soon as a message with a code is delivered. In a human's mailbox, login codes are sealed.
Is Trotta Mail made by Anthropic?
No. Trotta Mail is an independent product that works with Claude Code as a remote MCP server. It is not made or endorsed by Anthropic.