You live in the terminal, your customers live on WhatsApp, and switching between the two all day is slow. You’d like to type “who messaged us today and still needs a reply?” and get an answer without opening another dashboard.
You can. Gemini CLI connects to remote MCP servers over Streamable HTTP and can send custom headers, which is exactly what WaBot’s MCP server needs. Add one wabot entry to settings.json with your clientid and clientsecret, run /mcp, and Gemini can read your WhatsApp chats, create templates, send messages and build simple automations through WaBot. New to MCP? Start with the WhatsApp MCP server overview.
What Gemini CLI is (and who can still use it)
Gemini CLI is Google’s open-source AI agent for the terminal (Apache 2.0). It reads and edits code, runs commands, and calls tools from MCP servers you configure. You install it with npm install -g @google/gemini-cli (or Homebrew), then run gemini in a project folder.
Check your access first. Google announced that from 18 June 2026, free individual accounts and Google AI Pro/Ultra subscribers moved from Gemini CLI to Antigravity CLI (agy). Gemini CLI stays available for Gemini Code Assist Standard and Enterprise licences and with paid Gemini API keys.
If you’re on a free or AI Pro/Ultra plan, follow our Google Antigravity WhatsApp MCP guide instead. The WaBot side is identical; only the config file differs.
What WaBot’s MCP server gives Gemini
WaBot runs a hosted MCP server at https://api.wabot.shop/mcp (Streamable HTTP). It exposes 36 tools on your WaBot account, in five groups:
| Group | Example tools | What Gemini can do |
|---|---|---|
| Account | get_account, list_channels | See your connected WhatsApp numbers |
| Templates | create_template, get_template_status, list_templates | Draft a template, submit it to Meta, check approval |
| Contacts and messages | find_contact, send_template_message, send_session_message | Look up a customer and message them |
| Conversations | list_recent_chats, get_messages, wait_for_reply | Read today’s chats, wait up to 30 seconds for a reply |
| Automations and Flows | create_simple_autoflow, preview_workflow_schematic, create_whatsapp_flow | Build keyword auto-replies, diagram them, create in-chat forms |
Authentication is two HTTP headers, clientid and clientsecret. There’s no OAuth flow and no account ID to enter. The server allows 60 requests a minute per Client ID and writes every tool call to an audit log.
Set up WaBot in Gemini CLI, step by step
1. Get your WaBot credentials
In the WaBot app, open Developer → Developer Credentials. Copy the Client ID and Client Secret (the page also has a Copy MCP config button).
2. Put them in environment variables
Keep them out of any file you commit. Gemini CLI resolves $VAR_NAME and ${VAR_NAME} in settings string values when it loads them:
# macOS / Linux (add to ~/.bashrc or ~/.zshrc)
export WABOT_CLIENT_ID="<Client ID>"
export WABOT_CLIENT_SECRET="<Client Secret>"
# Windows PowerShell (current window only)
$env:WABOT_CLIENT_ID = "<Client ID>"
$env:WABOT_CLIENT_SECRET = "<Client Secret>"
3. Add the server to settings.json
Use ~/.gemini/settings.json (your user settings, for every project) or .gemini/settings.json in a project root. Remote Streamable HTTP servers use httpUrl, and headers is sent with every request:
{
"mcpServers": {
"wabot": {
"httpUrl": "https://api.wabot.shop/mcp",
"headers": {
"clientid": "${WABOT_CLIENT_ID}",
"clientsecret": "${WABOT_CLIENT_SECRET}"
}
}
}
}
4. Start Gemini and check the connection
Run gemini, then type /mcp. You should see wabot as CONNECTED with its tools listed. From the shell, gemini mcp list shows the same status.
5. Smoke test
Ask: “Use WaBot get_account and list_channels, and tell me which WhatsApp numbers are connected.” Nothing is sent to customers by this.
Prefer one command? Gemini’s gemini mcp add takes --transport http and repeatable -H headers. It writes the values as plain text into the settings file, so only use it for the user-scope file, never inside a repo:
gemini mcp add --transport http --scope user \
-H "clientid: <Client ID>" -H "clientsecret: <Client Secret>" \
wabot https://api.wabot.shop/mcp
Leave trust at its default (false) so Gemini asks before every tool call. That is your chance to read a WhatsApp message and its recipient before it goes. Sources: Gemini CLI’s MCP server documentation and configuration reference.
Use case 1: triage today’s WhatsApp chats
Good for an owner or support lead who opens the terminal first thing in the morning.
Type:
Using WaBot, list my recent WhatsApp chats. For each one from the last 24 hours, read the messages and tell me: who is waiting for a reply, what they want, and whether the 24-hour window is still open. Don't send anything.
Gemini calls: list_recent_chats, then get_messages for each conversation. get_messages returns the time of the customer’s last message, so Gemini can tell you whether a free-form reply is still allowed.
You see: a short list such as “Asha (+91 98xxx xx101): asked if the paneer thali is available for 8 people tonight, window open, no reply yet.” You decide who to answer; if you want, ask Gemini to draft the replies for you to approve.
Use case 2: create a utility template and get it approved
Messages to a customer who hasn’t written in the last 24 hours must use a Meta-approved template. Gemini can write and submit one for you.
Type:
Create a WaBot utility template in English called table_ready for Spice Route Café: "Hi {{1}}, your table for {{2}} is ready. Please come to the front desk." Submit it, then check the status with sync on every few minutes until Meta approves or rejects it.
Gemini calls: get_account (to find your WhatsApp phone ID), create_template, then get_template_status with sync: true, which asks Meta for the latest status.
You see: the template submitted as PENDING, then APPROVED or REJECTED with Meta’s reason. Review usually takes minutes to a few hours, so Gemini may tell you to check back rather than wait.
Use case 3: send a test message and react to the reply
Useful when you’re checking a new template or a script before it reaches real customers. Use your own number.
Type:
Send the approved template table_ready to +91 98xxx xx000 (that's me) with name Asha and party size 4. Show me the exact message and number before sending. Then wait for my reply and summarise it.
Gemini calls: send_template_message, then wait_for_reply, which waits up to 30 seconds per call for an incoming message. If you reply within the 24-hour window, Gemini can answer with send_session_message.
You see: the message on your phone, then your reply quoted back in the terminal. Gemini CLI’s documentation doesn’t describe support for server-pushed MCP notifications, so rely on wait_for_reply rather than subscribe_replies here.
Safety: an agent can message real customers
- Ask Gemini to show the message and recipient before sending, and keep
trustoff. - Test on your own number first. Every template or script, every time it changes.
- Only message people who agreed to hear from you. WhatsApp’s opt-in rules still apply when an AI sends the message: see WhatsApp opt-in and consent.
- Keep the Client Secret out of git. If you think it has leaked, contact WaBot at hello@wabot.shop. WaBot records every tool call in an audit log.
Want Gemini to read but never send? Gemini CLI’s excludeTools setting blocks named tools, for example "excludeTools": ["send_template_message", "send_session_message"] inside the wabot entry.
Limits to know
- Not available through MCP: campaigns and broadcast scheduling, campaign analytics, segmentation, deleting workflows, and advanced workflow steps (branching, webhooks, agent handoff, code). Use the WaBot app for those.
- New automations start inactive. Gemini must pass
activate: trueor callset_workflow_statusto switch one on. - WhatsApp’s 24-hour rule: outside the window, only approved templates can be sent.
- 60 requests a minute per Client ID.
- Full tool reference: WaBot MCP documentation. Using Claude too? See WhatsApp MCP for Claude.
Give Gemini CLI a WhatsApp number
Create your free WaBot account, connect your WhatsApp number, and copy your MCP credentials from the Developer section. Connecting a number starts a 15-day Base Plan trial, no card needed.
Frequently asked questions
Does Gemini CLI support remote MCP servers?
Yes. Gemini CLI’s documentation lists httpUrl for Streamable HTTP servers, url for SSE servers and command for local stdio servers, with an optional headers object for remote ones.
Where does the WaBot config go in Gemini CLI?
In the mcpServers section of ~/.gemini/settings.json (all projects) or .gemini/settings.json in a project root. Use ${WABOT_CLIENT_ID} and ${WABOT_CLIENT_SECRET} so the values come from environment variables.
Can I still use Gemini CLI on a free Google account?
Google says free individual accounts and AI Pro/Ultra subscribers moved to Antigravity CLI on 18 June 2026. Gemini CLI remains for Gemini Code Assist Standard/Enterprise and paid API keys. The WaBot setup for Antigravity is in our Antigravity guide.
Can Gemini send WhatsApp broadcasts through WaBot?
No. Campaigns, broadcast scheduling and segmentation aren’t available through MCP. Gemini can send individual template and session messages and build simple keyword automations.
Is it safe to give Gemini my WhatsApp?
Keep tool confirmations on, ask Gemini to show each message before sending, test on your own number, and only message customers who opted in. You can also block the send tools with excludeTools.
The bottom line
If you have Gemini CLI access, WaBot is one settings.json entry away: httpUrl plus two headers from environment variables, then /mcp to confirm. Start with read-only triage, then let Gemini create templates and send test messages to your own number. If your Google plan moved you to Antigravity, the same server works there with a slightly different file.
