What you get
- WhatsApp coverage for messages, contacts, groups, communities, chats, users, calls, newsletters, status, media and sessions (not Cloud Account or OSS admin operations)
- Secure credential handling with runtime validation via Zod schemas
- Built-in health check, structured logging, and graceful shutdown helpers
- Drop-in compatibility with Claude Desktop and other MCP clients
Requirements
- Node.js 20.19 or later, through Node.js 24
- npm 9 or later
- A WSAPI Cloud or self-hosted OSS instance (pair it before messaging)
- WSAPI API key and instance ID
Installation
- npx (Recommended)
- Global install
- Project dependency
Environment variables
Connect to Claude Desktop
Add the server to your Claude Desktop config file:- macOS
- Windows
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:For a global install, replace
"command": "npx" and "args" with "command": "wsapi-mcp".Tool catalog
The server registers 101 WhatsApp tools by default. Use your client’stools/list operation for the complete catalog and input schemas, or filter the catalog with the environment variables above.
QR images are returned as MCP image content. Downloads are embedded binary resources with base64
blob data and a MIME type; they are not decoded as JSON or UTF-8 text.
Common workflows
- Verify connectivity — call
tools/listin your MCP client and confirm the WSAPI catalog is returned - Send a message — use
whatsapp_send_textwithtoandtextfields - Share media — use
whatsapp_send_image(or the specific media tool) withurlor base64dataand optionalmimeType - Manage sessions — use
whatsapp_get_qr_codeorwhatsapp_get_pair_codewhen the phone link expires
Troubleshooting
Authentication failures
Authentication failures
Double-check your API key, instance status, and environment variable spelling. The startup validator prints specific missing keys.
Timeouts or flaky delivery
Timeouts or flaky delivery
Increase
WSAPI_TIMEOUT, WSAPI_RETRY_ATTEMPTS, or WSAPI_RETRY_DELAY for congested networks.Claude Desktop can't see the server
Claude Desktop can't see the server
Ensure the server runs in the same user session, verify the config path for your OS, and restart Claude after edits.
Need more context?
Need more context?
Set
LOG_LEVEL=debug to dump request/response metadata (media payloads remain redacted).