Gemini CLI · about 2 min

Give Gemini CLI your inbox, read-only

Gemini in Gmail reads one Google account. Gemini CLI with Emailgents reads every inbox you own, from the terminal.

~/.gemini/settings.json
{
  "mcpServers": {
    "emailgents": {
      "url": "https://emailgents.com/mcp"
    }
  }
}

server: https://emailgents.com/mcp

Setup

Sign in happens in the browser once; the client remembers it.

  1. 01
    Connect your mailboxes in EmailgentsSign up at emailgents.com and add your accounts under Mailboxes.
  2. 02
    Add the server to settings.jsonPaste the snippet below into ~/.gemini/settings.json (global) or .gemini/settings.json (project).
  3. 03
    Sign in onceStart Gemini CLI and run /mcp auth emailgents to complete the browser sign-in.
  4. 04
    AskRun /mcp to confirm the tools are listed, then ask about your mail.

Things to ask

  • “What did the conference organizers send about the talk schedule?”
  • “Find the signed contract in my iCloud mail and list the deliverables.”
  • “Which newsletters did I receive this week across all accounts?”

Good to know

  • Recent Gemini CLI versions use a single url field for remote servers; older releases used httpUrl.
  • OAuth servers are authorized explicitly with /mcp auth, which keeps non-interactive runs predictable.

Gemini CLI questions

Do I need an API key?

Not for MCP. You sign in to Emailgents in the browser when the client connects and approve once. API keys exist for scripts that use the REST API instead.

Which inboxes will it see?

Every mailbox you have connected in Emailgents: Gmail and Google Workspace, Outlook and Microsoft 365, iCloud, Yahoo, Fastmail, AOL, Zoho, GMX, WEB.DE and any IMAP server. Add or remove mailboxes in Emailgents and the agent sees the change on its next call.

Can it read several accounts at once?

Yes. search_messages and inbox_overview cover every connected mailbox by default. Pass account_ids to narrow to one; each result carries its account so the agent can tell them apart.

Can it send, delete or move my mail?

No. The tool set is read-only apart from set_flags, which toggles read and starred. An instruction hidden inside an email cannot make the agent send anything on your behalf, and every call is listed on your Activity page.

Other agents

Your agents can read mail in five minutes.

One account, as many mailboxes as you need, every agent you run.