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

What you get

  • Full coverage for messaging, contact, group, chat, session, instance, and account 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 18 or later
  • npm 9 or later
  • Active WSAPI subscription with a paired instance
  • 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 every tool exposed by WSAPI:

Common workflows

  • Verify connectivity — call list_tools in your MCP client and confirm the WSAPI catalog is returned
  • Send a message — use whatsapp_send_text with to and message fields
  • Share media — use whatsapp_send_media with Base64 payload and MIME type
  • 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