The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Whatsapp MCP listing page.
Manage WhatsApp Business templates and send messages from Claude, ChatGPT, Cursor, VS Code Copilot, or any MCP-compatible client — powered by the Meta Cloud API.
| Tool | Description |
|---|---|
validate_template | Validate a template payload before submitting to Meta |
create_template | Submit a template for Meta approval |
list_templates | List templates with optional filters (status, category, name) |
get_template_detail | Get full details of a template by ID |
check_template_status | Quick status check for a template |
delete_template | Delete a template by name |
send_template_message | Send an approved template to a phone number |
send_bulk_template_messages | Send an approved template to multiple phone numbers |
8 tools covering the full template lifecycle: create → validate → approve → send.
Environment variables are used by all modes — local stdio and hosted remote.
How to get these? Go to Meta for Developers, create or select your app, navigate to WhatsApp > API Setup.
The server supports 3 transport modes:
| Transport | Command | Used By |
|---|---|---|
stdio (default) | python -m whatsapp_mcp | Claude Desktop, Cursor, VS Code, Windsurf |
sse | python -m whatsapp_mcp --transport sse | Legacy remote clients |
streamable-http | python -m whatsapp_mcp --transport streamable-http | Claude.ai, ChatGPT, newer MCP clients |
For HTTP transports, you can customize host/port:
Add to claude_desktop_config.json:
Claude.ai connects to remote MCP servers as custom connectors. The connection originates from Anthropic's cloud servers, not from your machine.
https://your-domain.com/mcp/)Note: Claude.ai does not support custom request headers. The server must be pre-configured with Meta credentials via environment variables. Each hosted server serves one WhatsApp Business Account.
ChatGPT supports remote MCP servers via the Responses API. It supports both Streamable HTTP and SSE transports.
Option 1 — Server pre-configured with env vars (simplest):
Option 2 — Per-request credentials via Bearer token:
Encode your Meta credentials as base64 JSON and pass them in the authorization field.
OpenAI forwards this value as the Authorization header to your MCP server:
Note: ChatGPT only supports remote MCP servers (no local stdio). Your server must be publicly accessible over HTTPS.
Add to .cursor/mcp.json in your project:
Add to .vscode/mcp.json:
For programmatic access or custom MCP clients, you can pass per-request credentials instead of relying on server env vars. Two methods are supported:
Method 1 — Bearer token (recommended):
Base64-encode a JSON object with your Meta credentials:
Required fields: access_token, phone_number_id, waba_id. Optional: app_id, api_version.
Method 2 — X-Meta- headers:*
| Header | Required | Description |
|---|---|---|
X-Meta-Access-Token | Yes | Your Meta access token |
X-Meta-Phone-Number-Id | Yes | Your WhatsApp phone number ID |
X-Meta-Business-Account-Id | Yes | Your WhatsApp Business Account ID |
X-Meta-App-Id | No | Your Meta app ID (for media uploads) |
X-Meta-Api-Version | No | API version (defaults to v24.0) |
If neither Bearer token nor X-Meta-* headers are present, the server falls back to environment variables.
Once connected, just talk to your AI assistant:
"Create a marketing template called
summer_salewith a header image, body text about 50% off, and a Shop Now button"
"List all my approved templates"
"Send the
order_confirmationtemplate to +919876543210 with order number ORD-456"
"Validate this template before I submit it: ..."
"Check the status of template ID 123456789"
Meta's API has 2 template categories(excluding Authentication). Within each category, templates can have different structural variants — each with its own component layout and validation rules.
| Structural Variant | Create | Send | Key Components |
|---|---|---|---|
| Text / Image / Video / Document | ✅ | ✅ | Header (optional) + Body + Footer + Buttons |
| Carousel | ✅ | ✅ | Cards with per-card header, body, buttons |
| Catalog | ✅ | ✅ | Body + CATALOG button |
| Limited-Time Offer (LTO) | ✅ | ✅ | Body + limited_time_offer component + copy code button |
| Coupon Code | ✅ | ✅ | Body + copy_code button |
| Multi-Product Message (MPM) | ✅ | ✅ | Body + product_list action with sections |
| Single-Product Message (SPM) | ✅ | ✅ | Body + product action |
| Product Card Carousel | ✅ | ✅ | Body + product cards with buttons |
| Call Permission | ✅ | — | Body + call_permission button |
| Structural Variant | Create | Send | Key Components |
|---|---|---|---|
| Text / Image / Video / Document | ✅ | ✅ | Header (optional) + Body + Footer + Buttons |
| Order Details | ✅ | ✅ | Body + order_details button with payment payload |
| Order Status | ✅ | ✅ | Body + order status parameters |
How routing works: When you call
create_template, the server inspects the components to auto-detect the structural variant (e.g., presence ofcards[]→ Carousel,CATALOGbutton → Catalog) and applies the correct validator. You just passcategory: "MARKETING"or"UTILITY"— the variant is determined from the component structure.
whatsapp_business_messaging and whatsapp_business_management permissions| Package | Purpose |
|---|---|
mcp | Model Context Protocol SDK |
httpx | Async HTTP client for Meta API |
pydantic | Payload validation |
python-dotenv | Environment config |
See ROADMAP.md for planned features.
MIT — see LICENSE.
Built by Jina Connect — the WhatsApp Business CX platform.