cd /news/ai-agents/add-an-email-mcp-server-to-claude-co… · home › topics › ai-agents › article
[ARTICLE · art-181271] src=trotta.email ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Add an email MCP server to Claude Code

Trotta Mail released an MCP server that gives Claude Code its own email inbox, added with the single command `claude mcp add --transport http trotta https://api.trotta.email/mcp` and authenticated either through a Trotta Mail sign-in or a `TROTTA_MAIL_API_KEY` bearer token. The server exposes seven tools — `wait_for_message`, `read_message`, `thread_context`, `send_message`, `reply_to_message`, `create_inbox` and `scan_content` — letting the coding agent wait for verification mail, read codes, send and reply, while every message is screened before delivery and held mail is withheld from the agent until a human releases it. Trotta Mail states that a signed-in agent cannot call `create_inbox` and that `wait_for_message` times out after up to 60 seconds, so the inbox matters because mail that steers a command-running coding agent is a hijack risk.

key takeaway

Claude Code can be given an email inbox by adding the Trotta Mail MCP server at https://api.trotta.email/mcp with `claude mcp add --transport http trotta`, which exposes wait_for_message (60-second timeout, has_code filter), read_message, thread_context, send_message, reply_to_message, create_inbox

by read4 min views2 publishedDec 3, 2026
Add an email MCP server to Claude Code
Image: Trotta (auto-discovered)

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

  1. Add the server.
  2. Sign in with Trotta Mail from your shell, or run /mcp inside Claude Code.
  3. 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/mcp
claude mcp login trotta

Use an API key

  1. Put your key in the TROTTA_MAIL_API_KEY environment variable. Your shell fills it in when the command runs.
  2. 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 withclaude mcp login trotta , or check that the header readsAuthorization: Bearer followed by your key.
  • create_inbox is 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_message returns 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 3 agent inboxes and 3,000 agent 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.

── more in #ai-agents 4 stories · sorted by recency
── more on @trotta mail 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/add-an-email-mcp-ser…] indexed:0 read:4min 2026-12-03 · —