@daisyintel/whatsapp-cloud-mcp
v2.0.2
Published
MCP server for the WhatsApp Cloud API with webhook support.
Maintainers
Readme
WhatsApp Cloud API MCP Server
TypeScript MCP server for Meta's WhatsApp Cloud API.
It can run as a local stdio MCP server, or as a hosted server with streamable-http, sse, and webhook endpoints. Each running process uses one WhatsApp account context from the environment variables provided at startup.
Quick Start
Standard MCP Client Config
This is the main usage model for Claude, Cursor, Inspector, and package importers that launch MCP servers over stdio.
{
"mcpServers": {
"whatsapp-cloud": {
"command": "npx",
"args": ["-y", "@daisyintel/whatsapp-cloud-mcp"],
"env": {
"WHATSAPP_ACCESS_TOKEN": "replace-me",
"WHATSAPP_API_VERSION": "v23.0",
"WHATSAPP_BUSINESS_ID": "",
"WHATSAPP_WABA_ID": "",
"WHATSAPP_PHONE_NUMBER_ID": "",
"WHATSAPP_VERIFY_TOKEN": "",
"META_APP_SECRET": ""
}
}
}
}How it works:
- the MCP client launches the package with
npx - the server reads the
WHATSAPP_*values fromenv - all tool calls in that process use that one configured WhatsApp account
Import From npm Package UI
For platforms with fields such as Package Name, Command, Command Args, and Environment Variables, use:
Package Name:@daisyintel/whatsapp-cloud-mcpCommand:npxCommand Args:-y @daisyintel/whatsapp-cloud-mcp
If the platform has trouble with scoped npm packages, use the unscoped alias package:
Package Name:whatsapp-cloud-mcpCommand:npxCommand Args:-y whatsapp-cloud-mcp
Minimum Environment
{
"WHATSAPP_ACCESS_TOKEN": "replace-me"
}Useful defaults for real usage:
{
"WHATSAPP_ACCESS_TOKEN": "replace-me",
"WHATSAPP_API_VERSION": "v23.0",
"WHATSAPP_BUSINESS_ID": "your_business_id",
"WHATSAPP_WABA_ID": "your_waba_id",
"WHATSAPP_PHONE_NUMBER_ID": "your_phone_number_id",
"WHATSAPP_VERIFY_TOKEN": "your_verify_token",
"META_APP_SECRET": "your_app_secret"
}Hosted Server Mode
If you want to expose MCP over HTTP/SSE and receive WhatsApp webhooks, run the hosted entrypoint:
$env:WHATSAPP_ACCESS_TOKEN="EAAG..."
$env:WHATSAPP_API_VERSION="v23.0"
$env:WHATSAPP_WABA_ID="123456789"
$env:WHATSAPP_PHONE_NUMBER_ID="987654321"
$env:WHATSAPP_VERIFY_TOKEN="my-verify-token"
$env:META_APP_SECRET="my-app-secret"
$env:PORT="3000"
$env:WHATSAPP_MAX_WEBHOOK_EVENTS="100"
$env:WHATSAPP_ALLOW_UNSIGNED_WEBHOOKS="false"
npx --yes --package @daisyintel/whatsapp-cloud-mcp whatsapp-cloud-mcp-httpHosted endpoints:
GET /healthPOST /mcpGET /ssePOST /messages?sessionId=...GET /webhookPOST /webhook
Environment Variables
Account Configuration
| Variable | Required | Description |
| --- | --- | --- |
| WHATSAPP_ACCESS_TOKEN | Yes | Meta access token used for all WhatsApp API calls in the running process. |
| WHATSAPP_API_VERSION | No | Graph API version. Defaults to v23.0. |
| WHATSAPP_BUSINESS_ID | No | Default business ID for business-scoped operations. |
| WHATSAPP_WABA_ID | No | Default WhatsApp Business Account ID. |
| WHATSAPP_PHONE_NUMBER_ID | No | Default phone number ID used by message and phone-number operations. |
| WHATSAPP_VERIFY_TOKEN | No | Verify token used for webhook verification. |
| META_APP_SECRET | No | App secret used to validate webhook signatures. |
Hosted Server Configuration
| Variable | Required | Description |
| --- | --- | --- |
| PORT | No | HTTP port for hosted mode. Defaults to 3000. |
| WHATSAPP_MAX_WEBHOOK_EVENTS | No | Number of recent webhook events kept in memory. |
| WHATSAPP_ALLOW_UNSIGNED_WEBHOOKS | No | Allows unsigned webhook payloads for local development only. |
Deployment Model
This package is account-scoped by process.
- one running process = one WhatsApp account context
- one MCP server config = one set of WhatsApp credentials
- per-call ID overrides still use the same underlying access token
If you need to serve multiple downstream clients with different Meta credentials, run multiple isolated instances and start each one with that client's own environment variables.
CLI Commands
Published binaries:
whatsapp-cloud-mcpwhatsapp-cloud-mcp-httpwhatsapp-cloud-mcp-inspect
Examples:
npx -y @daisyintel/whatsapp-cloud-mcp
npx --yes --package @daisyintel/whatsapp-cloud-mcp whatsapp-cloud-mcp-http
npx --yes --package @daisyintel/whatsapp-cloud-mcp whatsapp-cloud-mcp-inspectLocal Development
npm install
npm run build
npm test
npm run test:package
npm run dev
npm run dev:http
npm run inspect:devMCP Inspector
Inspect the published stdio package from a clean folder:
npx @modelcontextprotocol/inspector --config .\mcp.json --server whatsapp-cloudInspect the hosted server:
- Start it with
npm run dev:http. - Open MCP Inspector.
- Use
http://127.0.0.1:3000/mcpforstreamable-http. - Use
http://127.0.0.1:3000/sseforsse.
