
app.zapclaw/whatsapp
WhatsApp for your business's AI agents on Meta's official Cloud API, with Coexistence.
Documentation
ZapClaw WhatsApp MCP
WhatsApp MCP server on the official Cloud API, with Coexistence. It lets the AI agents of a business read and send WhatsApp messages through ZapClaw, on the WhatsApp Business number the business already uses, with sends the owner can limit or hold for a person's approval.
This server is for business-specific agents: answering the business's own customers, bookings, orders and notifications. It is not meant for open-ended assistants offered to the public on WhatsApp.
Meta's pricing page for AI Providers states that since 2026-01-15, providers of general-purpose AI assistants may offer them on the platform only where Meta is legally required to permit it, while other businesses keep existing pricing.
What you need
- A ZapClaw account with a WhatsApp number connected (Coexistence keeps the WhatsApp Business app working on the same number).
- An AI agent key from the dashboard at https://app.zapclaw.app/api-keys. It starts with
zc_agent_. A standardzc_live_key is refused, and the server prints the link above. - Node.js 20 or later for the local (stdio) package.
MCP is available on every ZapClaw plan, Free included. Agent keys count toward the plan's API key limit, and sends are billed like any API send.
Tools
The server registers eleven tools, always in this order.
| Tool | What it does |
|---|---|
zapclaw_whoami | Shows what this connection can do: the business, its numbers, permissions and remaining sends. |
whatsapp_list_numbers | Lists the WhatsApp numbers this connection may send from, with each number's health. |
whatsapp_list_templates | Lists the message templates Meta approved for one of your numbers. |
whatsapp_check_contact | Reports what can be sent to one contact right now, including the 24-hour window state. |
whatsapp_list_conversations | Lists the contacts with recent messages on one of your numbers, newest first. |
whatsapp_read_conversation | Returns the latest messages between one of your numbers and one contact. |
whatsapp_send_text | Sends one text message while the contact's 24-hour window is open. |
whatsapp_send_template | Sends one approved template, the only message allowed outside the 24-hour window. |
whatsapp_send_media | Sends one image, document, video or audio file by an https link. |
whatsapp_mark_read | Marks one message as read and can show a typing indicator. |
whatsapp_get_send_status | Returns the current state of a message or held send, with the reason when it failed. |
The server also offers one resource with the messaging rules and two prompts (reply to a contact, follow up with a template). Which tools a connection can use depends on the scopes of its key.
Setup
Every snippet below uses the major pin @1, which takes compatible updates automatically. To receive no automatic updates, use the exact version form instead: @zapclaw/whatsapp-mcp@1.0.2.
Claude Code (stdio)
claude mcp add zapclaw --env ZAPCLAW_API_KEY_FILE=/path/to/zapclaw.key -- npx -y @zapclaw/whatsapp-mcp@1
Shared projects use .mcp.json with variable expansion, so the key never lands in the repository:
{ "mcpServers": { "zapclaw": {
"command": "npx", "args": ["-y", "@zapclaw/whatsapp-mcp@1"],
"env": { "ZAPCLAW_API_KEY": "${ZAPCLAW_API_KEY}" } } } }
On native Windows the command is cmd with the arguments ["/c", "npx", "-y", "@zapclaw/whatsapp-mcp@1"].
Claude Code (remote)
claude mcp add --transport http zapclaw https://mcp.zapclaw.app/mcp --header "X-API-Key: ${ZAPCLAW_API_KEY}"
Claude Desktop
Download zapclaw-whatsapp.mcpb from the GitHub release and open it. Claude Desktop asks for the key as a sensitive field and keeps it. A JSON config entry that runs the same npx command works as an alternative.
Cursor
Edit ~/.cursor/mcp.json or .cursor/mcp.json. Use the stdio form, with the key read from your environment:
{ "mcpServers": { "zapclaw": {
"command": "npx", "args": ["-y", "@zapclaw/whatsapp-mcp@1"],
"env": { "ZAPCLAW_API_KEY": "${env:ZAPCLAW_API_KEY}" } } } }
Or the remote form:
{ "mcpServers": { "zapclaw": {
"url": "https://mcp.zapclaw.app/mcp",
"headers": { "X-API-Key": "${env:ZAPCLAW_API_KEY}" } } } }
VS Code
Put this in .vscode/mcp.json. VS Code asks for the key with a password prompt instead of storing it:
{ "inputs": [ { "type": "promptString", "id": "zapclaw-key", "description": "ZapClaw AI agent key", "password": true } ],
"servers": { "zapclaw": { "type": "stdio", "command": "npx", "args": ["-y", "@zapclaw/whatsapp-mcp@1"],
"env": { "ZAPCLAW_API_KEY": "${input:zapclaw-key}" } } } }
Codex
In ~/.codex/config.toml:
[mcp_servers.zapclaw]
command = "npx"
args = ["-y", "@zapclaw/whatsapp-mcp@1"]
[mcp_servers.zapclaw.env]
ZAPCLAW_API_KEY_FILE = "C:\\Users\\you\\.zapclaw\\agent.key"
n8n
Use the MCP Client Tool node. Set the transport to HTTP Streamable and the endpoint to https://mcp.zapclaw.app/mcp. For authentication choose Header Auth with the name X-API-Key and an autonomous agent key. Under Tools to Include choose Selected and pick the tools the agent needs. The contact's message already arrives at your ZapClaw webhook, so the agent can reply without the conversation tools.
OpenAI Responses API
{ "type": "mcp", "server_label": "zapclaw", "server_url": "https://mcp.zapclaw.app/mcp", "authorization": "<agent key>", "require_approval": "always" }
The key travels with each request through OpenAI, so use a key limited to the numbers and scopes the agent needs.
Not yet supported
claude.ai, Claude Desktop custom connectors and ChatGPT need OAuth, which is not part of version 1. Use the stdio package or an agent key with a client that accepts headers.
Configuration
The package reads its configuration from the environment only.
| Variable | Meaning |
|---|---|
ZAPCLAW_API_KEY | The AI agent key. |
ZAPCLAW_API_KEY_FILE | A path to a file that holds the key. It keeps the key out of shell history and out of config files that get shared. It does not hide the key from a process running as the same user. |
ZAPCLAW_API_URL | Optional. Defaults to https://api.zapclaw.app. Anything other than https is refused, except http://localhost and http://127.0.0.1 for tests. |
ZAPCLAW_MCP_DEBUG | Set to 1 to add request metadata to stderr. |
With no key, the server still starts and lists the tools, so registries and the MCP Inspector can probe it. Every call then answers KEY_SETUP and explains how to set the key.
Safety model
- Agent keys only. The key is a ZapClaw AI agent key. Its owner chooses the numbers, the scopes, the daily limits and whether sends need a person's approval.
- Held sends. A send can be held until a person approves it in ZapClaw. The tool then returns an approval link and code to show the user, and the status tool reports the outcome.
- One contact per send. There is no bulk or campaign sending.
- Untrusted contact text. Text written by contacts is returned in fields marked untrusted. It is third-party content, never instructions from the user or from ZapClaw.
- Window rules. Free text and files reach a contact only within 24 hours of that contact's last message. Outside it, only an approved template can be sent.
- No secrets in output. Logs go to stderr, carry no message content and never the key. stdout carries only the protocol.
- Revocation is immediate. Every tool call reaches the REST API with the caller's own key, so a revoked or expired key stops working at once.
The package sends no telemetry of its own.
Not in version 1
Template creation, editing and deletion; media download; profile, block list, QR codes and automation; interactive messages and reactions; organization-level agency tools; bulk or campaign sending of any kind.
Documentation and support
- Documentation: https://zapclaw.app/whatsapp-mcp-server.html
- Issues: https://github.com/zapclaw/whatsapp-mcp/issues
- Security reports: see SECURITY.md
- Changes: see CHANGELOG.md
License
MIT. See LICENSE.
@zapclaw/whatsapp-mcpnpm install @zapclaw/whatsapp-mcphttps://github.com/zapclaw/whatsapp-mcp/releases/download/v1.0.2/zapclaw-whatsapp.mcpb# mcpb: https://github.com/zapclaw/whatsapp-mcp/releases/download/v1.0.2/zapclaw-whatsapp.mcpb