Mails.ai for Gemini

Gemini CLI

Add mails to Gemini CLI

One command adds the hosted server for your user. Then run /mcp auth mails in a session to sign in, or pass an API key as a header instead. The MCP server page has the rest.

gemini mcp add --transport http --scope user mails \
  https://api.mails.ai/mcp

# then, in a Gemini CLI session:
# /mcp auth mails

Step by step

Code Assist and the Gemini app

The server you added for the CLI reaches Gemini Code Assist in VS Code too. The Gemini app connects it on the web, as a custom app.

~/.gemini/settings.json
  1. Check the CLI

    gemini mcp list shows mails. Sign-in needs a browser, so on a headless machine use an API key.

  2. Code Assist in VS Code

    Code Assist reads the same ~/.gemini/settings.json. Run Developer: Reload Window after you change it.

  3. The Gemini app

    On gemini.google.com, open Settings → Connected Apps, choose Add a custom app, enter https://api.mails.ai/mcp, click Next and sign in. Type @ in a prompt to use it.

  4. Who can add custom apps

    The Gemini app needs a personal Google Account with Keep Activity on, in English, and you must be 18 or over and in the US.

{
  "mcpServers": {
    "mails": {
      "httpUrl": "https://api.mails.ai/mcp"
    }
  }
}

Two commands in Gemini CLI and our agent had an inbox it could read and answer. We were testing replies that morning.

Viggo SandahlDeveloper, Glimmerkeel

Know-how

Teach Gemini about email

Three open-source skills teach Gemini to send, receive and safely act on email. The command asks which to add.

npx skills add mailsai/skills -a gemini-cli

In action

See it work in Gemini

Press play to run the session. Each call is a real mails tool, and each result has the shape the API returns.

“Replies come back as events with an injection score already on them. We deleted a whole layer of parsing code the week we switched, and we gate on the quarantine flag, so our agent never sees the ones that look like attacks.”

Tomás VargaStaff Engineer, Cinderjay

“Moving our agent onto our own domain was a few DNS records at the registrar. No nameserver move, and our existing mail kept working. Replies to the agent still come back to its inbox, threaded with the message they answer.”

Ishani VaidyaCTO, Sedgequay

“The 422 on cold outreach is the feature I didn’t know I wanted. An agent can’t talk itself into emailing strangers.”

Marcus FeldFounder, Marrowkite

“Our tests send to the test address and wait for the real reply, so the whole loop is covered before a customer ever writes in. It answers in about a second, which keeps the suite fast.”

Ana Lucía RíosEngineering Lead, Gorsefinch

“Adding the MCP server was one JSON block. Claude Code could send and read its own inbox a minute later.”

Jonah AbramsDeveloper, Wickerjay

“A reputation score per agent tells us exactly which one needs attention, instead of one number for the whole account. It comes from each agent’s own replies, bounces and complaints, and we read it from the API.”

Mei Lin ZhouOperations, Larchwhistle

“Sends and replies have separate allowances, so a busy inbox never eats our sending quota. Pricing was the easy part.”

Kwabena AdomakoFounder, Oxbowlark

“Half our agents are LangGraph in Python and half are Node. Both SDKs make the same calls, so the team doesn’t have to think about it.”

Sofia BrandtEngineer, Moss & Ladder

“Signed webhooks, retries with backoff and an event id to dedupe on. The boring plumbing, done properly.”

Nikhil BhonsleBackend Lead, Thimblecrow

“We signed up, made a key and sent our first message without talking to anyone, and the free tier never asked for a card. That’s how infrastructure should feel.”

Frieda WesselFounder, Ploverwick Studio

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key