The WSAPI WhatsApp MCP Server enables LLMs to interact with WhatsApp through a comprehensive API gateway (80+ tools), covering messaging, contact management, group operations, chat control, and account administration.
Messaging
Send text (with mentions, replies, forwarding), images, videos, audio, voice/PTT messages, documents, stickers, locations, and contact vCards
Send links with rich previews (title, description, thumbnail)
React to messages with emojis, edit or delete messages, mark as read/delivered/played, and star/unstar messages
Contact Management
Retrieve, create, and update contacts
Get profile pictures and business profiles
Subscribe to contact presence updates
Group Management
List all groups, create new groups with participants, retrieve group info, and update group names
Chat Management
List or retrieve specific chats
Set chat presence (typing, recording, paused)
Archive/unarchive and pin/unpin chats
Session & Instance Control
Check session status, get QR codes or pairing codes for login, logout, and restart the instance
Get/update instance settings (name, description, pull mode) and generate new API keys
Account Profile Management
Retrieve account info and update display name, profile picture, presence status, and status message
Integration & Filtering
Works with Claude Desktop and Claude Code via the Model Context Protocol (MCP)
Load only specific tool categories or individual tools to reduce context window usage
Provides comprehensive WhatsApp functionality through the WSAPI service, enabling AI assistants to send messages, manage contacts and groups, handle chat operations, set presence status, manage account settings, and perform session management including QR code login and device pairing.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WSAPI WhatsApp MCP Serversend a message to John saying I'll be there in 10 minutes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@wsapichat/mcp-server
A Model Context Protocol (MCP) server for WSAPI - the WhatsApp API Gateway. Enables LLMs to send messages, manage contacts and groups, handle communities and newsletters, post status updates, and more through WhatsApp.
For comprehensive documentation, see the WSAPI MCP Server guide.
Note: This project is not affiliated with, associated with, or endorsed by WhatsApp or Meta.
Installation
Prerequisites
Node.js >= 20.19.0
WSAPI account with API credentials (wsapi.chat)
Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"wsapi": {
"command": "npx",
"args": ["@wsapichat/mcp-server"],
"env": {
"WSAPI_API_KEY": "your_api_key_here",
"WSAPI_INSTANCE_ID": "your_instance_id_here",
"WSAPI_ENABLED_CATEGORIES": "messaging,contacts"
}
}
}
}Claude Code
claude mcp add wsapi -- npx @wsapichat/mcp-server \
--env WSAPI_API_KEY=your_api_key_here \
--env WSAPI_INSTANCE_ID=your_instance_id_here \
--env WSAPI_ENABLED_CATEGORIES=messaging,contactsTool Filtering
The server exposes 80+ tools across 12 categories. To reduce context window usage, you can filter which tools are loaded using environment variables.
By category
Load only messaging and contact tools:
WSAPI_ENABLED_CATEGORIES=messaging,contactsAvailable categories: messaging, contacts, groups, chats, session, users, communities, newsletters, status, calls, media
By individual tool
Load only specific tools:
WSAPI_ENABLED_TOOLS=whatsapp_send_text,whatsapp_send_image,whatsapp_get_contactsCombined
Use categories as a base set and add individual tools from other categories:
WSAPI_ENABLED_CATEGORIES=messaging
WSAPI_ENABLED_TOOLS=whatsapp_get_contacts,whatsapp_get_chatsIf neither variable is set, all tools are loaded.
Configuration
Variable | Required | Default | Description |
| Yes | - | Your WSAPI API key |
| Yes | - | Your WSAPI instance ID |
| No |
| WSAPI base URL |
| No | (all) | Comma-separated tool categories to load |
| No | (all) | Comma-separated tool names to load |
| No |
| Logging level (error, warn, info, debug) |
Development
git clone https://github.com/wsapi-chat/wsapi-mcp
cd wsapi-mcp
npm install
cp .env.example .env # Edit with your credentials
npm run build
npm startLicense
MIT - see LICENSE for details.
Links
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.