Add WhatsApp to Claude Code — Let the Agent Message Humans Directly
Claude Code is a real coding agent. With the Gavi WhatsApp MCP server, it can also notify humans, send OTPs, blast broadcasts, and run multi-step messaging workflows.
Claude Code is Anthropic's terminal-native coding agent. It edits files, runs commands, plans across multi-step tasks, and now — thanks to MCP — it can also send WhatsApp messages to real humans.
That last part is more powerful than it sounds. Claude Code is great at doing work; but until now, when the work was done, it had no way to tell anyone. Now it does.
What changes when an agent can message humans
A few examples of what becomes a one-liner:
Run the integration tests. If anything fails, WhatsApp the failure log to +919876543210.
When this migration finishes, send the rowcount to the on-call engineer on WhatsApp.
Read leads.csv (every lead has
opt_in: yesbecause we collected consent at signup), send each lead the "intro_offer" template personalized with their name and city, and write a report.
Claude Code plans these as multi-step workflows: it runs commands, parses output, calls the WhatsApp MCP tool with the right arguments, and reports back. You write one English sentence.
What is MCP?
MCP (Model Context Protocol) is the open standard for giving AI agents tools. An MCP server exposes a typed list of tools; the agent reads them, decides which to call, fills in arguments, gets results.
Anthropic created MCP, and Claude Code has first-class support. But the same protocol is supported by Cursor, OpenAI Codex, Claude Desktop, OpenAI Agents SDK, n8n, LangChain via adapters, and an increasing number of custom agent runtimes — so a single MCP server works everywhere.
Setup (90 seconds)
Prerequisites
- Claude Code installed
- A Gavi WhatsApp API key — get one at gaviventures.com
- Node.js 18+
Configure the MCP server
Edit ~/.claude/mcp.json (or run claude mcp add if you prefer the CLI):
{
"mcpServers": {
"gaviwhatsapp": {
"command": "npx",
"args": ["@gaviwhatsapp/mcp", "--api-key", "gv_YOUR_KEY"]
}
}
}
Restart Claude Code. On startup it'll list gaviwhatsapp as a connected MCP server, and the agent will have these WhatsApp tools loaded:
| Tool | Use case |
|---|---|
send_message | Free-form text within the 24-hour conversation window |
send_template | Meta-approved template — required for cold outreach, OTPs, transactional |
send_media | Image, video, document, audio |
send_broadcast | Template send to many recipients with per-row variables |
list_templates | Discover approved templates |
list_messages | Read message history and delivery status |
Real workflows worth running
1. Deploy notifications. End of your deploy script, just prompt:
When the deploy command finishes, send a WhatsApp to me with the build ID, duration, and any errors.
2. CSV-driven broadcasts to opted-in users. Drop a CSV into the project and ask:
Read users.csv. For each user signed up in the last 7 days who has
opt_in: yesandstatusis not "unsubscribed", send the "welcome_offer" template personalized with their first name and city. Write a report.
Claude Code reads the CSV, loops through rows, calls send_template per recipient, handles rate limits, and produces a markdown report with delivery counts. No glue code.
Heads up — opt-in is required. Every recipient of a business-initiated WhatsApp must have opted in to hear from your business. Cold-blasting templates to a CSV without opt-in tanks your quality rating and can get your number suspended. The
opt_in: yesfilter above isn't a suggestion — it's how you stay compliant.
3. Test failure alerts. Wire it into pre-merge checks:
Run pytest. If anything fails, send the last 50 lines of output to the team WhatsApp group via the "build_alert" template.
4. Scheduled status reports. From a cron-triggered script:
Query the DB for yesterday's signup count, MRR delta, and top 5 referrers. Send a summary WhatsApp to the founder using the "daily_summary" template.
Why this beats wiring it yourself
Without MCP, every one of those workflows would be a Python or Node script with:
- WhatsApp API client (Meta Cloud API or a wrapper)
- Auth, signing, retries
- Template variable formatting per Meta's rules
- Error handling, logging
- Hardcoded recipient logic
With MCP, the agent generates and runs the workflow on the fly. You describe the goal; the model figures out the tool calls.
Same MCP server, every agent
The @gaviwhatsapp/mcp server is runtime-agnostic. Drop the same config into:
- Cursor — see our Cursor guide
- OpenAI Codex CLI — see the Codex guide
- Claude Desktop — for solo founders running ops by chat (see the Claude Desktop guide)
- OpenAI Agents SDK / LangChain via MCP adapters — for production agentic apps
- Anthropic API + MCP in your own backend — full custom agents
If your team uses multiple of these, you only need one API key.
Pricing
$9.99/mo flat from Gavi, no per-message markup. Meta's per-message charges go directly to your WhatsApp Business Account.
Try it: gaviventures.com · GitHub · MCP Registry
Ready to try Gavi WhatsApp?
Send WhatsApp messages from your code, AI agent, or CRM in under 5 minutes.