Connect MultiMail's 51-tool MCP server to Gemini CLI and give your terminal-based AI workflows full email capabilities — send, read, thread, and approve from the command line.
Gemini CLI is Google's terminal-based AI assistant, built for developers who want agent-augmented workflows without leaving the command line. By adding MultiMail as an MCP server, Gemini CLI gains access to structured email operations: reading inboxes, sending messages, managing threads, and surfacing pending approvals for human review.
MultiMail's MCP server exposes 51 tools covering the full email lifecycle. Gemini CLI connects to it over stdio, which means the server process runs locally alongside your terminal session. Configuration requires only a MultiMail API key and a JSON edit to ~/.gemini/settings.json.
The integration suits developer automation workflows well: processing CI notifications, triaging support inboxes, or building lightweight agent loops that send transactional email under human oversight. MultiMail's graduated oversight modes let you decide how much autonomy Gemini gets — from requiring approval on every send to fully autonomous operation.
Install Gemini CLI via npm if you haven't already. Node.js 18 or later is required.
Log in to your MultiMail account and copy your API key from the dashboard. Keys start with mm_live_ for production or mm_test_ for sandbox testing. Use mm_test_ while setting up to avoid sending live email during configuration.
Open ~/.gemini/settings.json (create it if it doesn't exist) and add the MultiMail MCP server under the mcpServers key. The npx invocation downloads and runs the server on first use.
Start a new Gemini CLI session. The MultiMail tools should now be available. Ask Gemini to list available tools or run a test check_inbox call to confirm the connection.
By default, MultiMail uses gated_send mode — reads are autonomous but sends require your approval via decide_email. Adjust this per mailbox in the dashboard or via the API. Start here and graduate toward more autonomy once you trust the agent's behavior.
| Tool | Description | Example |
|---|---|---|
| check_inbox | Lists recent emails in a mailbox with metadata: sender, subject, timestamp, read status, and tags. Accepts filters for date range, read state, and tags. | Check whether any new support requests arrived in [email protected] in the last 24 hours. |
| read_email | Fetches the full content of a specific email by ID, including headers, body text, and attachment metadata. | Read email em_01J9XY... to extract the order number and issue description from its body. |
| get_thread | Retrieves all messages in an email thread ordered chronologically, preserving the full conversation context. | Get the full support thread before drafting a reply so the agent doesn't repeat already-covered ground. |
| send_email | Sends a new email from a MultiMail mailbox. In gated_send or gated_all mode the message is queued for approval rather than delivered immediately. | Send a project status update to the team after a CI build completes, held for approval before delivery. |
| reply_email | Sends a reply to an existing email, preserving thread context and setting correct In-Reply-To and References headers. | Reply to a customer inquiry with a resolution, keeping the original message in the thread. |
| tag_email | Applies one or more string tags to an email for categorization, filtering, and downstream routing. | Tag inbound emails as billing, technical, or general based on subject and body classification. |
| decide_email | Approves or rejects a pending outbound message that is waiting in the gated_send or gated_all queue. | Approve a drafted reply after reviewing it for accuracy, releasing it for delivery. |
| list_pending | Lists all outbound messages currently waiting for human approval, with subject, recipient, and queued timestamp. | Review the full approval queue before starting a morning standup to see what the agent drafted overnight. |
| cancel_message | Cancels a pending outbound message before it is approved or delivered, removing it from the queue. | Cancel a scheduled email when the underlying data it references has changed and the draft is no longer accurate. |
| manage_contacts | Searches contact history for email addresses matching a name, domain, or keyword from prior correspondence. | Find all known contacts at a target company before composing an outreach message. |
| create_mailbox | Creates a new mailbox on your account, either on a custom domain you control or on multimail.dev. | Provision a dedicated mailbox for a new agent workflow or project without touching the dashboard. |
No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.
Gemini CLI supports a project-level settings file at .gemini/settings.json in your repository root. Committing a shared MCP config there means every team member connects to the same MultiMail setup automatically. Omit the API key from the committed file and have each developer export MULTIMAIL_API_KEY from their shell profile — the MCP server subprocess inherits environment variables from the shell that launched Gemini.
New integrations should use gated_send oversight mode so you can audit what Gemini drafts before anything is delivered. After reviewing 20 to 30 queued sends and confirming they match your expectations, switch to monitored mode. You'll still receive notifications for every send but won't need to approve each one individually.
The npx -y @multimail/mcp-server invocation pulls the latest published version on each run. For production workflows, pin a specific release: set args to ["-y", "@multimail/[email protected]"]. This prevents unexpected behavior after upstream updates and makes your configuration reproducible across machines.
MultiMail API keys prefixed with mm_test_ route to a sandbox environment where send_email calls are captured and logged but never delivered to real recipients. Use a test key in your settings.json while developing and iterating on Gemini CLI prompts, then swap to mm_live_ only when you are ready to handle live email.
MultiMail API keys can be scoped to specific mailboxes and operations. For a Gemini CLI workflow that only needs to read and triage one inbox, create a key restricted to that mailbox with read and tag permissions only. This limits the blast radius if the key leaks from your settings.json.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.