New: the MailCraft MCP server is live — connect your AI agent in one line. Connect your agent →
AI agents

Gemini CLI

Gemini CLI brings Gemini to your terminal. Connect MailCraft and it can send, inspect and automate email alongside your codebase.

Prerequisites

  • Gemini CLI installed
  • A MailCraft API key with the scopes you want the agent to have — create one under Settings → API keys.

Setup

  1. 1

    Edit the settings file

    Add MailCraft to ~/.gemini/settings.json (or .gemini/settings.json in a project):

    ~/.gemini/settings.json
    {
      "mcpServers": {
        "mailcraft": {
          "httpUrl": "https://mcp.mailcraft.host",
          "headers": {
            "Authorization": "Bearer sk_live_your_api_key"
          }
        }
      }
    }

    Replace sk_live_your_api_key with your key. The agent only gets the tools that key's scopes allow. Gemini CLI uses "httpUrl" for Streamable HTTP servers, not "url".

  2. 2

    Restart Gemini CLI

    Start a new session to load the configuration.

  3. 3

    Verify the connection

    Run /mcp to see mailcraft and its tools, then ask:

    gemini
    List all my MailCraft senders

Example prompts

Once connected, try asking Gemini CLI:

  • Show me yesterday’s sending metrics
  • Suppress [email protected]
  • Create a list called "Newsletter" and add these three contacts to it

See every tool the agent can use in the MCP server reference.