Give Gemini CLI an email inbox over MCP

Give Gemini CLI an inbox of its own with one command: gemini mcp add --transport http trotta https://api.trotta.email/mcp. Then run /mcp auth trotta inside Gemini CLI and sign in with Trotta Mail, or pass an API key. Every message Gemini CLI reads was screened before delivery.

Updated

What Gemini CLI can do with the inbox

Once the server is added, Gemini CLI can receive, read and send mail as tools, with no local server to install. The MCP docs list every tool.

ToolWhat it does
list_inboxesLists the inboxes the key can reach.
wait_for_messageWaits for the next delivered message, with filters such as has_code.
read_messageReads one message in the safe view.
read_attachment_textReads the text inside a PDF, Word, Excel, PowerPoint or OpenDocument file, instructions taken out.
send_messageSends a new message. Screened before it leaves.
reply_to_messageReplies in the thread.
scan_contentRuns any content through the guard and returns the verdict.

Set up Trotta Mail in Gemini CLI

Gemini CLI connects to https://api.trotta.email/mcp over HTTP. Use the URL exactly as written, with no slash at the end. You sign in with your Trotta Mail account, or you pass an API key in a header.

Sign in with Trotta Mail

  1. Add the server.
  2. In Gemini CLI, run /mcp auth trotta and sign in with Trotta Mail.
  3. Pick the inboxes Gemini CLI may use, and whether it may read, send or both. Then allow.
Step 1: add the server
gemini mcp add --transport http trotta https://api.trotta.email/mcp

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.
Add the server with your key
gemini mcp add --transport http --header "Authorization: Bearer $TROTTA_MAIL_API_KEY" trotta https://api.trotta.email/mcp

For a key, create an agent inbox and a key in the console, or see the quickstart. These steps follow the Gemini CLI docs, checked on 2026-11-20.

What Gemini CLI sees and what it never sees

Gemini CLI sees the safe view of a message. Text hidden from a human is removed, an instruction aimed at a model is replaced by a note, and links that are not clean are defanged. Text read from an attachment has instructions taken out too: see hidden instructions in attachments.

Gemini CLI never sees held mail. It can learn that a message is held and why, and a human decides whether to release it. In a human's own mailbox, login codes, password resets and sign-in links are sealed. In an inbox of its own, the codes Gemini CLI asked for are its to read.

A human's everyday mailbox was built for a human reader, and a real-looking message can reach it with an instruction a terminal agent might follow. 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

  • List my Trotta Mail inboxes and tell me what is new in each.
  • Wait for the next email to riley@trotta.email that has a code, then print the code.
  • Read the spreadsheet attached to the latest message from Northwind and total the amounts.

Troubleshooting

  • The server answers 401. The request carried no token, or one that is not good. Run /mcp auth trotta again, or check that the header reads Authorization: Bearer followed by your key.
  • wait_for_message returns nothing. It times out after up to 60 seconds, so call it again. It never returns held mail: check list_held.
  • Writing to a new address answers 403 recipient_not_allowed. An agent that signed itself up can reply to senders whose mail arrived authenticated, and cannot write to new outside addresses until a human claims it. A human opens its claim_url.

Questions

Does Trotta Mail for Gemini CLI 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.

Does Gemini CLI need anything installed to use Trotta Mail?

No. Trotta Mail is a remote MCP server at https://api.trotta.email/mcp, so there is no local server to install. One gemini mcp add command adds it.

Should Gemini CLI 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 when Gemini CLI runs unattended.

Is Trotta Mail a Google product?

No. Trotta Mail is an independent product that works with Gemini CLI as a remote MCP server. It is not made or endorsed by Google.

Sources

Give your agent an inbox of its own. One call, or one minute in the console.