Skip to main content
The WSAPI MCP Server exposes 101 WhatsApp tools to any Model Context Protocol (MCP) compatible assistant, letting LLMs send messages, manage contacts and groups, and manage WhatsApp sessions without leaving the conversation.

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

Environment variables

Connect to Claude Desktop

Add the server to your Claude Desktop config file:
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’s tools/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/list in your MCP client and confirm the WSAPI catalog is returned
  • Send a message — use whatsapp_send_text with to and text fields
  • Share media — use whatsapp_send_image (or the specific media tool) with url or base64 data and optional mimeType
  • Manage sessions — use whatsapp_get_qr_code or whatsapp_get_pair_code when the phone link expires

Troubleshooting

Double-check your API key, instance status, and environment variable spelling. The startup validator prints specific missing keys.
Increase WSAPI_TIMEOUT, WSAPI_RETRY_ATTEMPTS, or WSAPI_RETRY_DELAY for congested networks.
Ensure the server runs in the same user session, verify the config path for your OS, and restart Claude after edits.
Set LOG_LEVEL=debug to dump request/response metadata (media payloads remain redacted).

GitHub

github.com/wsapi-chat/wsapi-mcp