WhatsApp MCP API is a self-hosted Node.js server that links your personal WhatsApp account through WhatsApp Linked Devices, stores the session locally, and exposes messaging capabilities over a REST API and an MCP-over-HTTP endpoint. Once paired, you can send messages, list chats, and read message history programmatically — without manually opening WhatsApp Web each time.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jihvijhojhviihogyuvi/whatsapp-api/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Clone, install, pair, and send your first message in minutes.
Configuration
Customize host, port, auth directory, and Chrome settings via environment variables.
REST API Reference
Explore every REST endpoint — status, send, chats, messages, and more.
MCP Endpoint
Use the MCP-over-HTTP endpoint to integrate WhatsApp tools into AI agents.
How It Works
WhatsApp MCP API uses whatsapp-web.js, an unofficial WhatsApp Web client, to establish a Linked Devices session. After a one-time phone-number pairing step, the session is persisted locally in.wwebjs_auth/ so the server reconnects automatically on restart.
Pair your WhatsApp account
Request a pairing code via
POST /api/pairing-code and enter it in WhatsApp under Linked devices → Link with phone number.Key Features
Phone-number pairing
Pair without scanning a QR code — request a numeric code and enter it on your phone.
Persistent session
Auth state is saved locally so the server reconnects automatically after restarts.
REST API
Full REST API for status checks, sending messages, listing chats, and reading history.
MCP-over-HTTP
JSON-RPC 2.0 MCP endpoint with 7 WhatsApp tools for AI agent integration.