New: campaigns, automations and product emails in the same account. Meet Postal
Sign in Create account
Command lineCompatible per the specificationChecked on 10/28/2026

Connect Gemini to Postal

Connect Postal to the Gemini CLI (and to Antigravity, which replaces it for those without a paid plan) to look up and send emails from the terminal.

How you sign in
Account or key
Transport
HTTP
Recommended access
Read and send
1

Before you start

Check these points before opening the Gemini setup. They prevent most connection failures.

  • A team with the "MCP server" plan feature (mcp_access); without it the server responds 403 plan_limit_reached.
  • To send emails, the team needs at least one verified domain.
  • If you will use an API key: create the key in the dashboard, under API keys. It starts with ps_; a send-only key is enough if you will only send.
  • Each connection acts on a single team. To use another team, connect again and pick the other one.
  • Connections are listed under Settings › AI connections in the dashboard, where they can be revoked at any time.

What Gemini requires

Gemini CLI with support for remote MCP servers (httpUrl for Streamable HTTP; url is SSE) or Antigravity (Streamable HTTP only, serverUrl field). A local browser for the OAuth login. Default timeout for Gemini CLI: 10 minutes; for Antigravity: 180 s per call.

2

Connect

Follow the steps in order. The server address is always https://api.postal.so/mcp. Recommended path: sign in with your account (OAuth). The API key is the alternative. Wherever ps_... appears, use your own API key: the value shown is only an example.

  1. 1

    Gemini CLI: run the first command (it creates the entry in the project's .gemini/settings.json; to apply to all projects, edit ~/.gemini/settings.json with the second snippet).

  2. 2

    Inside the Gemini CLI, run /mcp auth postal. The browser opens the Postal login; choose the team and click Allow. The login needs a local browser (it does not work over SSH without X11 or in a container without a browser).

  3. 3

    For an API key, use the third command.

  4. 4

    Antigravity (Google): edit ~/.gemini/config/mcp_config.json with the fourth snippet (the field is serverUrl; url and httpUrl do not work there). Under Agent settings > Customizations, click Authenticate, finish the login and paste the authorization code into the panel.

Gemini CLI (OAuth)

Terminal
gemini mcp add --transport http postal https://api.postal.so/mcp

Gemini CLI (file)

~/.gemini/settings.json
{
  "mcpServers": {
    "postal": {
      "httpUrl": "https://api.postal.so/mcp"
    }
  }
}

Gemini CLI (API key)

Terminal
gemini mcp add --transport http --header "Authorization: Bearer ps_..." postal https://api.postal.so/mcp

Antigravity

~/.gemini/config/mcp_config.json
{
  "mcpServers": {
    "postal": {
      "serverUrl": "https://api.postal.so/mcp"
    }
  }
}
3

Access the tool needs

Postal splits access into three levels, explained in the scopes table. For Gemini:

Required
Read your datamcp:read

View emails, domains, contacts, segments, topics, templates, broadcasts, automations, forms, inbox conversations, metrics and usage.

Recommended
Send emails and eventsmcp:send

Send and schedule emails from verified domains and record events for automations.

Only if you want
Manage everythingmcp:full

Everything above, plus creating, changing and deleting contacts and templates, creating and sending broadcasts (send_broadcast requires confirm: true), canceling scheduled emails and working in inboxes (organize, reply, create drafts).

To look up deliveries and send test emails, mcp:read and mcp:send are enough. The Gemini CLI lets you pin scopes in the oauth block of the configuration file (see its documentation); without that, dynamic registration requests the three announced scopes.

4

How to confirm it worked

The simplest proof is to ask for something read-only inside Gemini itself. The connection also shows up under Settings › AI connections in the Postal dashboard, with the app, the team and the last use.

Illustrative example

List my domains on Postal.
I found 2 domains on the Aurora Cosméticos team: exemplo.com.br (verified) and loja.exemplo.com.br (verifying).

For those who want the technical proof

Terminal: tool list with an API key
npx @modelcontextprotocol/inspector --cli https://api.postal.so/mcp \
  --transport http \
  --header "Authorization: Bearer ps_..." \
  --method tools/list
34Tools expected with a full-access key

The Inspector proves that the Postal server responds. It does not test Gemini itself. The full walkthrough is in Validate the connection.

5

If something goes wrong

Go through the list in order. Then read what we know (and what we don't know) about Gemini.

Check

  • The address is exactly https://api.postal.so/mcp, with /mcp at the end.
  • The connection type is HTTP (Streamable HTTP). Postal does not offer SSE: if the tool gives you the choice, use HTTP.
  • The team has the "MCP server" feature on its plan. Without it, the server responds 403 plan_limit_reached.
  • To send emails, the team has at least one verified domain.
  • Each connection acts on a single team. To use another one, connect again and pick the other.
  • 429 response (rate_limit_exceeded): the plan's requests-per-second limit was reached. Wait a moment and try again.
  • If the tool complains about the response size, ask for smaller lists (at most 100 items per call; the default is 20).
  • To start over from scratch, revoke the connection under Settings › AI connections and connect again.

What was tested and what was not

Compatible per the specificationChecked on 10/28/2026

We followed the app's specification and documentation, but have not yet tested with the real app. Below is the full note on what was and was not verified.

Test details

Verified by test: the redirect http://localhost:PORTA/oauth/callback (dynamic registration with the chosen port) and https://antigravity.google/oauth-callback are accepted, Postal returns the iss parameter (RFC 9207) that the Gemini CLI validates, and the API key in a header works with the SDK. The Gemini CLI documentation does not mention discovery through protected resource metadata (RFC 9728); Postal also serves the authorization metadata at the standard path, but this was not confirmed with the real Gemini. The Gemini CLI documentation warns that it was replaced by the Antigravity CLI on 06/18/2026 for those on the free tier or Google One. Not tested with the real Gemini CLI or Antigravity.

Frequently asked questions

Do I need an API key to connect Gemini?

Not required. Gemini can sign in with your Postal account (OAuth) or with an API key. Recommended path: sign in with your account (OAuth). The API key is the alternative. The send-only key (sending_access) exposes only send_email and track_event.

Can I limit what Gemini does on my account?

To look up deliveries and send test emails, mcp:read and mcp:send are enough. The Gemini CLI lets you pin scopes in the oauth block of the configuration file (see its documentation); without that, dynamic registration requests the three announced scopes. You can revoke the connection at any time under Settings › AI connections.

Ready to use Postal in Gemini?

Create your account and connect. If you need help, talk to us through the contact form.