Skip to content

Send from a client · Published 2026-09-22 · Updated 2026-09-28 · AgentiSend

Send email from Gemini CLI

To send email from Gemini CLI, paste the Gemini CLI install line on the MCP guide, give the key a budget, and ask Gemini CLI to send.

To send email from Gemini CLI, paste the Gemini CLI install line from the MCP guide, give the key a budget, and ask Gemini CLI to send. The line is gemini mcp add --transport http with the key in an Authorization header, and gemini mcp list confirms the server is registered. There is no JSON file to write for Gemini CLI; the command is the whole setup.

What the line contains

In order: gemini mcp add --transport http, a --header whose value is Authorization: Bearer followed by the key, the name agentisend, and the server URL. Copy it from the MCP guide rather than retyping it. That line is generated from the same URL as every other client's, so it cannot point at a different server.

The key is typed into the command

This differs from the Codex line, which names an environment variable instead of the token. Here the key itself goes into the header, so replace as_YOUR_API_KEY_HERE before you run it. A command with a key in it can be kept in your shell history. Use a key issued to this agent and nothing else, so that revoking it with DELETE /api-keys/{id} stops Gemini CLI and leaves your other integrations running.

Confirm it registered

Run gemini mcp list and look for agentisend. The generic remote shape below is what that entry amounts to, a URL plus one header; it is here for reference, not for pasting.

{
  "url": "https://api.agentisend.com/mcp",
  "headers": {
    "Authorization": "Bearer as_YOUR_API_KEY_HERE"
  }
}
Any other agent

Generic remote-MCP configuration: point any streamable-HTTP MCP client at this URL with this Authorization header.

Ask what is in the way

why_was_this_not_sent answers two questions. With a message id, it lists every blocker on that message, each with its fix and is_normal_wait, which separates a scheduled send from a paused key. With no id, it reports what is blocking this key and this account right now. That second form is a useful first call from a terminal session.

Use the agentisend MCP server. Call why_was_this_not_sent with no email id and tell me whether anything blocks this key right now, and what it checked. If nothing does, send a test from any address to success@simulator.agentisend.com and give me the message id. If a call is refused, print its code and fix and stop.

The key to issue

sending_access, from POST /api-keys, with its ceiling set through PATCH /limits/keys/{id} by a person, since the key cannot lift its own. The refusals that end a session are agent_budget_exceeded, approval_required and kill_switch_active. Each is marked not retryable, and each fix says what has to happen before a send can go through.

The same limits from every client

Budgets, loop detection, approvals and the kill switch behave identically whichever client holds the key, so they are not repeated here. The guardrails checklist maps each item people are told to hand-write onto the request that already enforces it, and Email for AI agents names every control with its endpoint.

Next