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.
| Tool | What it does |
|---|---|
list_inboxes | Lists the inboxes the key can reach. |
wait_for_message | Waits for the next delivered message, with filters such as has_code. |
read_message | Reads one message in the safe view. |
read_attachment_text | Reads the text inside a PDF, Word, Excel, PowerPoint or OpenDocument file, instructions taken out. |
send_message | Sends a new message. Screened before it leaves. |
reply_to_message | Replies in the thread. |
scan_content | Runs 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
- Add the server.
- In Gemini CLI, run
/mcp auth trottaand sign in with Trotta Mail. - Pick the inboxes Gemini CLI may use, and whether it may read, send or both. Then allow.
gemini mcp add --transport http trotta https://api.trotta.email/ mcpUse 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.
gemini mcp add --transport http --header "Authorization: Bearer $TROTTA_MAIL_API_KEY" trotta https://api.trotta.email/ mcpFor 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 trottaagain, or check that the header readsAuthorization: Bearerfollowed by your key. wait_for_messagereturns nothing. It times out after up to 60 seconds, so call it again. It never returns held mail: checklist_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 itsclaim_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.