Connect guide

Connect Gemini CLI to your email through Mailopoly

Gemini CLI and Mailopoly: one command gives Gemini CLI your email — every account you own, searched together, already sorted — under permissions you set. Run gemini mcp add --transport http mailopoly https://fastapi.prod.aws.mailopoly.com/mcp-server/, sign in when it asks, tick reading, making changes or sending, and Gemini CLI can search, draft and send across Gmail, Outlook, Yahoo, iCloud and any IMAP mailbox — and, with business channels added to your plan, your Slack, Teams and WhatsApp too. Gemini CLI discovers the OAuth settings from Mailopoly on its own; there is nothing to register.

Start a free trial

7-day free trial, no credit card.

This page is about Gemini CLI, Google's open-source terminal agent (people also write gemini-cli or google gemini cli). It is not about the Gemini app or the Gemini in Gmail features, which have their own connectors.

Does Gemini CLI support Gmail without Mailopoly?

Not built in. Gemini CLI has no email tool of its own. The Google Workspace extension (gemini extensions install https://github.com/gemini-cli-extensions/workspace) adds Gmail alongside Docs, Sheets, Calendar and Drive, with a Google sign-in — for Google accounts. There is nothing for Outlook, Yahoo, iCloud or IMAP, and the extension hands the agent raw messages.

Mailopoly covers every provider in one connection and one question, hands Gemini CLI mail that is already filtered by Cleanbox with invoices, events and deliveries extracted, and keeps reading, making changes and sending as separate grants you can revoke from Mailopoly at any time.

Before you start

  • Gemini CLI, set up and signed in. This guide covers what happens once you have it.
  • A Mailopoly account — start one here, 7-day free trial, no credit card.
  • The mailboxes you want it to see, connected to Mailopoly. Gmail and Outlook connect with a Google or Microsoft sign-in; Yahoo, iCloud, AOL and IMAP mailboxes use an app password you enter on Mailopoly's own page — never in a chat or a config file. The connect guides have the exact steps for each provider.

Connect Gemini CLI to your email in three steps

1 Connect your mailboxes to Mailopoly

  1. Start a Mailopoly account at mailopoly.com/sign-up — 7-day free trial, no credit card.
  2. Connect each mailbox you want Gemini CLI to reach: Gmail or Outlook with a Google or Microsoft sign-in, anything else with an app password from your provider's security settings. Each account gets one line in the same inbox — Gmail, Outlook, Yahoo, iCloud, any IMAP mailbox.
  3. If you want Gemini CLI to have an address of its own, pick one of the @mly.life addresses included in your plan and keep it for the agent's correspondence. It's still your address, on your account, so you see everything it sends and receives.

2 Add Mailopoly to Gemini CLI

  1. Run gemini mcp add --transport http mailopoly https://fastapi.prod.aws.mailopoly.com/mcp-server/. (Or add to ~/.gemini/settings.json: { "mcpServers": { "mailopoly": { "httpUrl": "https://fastapi.prod.aws.mailopoly.com/mcp-server/" } } } — note httpUrl, not url.)
  2. Start Gemini CLI. It sees that Mailopoly needs a sign-in, discovers the settings and registers itself; run /mcp auth mailopoly if it doesn't prompt you. Your browser opens; sign in with your Mailopoly account.
  3. Tick what Gemini CLI is allowed to do — reading for search and summaries; making changes for drafts, labels, tasks and reminders; sending only if you want it to send, from any connected address or your @mly.life address.
  4. Ask. Tokens are kept by Gemini CLI in ~/.gemini/mcp-oauth-tokens.json and refreshed automatically.

Official docs: Gemini CLI docs: MCP servers ↗

3 Give it a job

Whatever you've connected to Mailopoly is what Gemini CLI can reach. Some jobs people hand over on day one:

  • Summarise everything the school sent this term, across all my accounts, in five bullet points.
  • Find the invoice from the electrician and add its due date to My Day.
  • Draft a reply to the conference organiser from my personal address and leave it in drafts.

What Gemini CLI can do with your email through Mailopoly

  • Search every account in one question — Gmail, Outlook, Yahoo, iCloud and IMAP together, or one account by name — by sender, date, topic or the half-remembered phrase somewhere in the body.
  • Work from the Cleanbox — your personal, non-promotional mail already separated from newsletters, promotions and automated noise, so a summary is a summary of what matters.
  • Read summaries, not raw messages — every email arrives already summarised, with invoices, events and deliveries extracted with their amounts, dates and status.
  • Keep My Day — see tasks and commitments pulled from every inbox, add tasks and reminders, tick things off.
  • Draft and send — save drafts to Mailopoly for you to review, or with the send permission send from whichever connected address fits the conversation, or from your @mly.life address.
  • Know what things cost — look up an invoice, total the week's bills, see what your subscriptions add up to.
  • Tidy up — label, file or clear mail in bulk, when you tell it to.
  • Business channels too — add them to your plan and your Slack, Teams, WhatsApp, Instagram, Messenger and TikTok messages sit in the same connection, and replies go back out through the channel they arrived on.

Should you give an agent your email account at all?

The warnings you'll find are right about one thing: an agent that logs in to Gmail as you, with your password, on a machine you don't control, is a bad idea. Mailopoly doesn't work that way. Your Google and Microsoft accounts connect to Mailopoly through their own sign-in, and other providers through an app password you enter on Mailopoly's page — Gemini CLI never has a password in its hands and never logs in to your provider at all.

Gemini CLI connects to Mailopoly with a scoped OAuth sign-in. Reading, making changes and sending are separate grants, sending is flagged as a confirm-first action in the protocol itself, every tool call is audit-logged against your account, and you can revoke Gemini CLI from Settings → Security → Connected AI assistants in the Mailopoly app — access ends immediately. Mailopoly is independently security-assessed to CASA Tier 2 by TAC Security. If you want a hard line, give Gemini CLI reading only, or give it one of your @mly.life addresses to send from so nothing leaves under your name unless you say so. More on whether it's safe to give AI access to your email and the security page.

What goes wrong with Gemini CLI, and the fix

  • `url` instead of `httpUrl`. In settings.json, url means an SSE server. Mailopoly is streamable HTTP, so the key is httpUrl — or just use gemini mcp add --transport http.
  • The free login's daily quota ran out. A Google login gives Gemini CLI a fixed number of model requests per day; mail-heavy sessions use them. That's Gemini's limit, not Mailopoly's.
  • It only reads mail when you prompt it. Gemini CLI acts within a turn. For it to be *messaged* by Mailopoly, and to message you when it's done, see the Gemini CLI agent guide.
  • It connected but the tools don't answer. Mailopoly's tools respond on an active subscription or trial. If the trial has lapsed, the connection stays but calls return nothing useful until the plan is active.
  • It can read but won't draft or send. Those are separate permissions. Sign in again from Gemini CLI and tick making changes or sending — or check what it holds under Settings → Security → Connected AI assistants in Mailopoly.

Related: Gemini CLI on the Switchboard · Email for AI agents · Connect Outlook · Is it safe to give AI access to your email?

Start a free trial

7-day free trial, no credit card. Connect your mailboxes, then add Mailopoly to Gemini CLI in about a minute.

Frequently asked questions

letter

Take back your inbox. Take back your time

Try Mailopoly free and feel more organised by tomorrow. Connect your inbox in 60 seconds

Get Started for Free