WhatsApp MCP Server — Chat with WhatsApp via AI Agents
MCP server connecting Claude and AI agents to your personal WhatsApp. Search contacts, read messages, send replies and media via natural language.
What it is
The WhatsApp MCP Server connects AI assistants like Claude to your personal WhatsApp account via the Model Context Protocol. Once configured, your AI agent can search contacts, read message history, send text replies, and share media files -- all through natural language commands.
It is intended for power users and developers who want to automate WhatsApp interactions, build chatbot workflows, or let their AI assistant handle routine messaging tasks.
How it saves time or tokens
Instead of switching between your AI assistant and WhatsApp manually, this MCP server lets the agent act on your behalf directly. Reading unread messages, summarizing conversations, and drafting replies happen in a single agent session without context-switching overhead.
How to use
- Install the WhatsApp MCP server package and configure it with your MCP client (e.g., Claude Desktop or Claude Code).
- Authenticate by scanning a QR code with your WhatsApp mobile app to link the session.
- Use natural language commands like 'read my latest messages' or 'send a message to John saying I will be late' through your AI agent.
Example
{
"mcpServers": {
"whatsapp": {
"command": "npx",
"args": ["-y", "whatsapp-mcp-server"],
"env": {
"WHATSAPP_SESSION_DIR": "~/.whatsapp-mcp"
}
}
}
}
Related on TokRepo
- MCP integrations -- Explore other MCP server integrations like Slack.
- AI tools for automation -- Browse automation-focused AI tools.
Common pitfalls
- WhatsApp sessions expire if your phone is offline for extended periods. Keep your phone connected to maintain the linked session.
- Sending too many automated messages risks triggering WhatsApp's anti-spam detection. Rate-limit outgoing messages.
- The MCP server accesses your personal WhatsApp, not the WhatsApp Business API. It is not suitable for high-volume business messaging.
- QR code re-authentication is required after session expiry or WhatsApp app updates.
- Media files sent through the MCP server must be under WhatsApp's size limits (16 MB for most media types).
Frequently Asked Questions
No. It typically uses an unofficial WhatsApp Web bridge library that emulates the web client protocol. This means it is subject to WhatsApp's terms of service for personal use. The official WhatsApp Business API is a separate, paid product.
Yes. Add the MCP server configuration to your Claude Desktop settings file. After restarting Claude Desktop, the WhatsApp tools will appear in the agent's available tool list. You authenticate by scanning the QR code shown in the terminal.
The MCP server acts as a bridge and does not persist message data beyond the active session. Messages are fetched from WhatsApp on demand and passed to your AI agent. Session credentials are stored locally in the configured session directory.
Yes. The server supports sending images, videos, PDFs, and other document types as WhatsApp media messages. Provide the local file path or URL, and the server handles the upload to WhatsApp.
WhatsApp Web sessions require periodic phone connectivity to stay active. If your phone goes offline for too long, the session disconnects and the MCP server cannot access messages until you re-authenticate with a new QR code scan.
Citations (3)
- Anthropic MCP Docs— Model Context Protocol specification for AI tool integration
- WhatsApp FAQ— WhatsApp Web multi-device protocol
- MCP GitHub— MCP server architecture for AI assistants
Related on TokRepo
Source & Thanks
Created by lharries. Licensed under MIT.
whatsapp-mcp — ⭐ 5,500+
Thank you for bridging WhatsApp and the MCP ecosystem.