WhatsApp MCP Server
Wabery ships a WhatsApp MCP server so any MCP-capable AI agent, Claude, ChatGPT, Cursor, Codex, or your own, can build on the WhatsApp Business API by describing what you want instead of wiring up the Meta Cloud API yourself. There are two ways to connect: a hosted server with no install, or a local server printed by the Wabery CLI.
Hosted MCP server
Section titled “Hosted MCP server”The no-install path. Point any MCP client at the hosted server and sign in with OAuth: there is no API key to copy and no CLI to install.
https://mcp.wabery.comChatGPT
Use Wabery from ChatGPT. You sign in with your account, no key to copy.
Step 1 of 13
- 1Open ChatGPT in your browser and sign in. You need a paid plan for this: Plus, Pro, Business, or Enterprise.
| Client | Setup |
|---|---|
| Claude | Open Customize → Connectors, click +, then add https://mcp.wabery.com. |
| Claude Code | claude mcp add --transport http wabery https://mcp.wabery.com, then /mcp to sign in. |
| Cursor | Customize → MCP → add a server with URL https://mcp.wabery.com, then click “Needs login”. |
| Codex CLI | Add [mcp_servers.wabery] with url = "https://mcp.wabery.com" and auth = "oauth" to ~/.codex/config.toml, then run codex mcp login wabery. |
Unlike the local server below, the hosted server has write tools enabled.
Your OAuth scopes decide what an agent is allowed to change. Broadcast delivery
uses the separate broadcasts:send scope. Every high-risk hosted action,
including destructive changes, publishing, function deployment, and broadcast
delivery, requests an MCP elicitation that the person must accept in the
client; an agent cannot approve its own request. The action fails closed when a
hosted client does not support elicitation.
Local MCP server (CLI)
Section titled “Local MCP server (CLI)”Prefer a local process? Install the Wabery CLI, then print an MCP server config for your agent and drop it into its config file — Claude Code, Codex, and OpenCode are supported:
wabery mcp-config claude --rawwabery mcp-config codex --rawwabery mcp-config opencode --rawThen just describe what you want:
The MCP server exposes the core Wabery primitives an agent needs to build an
integration: projects, channels, routing, contacts, registration intents,
conversations, message history, outbound messages, inbound media metadata,
templates, broadcasts, WhatsApp Flows, hosted functions, submissions, dispatches,
automations, webhooks, config-as-code, and Meta Business Agent tools. The local
server starts read-only by default; pass --write (or set
WABERY_MCP_MODE=write) to allow mutations in a trusted local session.
Hosted function MCP tools let an agent list, create, deploy, test, expose, invoke, tail logs, and delete project-scoped server-side handlers. Function write tools require confirmation tokens in write mode, matching the CLI’s safety model for config apply and flow publish.
For media-aware agents, use wabery_list_conversation_messages to inspect
history. Retained inbound WhatsApp files appear as media/assets metadata with
short-lived signed URLs; download them promptly and treat expires_at as the
retention deadline.
For template and locale-aware workflows, agents should inspect
publish_readiness on wabery_get_channel before creating templates. Templates
need a dedicated non-sandbox WhatsApp channel, Meta business verification, and a
Meta payment method; blockers such as BUSINESS_NOT_VERIFIED or
NO_PAYMENT_METHOD mean the template should not be submitted yet. When enrolling
contacts, set preferred_language if later flow sends should resolve a
locale-specific config key. After wabery_send_message, use wabery_get_message
to inspect queued/provider status and Meta failure details. Use
wabery_get_template with refresh: true, or wabery_wait_template in scripts,
to track template approval.
Broadcast campaigns
Section titled “Broadcast campaigns”Agents can operate the broadcast preparation and delivery workflow with these tools:
| Stage | Tools | Required scope |
|---|---|---|
| Find an audience | wabery_list_contacts, wabery_list_contact_imports, wabery_get_contact_import |
contacts:read |
| Inspect campaigns | wabery_list_broadcasts, wabery_get_broadcast, wabery_list_broadcast_recipients |
broadcasts:read |
| Build a draft | wabery_create_broadcast, wabery_prepare_broadcast_audience, wabery_duplicate_broadcast |
broadcasts:write |
| Deliver | wabery_send_broadcast, wabery_schedule_broadcast |
broadcasts:send |
| Stop remaining work | wabery_cancel_broadcast |
broadcasts:write |
The safe agent sequence is:
- Verify there is a dedicated WhatsApp channel and approved template variant for each intended language.
- Verify category-specific consent. A phone number or CSV row alone is not consent.
- Create a draft, then prepare exactly one audience source:
contact_ids,import_id, orfilter. - Poll
wabery_get_broadcastwhile status ispreparing. - At
ready, show the user the total/skipped counts and, when useful, inspect the frozen snapshot withwabery_list_broadcast_recipients. - Ask for explicit confirmation. The hosted MCP server then opens a client-controlled confirmation dialog before send or schedule executes.
Local stdio MCP uses the documented confirmation token fallback in explicit write mode. Canceling stops recipients that have not been dispatched, but messages already accepted by Meta cannot be recalled. Preparing an audience freezes it; duplicating a campaign copies only the template configuration, so the new draft needs a new preparation step.
OAuth authorization codes and refresh tokens are bound to the canonical MCP
resource. Redirect URIs must use HTTPS, except HTTP loopback callbacks for
installed clients. Refresh tokens rotate on every use; clients must persist the
new refresh token returned by the token endpoint. Hosted access tokens are also
audience-bound at the API layer: direct replay against the public REST API is
rejected because only the MCP service holds the required service proof.
CSV uploads are deliberately handled by the dashboard or CLI rather than passed
through an MCP prompt. Run wabery contacts import, poll with
wabery contacts import-status, then the agent can find the completed import
through wabery_list_contact_imports. For smaller manual audiences, enroll
contacts with wabery_enroll_contact.
See WhatsApp broadcasts for request bodies, lifecycle states, frequency safeguards, webhook events, and CLI/SDK examples.