WhatsApp Business Cloud API MCP
Connects to Meta's Graph API as the backend for the WhatsApp Business Cloud API, allowing direct invocation of any Meta Graph endpoint (e.g. listing registered phone numbers under a WhatsApp Business Account) in addition to the higher-level messaging and template management tools.
Provides tools for sending WhatsApp messages through the official WhatsApp Business Cloud API, including plain text/markdown messages, pre-approved marketing and utility templates, media (image, document, video, audio, sticker) via URL, and interactive quick-reply buttons (up to 3). Also allows inspecting phone number details such as display name, verification status and quality rating, listing message templates with approval status and languages, and invoking arbitrary WhatsApp Business Cloud API endpoints.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WhatsApp Business Cloud API MCPSend a WhatsApp message to +15551234567 saying 'Your order has shipped!'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WhatsApp Business Cloud API MCP (was-whatsapp-cloud-mcp)
A self-contained, cross-platform Model Context Protocol (MCP) server for the official WhatsApp Business Cloud API (Meta Graph API). Exposes 7 tools allowing AI coding assistants (Claude Desktop, Cursor, Antigravity, VS Code, Zed, etc.) to send text messages, media files, pre-approved marketing/utility templates, interactive quick-reply buttons, inspect phone quality ratings, and execute arbitrary calls to the WhatsApp Cloud API. Built by Web Analytics Solution.
Prerequisites
Required | How to install | |
Node.js 18+ | running | Mac: |
Git | letting | Mac: |
Meta Developer Account | to access WhatsApp Cloud API | |
Meta Access Token & Phone ID | for authentication | Walked through below |
Related MCP server: whatsapp-mcp-server
Quick Start — 3 Steps
Step 1 — Get WhatsApp Cloud API Credentials
Go to developers.facebook.com/apps and select or create an App with the WhatsApp product.
In the left navigation, click WhatsApp > API Setup.
Copy your Phone Number ID (e.g.
1056...).Generate an Access Token with the
whatsapp_business_messagingandwhatsapp_business_managementpermissions (or use a System User Token from Meta Business Settings).(Optional) Copy your WhatsApp Business Account ID (WABA ID) for template management.
Step 2 — Connect
Run the interactive setup command in your terminal:
npx -y github:mnsmasum62786/was-whatsapp-cloud-mcp authPaste your Meta Access Token when prompted.
Paste your Phone Number ID.
(Optional) Paste your WABA ID (or press Enter to skip).
The CLI will verify your phone number directly with Meta and save credentials locally at
~/.was-whatsapp-cloud-mcp/config.jsonwith strict0600permissions.
Step 3 — Add to Your AI Client
Add the following configuration to your AI client's MCP configuration JSON file:
{
"mcpServers": {
"WhatsApp Cloud MCP": {
"command": "npx",
"args": ["-y", "github:mnsmasum62786/was-whatsapp-cloud-mcp"]
}
}
}Configuration File Locations by Client:
Claude Desktop (Mac):
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonCursor:
~/.cursor/mcp.json(or via Cursor Settings -> MCP)Google Antigravity / Windsurf:
~/.gemini/antigravity/mcp.jsonor~/.codeium/windsurf/mcp_config.json
What You Can Ask the AI
Messaging & Notifications
"Send a WhatsApp message to
+15551234567saying: 'Your appointment is confirmed for tomorrow at 3 PM!'.""Send the pre-approved template
shipping_updateto+15551234567with order tracking details.""Send a PDF invoice to
+15551234567with the caption 'Invoice #1042'.""Send an interactive message to
+15551234567asking 'Do you want to confirm?' with Yes/No buttons."
Account & Templates
"Check the quality rating and messaging limit tier of my WhatsApp phone number."
"List all approved message templates under my WhatsApp Business Account."
Universal Escape Hatch
"Make a GET request to
/v22.0/{waba_id}/phone_numbersto list all registered phone numbers."
All Tools (7 Total)
Category | Tools | Description |
Messaging |
| Send plain text or markdown messages to a phone number. |
| Send pre-approved WhatsApp marketing/utility template messages. | |
| Send image, document, video, audio, or sticker via direct URL. | |
| Send interactive message with up to 3 quick-reply buttons. | |
Management |
| Inspect phone display name, verified status, and quality rating. |
| List message templates, approval status, category, and languages. | |
Universal API |
| Invoke any WhatsApp Business Cloud API / Meta Graph endpoint directly. |
CLI Commands
You can run these commands directly via npx -y github:mnsmasum62786/was-whatsapp-cloud-mcp <command>:
auth— Interactive prompt to connect or re-connect your WhatsApp credentials.status— Show config file location, phone ID, and saved status.logout— Delete the locally stored credentials file (~/.was-whatsapp-cloud-mcp/config.json).help— Print command line usage and environment variable options.
Multi-Account Setup
You can bypass the local config file by setting environment variables in your client configuration. This allows running multiple WhatsApp phone numbers or client accounts simultaneously:
{
"mcpServers": {
"WhatsApp - Support Line": {
"command": "npx",
"args": ["-y", "github:mnsmasum62786/was-whatsapp-cloud-mcp"],
"env": {
"WHATSAPP_ACCESS_TOKEN": "EAA...",
"WHATSAPP_PHONE_NUMBER_ID": "105600000000001"
}
},
"WhatsApp - Sales Line": {
"command": "npx",
"args": ["-y", "github:mnsmasum62786/was-whatsapp-cloud-mcp"],
"env": {
"WHATSAPP_ACCESS_TOKEN": "EAA...",
"WHATSAPP_PHONE_NUMBER_ID": "105600000000002"
}
}
}
}Troubleshooting
1. "WhatsApp Business Cloud API MCP — not configured yet"
Cause: The MCP server was started before configuring credentials.
Fix: Open your terminal and run
npx -y github:mnsmasum62786/was-whatsapp-cloud-mcp auth.
2. "Recipient phone number not in allowed list"
Cause: In Meta Developer sandbox mode, you can only message verified test phone numbers until you add a real payment method and business phone number.
Fix: Add the recipient number under WhatsApp > API Setup > To in the Meta Developer Portal, or go Live.
3. "Template does not exist in language"
Cause: The template name or language code provided does not match what was approved in Meta Business Suite.
Fix: Run
wa_list_templatesto view exact template names and approved language codes.
4. Windows PowerShell Execution Policy Error
If you see an error like npx.ps1 cannot be loaded because running scripts is disabled:
Fix: Run the following command in PowerShell:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
5. Cache Issues after Updates
To force clear the npx cache and download the latest release:
Windows (PowerShell):
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache" -ErrorAction SilentlyContinue npm cache clean --forceMac / Linux:
rm -rf ~/.npm/_npx npm cache clean --force
License
MIT License. Built by Web Analytics Solution.
This server cannot be deployed
Maintenance
Related MCP Connectors
WhatsApp for AI agents — your own number or the official Cloud API: messages, media, templates.
- WhatSyncOAuthapp.whatsync
WhatsApp for Claude, ChatGPT or any AI agent: search, reply and send. Personal or Business API.
WhatsMCP connects Claude and other MCP-compatible AI agents directly to WhatsApp. Send and receive text, images, documents, and voice notes; manage groups (create, add/remove members, promote admins); look up contacts and profiles; follow channels; and read call and message history — all through a standard MCP interface. For voice use cases, WhatsMCP offers SIP-based calling plans (inbound-only, or full inbound/outbound) so AI voice agents can answer and place WhatsApp calls, plus low-latency WebSocket integrations with voice agent providers like ElevenLabs. Multiple WhatsApp accounts can be paired and managed per workspace, with webhook support for real-time inbound message delivery to your own infrastructure.
Run WhatsApp Business campaigns from any AI assistant: contacts, segments, and broadcasts.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send WhatsApp messages, templates, and retrieve media through the WhatsApp Cloud API. Provides webhook handling and seamless integration with Meta's WhatsApp Business platform.23ISC
- AlicenseAqualityDmaintenanceConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without the risk of account bans.183 npm24MIT
- AlicenseAqualityDmaintenanceEnables LLMs to interact with WhatsApp via the official WhatsApp Cloud API, providing tools for sending messages, templates, media, and managing conversations.133 npmMIT
- AlicenseBqualityCmaintenanceEnables Claude to manage WhatsApp templates, flows, and send messages through the WhatsApp Cloud API.3119 npmMIT