WhatsApp MCP Server
Uses OpenAI Whisper, when an OpenAI API key is configured, to transcribe WhatsApp voice messages.
Enables interaction with WhatsApp via WhatsApp Web, including sending and reading messages, managing contacts, searching chats, reacting/reply-quoting/editing/deleting messages, showing typing indicators, and sending or downloading media.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
WhatsApp MCP Server
A Model Context Protocol (MCP) server that enables LLMs to interact with WhatsApp through the WhatsApp Web interface. Works with any MCP-compatible client (Claude Desktop, Claude Code, etc.).
Warning: This uses the unofficial whatsapp-web.js library which violates WhatsApp's Terms of Service. Use at your own risk - account bans are possible.
Features
Send Messages: Send text messages to any WhatsApp contact or phone number
Read Messages: Fetch message history from any chat
Contact Management: List and search contacts
Search: Search for messages across chats
QR Code Display: View QR code directly in Claude for easy authentication
Message Interactions: React with emojis, quote-reply, edit, and delete messages
Typing Indicator: Show typing or recording state in chats
Media Handling: Send and receive images, documents, and other media
Voice Transcription: Transcribe voice messages using OpenAI Whisper
Auto-Recovery: Detects browser crashes and allows reconnection without re-auth
Related MCP server: whatsapp-mcp
Prerequisites
Node.js 18 or higher
A WhatsApp account
Chrome/Chromium (installed automatically by Puppeteer)
Installation
# Clone the repository
git clone https://github.com/fabienbutz/whatsapp-mcp.git
cd whatsapp-mcp
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"whatsapp": {
"command": "node",
"args": ["/absolute/path/to/whatsapp-mcp/build/index.js"],
"env": {
"OPENAI_API_KEY": "sk-your-openai-key-here"
}
}
}
}Note: The
OPENAI_API_KEYis optional and only needed for voice message transcription.
Other MCP Clients
For other MCP-compatible clients, configure the server with:
Command:
nodeArgs:
["/absolute/path/to/whatsapp-mcp/build/index.js"]
First-Time Setup
Start the MCP server (via Claude Desktop or directly with
npm start)Ask Claude to check the WhatsApp status - it will show a QR code
Open WhatsApp on your phone
Go to Settings → Linked Devices → Link a Device
Scan the QR code
Once authenticated, the session is saved locally in
.wwebjs_auth/
Available Tools
Tool | Description |
| Check connection status and contact count |
| Display QR code for authentication |
| Send a message to a phone number |
| Send a message to a contact by name |
| List all saved contacts |
| Search for a contact by name |
| Get messages from a specific chat |
| Get recent messages from all chats |
| Load more message history for a chat |
| Search messages by text |
| Request a history sync |
| View server logs for debugging |
| Reconnect if browser crashed (keeps auth) |
| Reset authentication and scan new QR code |
| React to a message with an emoji |
| Quote-reply to a specific message |
| Delete a message (for everyone or locally) |
| Edit a sent text message |
| Show typing/recording indicator in a chat |
| Download media (image, video, audio) from a message |
| Send an image from URL or base64 data |
| Send a document/file from URL or base64 data |
| Transcribe voice messages using OpenAI Whisper |
Usage Examples
Once connected, you can ask Claude things like:
"Show me my recent WhatsApp messages"
"Send 'Hello!' to +49151234567"
"Send a message to John saying I'll be late"
"What are the last 10 messages from [name]?"
"Search my WhatsApp for messages about 'meeting'"
"Check my WhatsApp connection status"
"Send this image to John" (with an image URL)
"React with a thumbs up to the last message from [name]"
"Reply to [name]'s last message saying thanks"
"Delete the last message I sent to [name]"
"Transcribe the last voice message from [name]"
"What did [name] say in their voice message?"
Phone Number Format
Phone numbers should be in international format without the leading +:
German:
4915123456789(not+4915123456789)US:
14155551234
Rate Limiting
To reduce ban risk:
Avoid sending more than 10-20 automated messages per day
Don't send messages to unknown contacts
Use primarily for responding to incoming messages
Let your account "age" with normal usage before automation
Troubleshooting
QR Code Not Showing
Ask Claude to call
whatsapp_get_qr_code- it will display the QR code as an imageCheck
whatsapp_logsfor errors
Authentication Fails
Delete the
.wwebjs_auth/folder and restartMake sure WhatsApp Web isn't open in a browser
Kill any lingering Chrome processes:
pkill -f "Google Chrome for Testing"
Messages Not Sending
Check
whatsapp_logsfor the specific errorMost likely a WhatsApp Web API change - see CLAUDE.md for known issues and fixes
Browser Crashed / "Detached Frame" Error
If whatsapp_status shows browser_crashed or you see "detached frame" errors:
Run
whatsapp_reconnect- this restarts the browser while keeping your auth sessionIf that fails, use
whatsapp_reset_authand scan a new QR codeAs a last resort, restart Claude Desktop
Puppeteer Errors
Ensure Chrome/Chromium is available
On Linux, you may need additional dependencies:
apt-get install -y chromium-browser
Development
# Run in development mode with hot reload
npm run dev
# Build for production
npm run build
# Run built version
npm startSee CLAUDE.md for development best practices and known issues with whatsapp-web.js.
License
MIT - see LICENSE
Disclaimer
This project is not affiliated with WhatsApp or Meta. Using unofficial clients may result in your account being banned. This is intended for personal use and experimentation only.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Drive WhatsApp from any MCP client: pair devices, send text and media, manage contacts and groups.
Your own WhatsApp as an MCP server: read, search and send from any MCP client.
WhatsMCP connects Claude and other MCP-compatible AI agents directly to WhatsApp. Send and receive text, images, documents, and voice notes; manage groups (create, add/remove members, promote admins); look up contacts and profiles; follow channels; and read call and message history — all through a standard MCP interface. For voice use cases, WhatsMCP offers SIP-based calling plans (inbound-only, or full inbound/outbound) so AI voice agents can answer and place WhatsApp calls, plus low-latency WebSocket integrations with voice agent providers like ElevenLabs. Multiple WhatsApp accounts can be paired and managed per workspace, with webhook support for real-time inbound message delivery to your own infrastructure.
WhatsApp MCP on your own number: read chats, search contacts, send messages.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to list, read, search, and send WhatsApp messages via a persistent WebSocket connection with local SQLite storage.AGPL 3.0
- AlicenseAqualityCmaintenanceEnables sending WhatsApp messages from MCP clients using a personal WhatsApp account via WebSocket protocol, without needing the Business API or browser automation.5MIT
- AlicenseAqualityBmaintenanceEnables agents and MCP clients to read and send WhatsApp messages and media, search chats, and manage contacts and groups after a one-time QR pairing.13MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read, search, and send personal WhatsApp messages and files through a locally linked device.49 npmMIT