Connect Gemini CLI

How to connect Gemini CLI to email (send and reply via MCP)

Connect Gemini CLI to email with one command: gemini mcp add -t http sendraven https://mcp.sendraven.ai/mcp, then /mcp auth sendraven inside Gemini CLI to sign in.

Gemini CLI can then send from your own domain, read replies as threads and answer them, and with a key passed as a header it runs under that key's limits.

Gemini CLITerminal
gemini mcp add -t http sendraven https://mcp.sendraven.ai/mcp
Then ask
> Summarise this week's replies and list who still needs an answer from me.

Before you start

What Gemini CLI needs.

Gemini CLI, signed in with Google, a Gemini API key or Vertex AI. It will not run any command, gemini mcp add included, until one of those is set.

A SendRaven workspace with a verified sending domain and a payment method on it. Free includes 3,000 emails a month and is never charged without an upgrade.

A local browser for the sign-in, or an API key for a machine without one.

Setup

Connect Gemini CLI step by step.

  1. Add the server

    This writes to .gemini/settings.json in the current project. Add -s user to write ~/.gemini/settings.json and have it everywhere.

    Terminal
    gemini mcp add -t http sendraven https://mcp.sendraven.ai/mcp
  2. Sign in, or pass a key

    Inside Gemini CLI, /mcp auth sendraven opens a browser to sign in. Over SSH or in CI, add the server with a key instead.

    Terminal, with an API key
    gemini mcp add -t http -H "Authorization: Bearer sk_live_…" sendraven https://mcp.sendraven.ai/mcp
  3. Check it

    gemini mcp list shows the server; /mcp inside a session lists its tools and whether it needs a sign-in.

    Terminal
    gemini mcp list

Try it

Three things to ask Gemini CLI.

“Summarise this week's replies and list who still needs an answer from me.”

Reads recent threads with list_threads and get_thread, and separates those awaiting your reply from those already handled.

“Draft a reply in Spanish to the newest support thread and hold it for my approval.”

Writes the reply and sends it with reply_to_message; on a key with an approval hold it comes back pending_approval and waits for you.

“Add maria@example.com to the Beta testers audience and tag her early-access.”

Uses add_contact and tag_contact. An automation that starts on contact_added for that audience begins her sequence.

Once connected

What Gemini CLI can do with email.

Send

From your own verified domain, as plain text, HTML or a stored template, now or at a set time.

  • send_email
  • send_template_email
  • list_scheduled_emails

Read the replies

Replies join the thread they answer on Message-ID, with the quoted history removed, and one call lists what is waiting on you.

  • list_threads
  • get_thread
  • mark_thread_handled

Reply in the thread

The answer goes into the same conversation with the right headers, so it lands under the original in the recipient's inbox.

  • reply_to_message

Run sequences and campaigns

Automations that stop when someone replies or unsubscribes, and campaigns that can be previewed before they go.

  • create_automation
  • enroll_in_automation
  • preview_broadcast

Every tool the server has, grouped by what an agent is trying to do.

Safety controls

The limits live on the key, not in the prompt.

Gemini CLI reaches exactly what its credential can reach. Give an agent's API key any of these, and the tools respect them because the API underneath enforces them.

A daily send cap

daily_send_limit stops the key once it has sent that many today, counting scheduled and held mail too.

A recipient allowlist

allowed_recipients takes addresses and whole domains. Anything else is refused before it is written.

An approval hold

requires_approval turns every send into a draft that a person releases. The key cannot approve its own drafts.

A browser sign-in carries none of the three, so use a key for anything that runs unattended. A key also cannot raise its own limits: key management has no MCP tool. Every limit a key can carry.

Troubleshooting

If it does not work.

gemini mcp add answers "Please set an Auth method" and adds nothing.

Gemini CLI needs its own sign-in before it runs any command, including adding a server. Run gemini once to sign in with Google, or set GEMINI_API_KEY, then add the server.

/mcp auth does nothing over SSH.

The sign-in redirects to a port on the machine running Gemini CLI, so it needs a browser there. On a remote machine, connect with an API key header instead.

A server added by hand to settings.json never connects.

For Streamable HTTP the key is httpUrl, not url, which Gemini CLI reads as the older SSE transport. gemini mcp add -t http writes the right one.

Why not just Resend?

Resend has an MCP server too. The difference is what happens after the send.

The reply is a thread, not a webhook

SendRaven: Joined on Message-ID to the message it answers. Resend: a received-email event; you fetch the message and set reply headers yourself.

Per-key daily cap and recipient allowlist

SendRaven: daily_send_limit and allowed_recipients on the key, checked on every send. Resend: keys scope to a domain and to send-only; no cap or allowlist.

Human approval hold on a key

SendRaven: requires_approval drafts the message and waits for a person. Resend: not offered.

From resend.com, last checked 16 September 2026. The full comparison, including where Resend is the better choice.

Questions

Can Gemini CLI send emails?

Yes, through an MCP server for an email service. With SendRaven added, Gemini CLI sends from your own verified domain, reads replies as threads and answers them.

How do I sign Gemini CLI in to an MCP server?

Run /mcp auth with the server's name inside Gemini CLI, here /mcp auth sendraven. It opens a browser for the server's OAuth sign-in and stores the token.

What is the difference between httpUrl and url in Gemini CLI's settings?

httpUrl connects over Streamable HTTP, which SendRaven's server speaks; url connects over the older SSE transport. Use httpUrl, or let gemini mcp add -t http write it.

Can I use an API key with Gemini CLI instead of signing in?

Yes. Pass it as a header when adding the server, with -H "Authorization: Bearer sk_live_…", and the key's daily cap, allowlist and approval hold apply to everything Gemini CLI sends.

Give Gemini CLI an inbox it cannot misuse.

Verify a domain, create a key with the limits you want, and connect. Free includes 3,000 emails a month, inbound included, and is never charged without an upgrade.