whatsapp-mcp
Provides tools for interacting with a personal WhatsApp account, enabling reading and searching chat history, sending messages, replying to specific messages, sending files, and managing read status.
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., "@whatsapp-mcpwhat did Ana send me about the inverter quote?"
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.
whatsapp-mcp
An MCP server that gives Claude read, search, and reply access to your personal WhatsApp account, by linking itself as an extra device the same way WhatsApp Web does.
Read — transcripts of any chat or group, paged backwards through history
Search — full-text across everything stored, diacritic-insensitive
Context — pull the messages surrounding any hit
Reply — send text, quote a specific message, send files, mark chats read
Media — download attachments to local files so Claude can look at them
How it fits together
Claude Code ──stdio/MCP──▶ src/mcp.js ──HTTP──▶ src/bridge.js ──▶ WhatsApp
│ │
└──── data/whatsapp.db ┘Two processes, on purpose. The bridge is a long-lived daemon that owns the WhatsApp websocket and mirrors every message into SQLite. The MCP server is short-lived — it starts and stops with your MCP client — and answers reads straight from SQLite, so searching and reading history keep working even when the bridge is down.
Related MCP server: WhatsApp MCP Server
Requirements
Node 22.5+ (uses the built-in node:sqlite, so there is nothing to compile).
Setup
npm install
npm run bridge # prints a QR codeOn your phone: WhatsApp → Settings → Linked devices → Link a device, scan the QR. The bridge then backfills whatever history WhatsApp hands a newly linked device and keeps running. Leave it running.
Register the MCP server with Claude Code:
claude mcp add whatsapp -- node /absolute/path/to/whatsapp-mcp/src/mcp.jsThen ask things like "what did Ana send me about the inverter quote?" or "summarise the Projeto Solar group since Monday and draft a reply."
Tools
Tool | What it does |
| Connection state, stored message counts, history range |
| Chats by recency, filterable by name and dm/group |
| Transcript of one chat, pageable with |
| Full-text search, optionally scoped to a chat or sender |
| Messages surrounding a given message id |
| Contact lookup by name or number |
| Send text, optionally quoting a message |
| Send an image, video, audio file, or document |
| Fetch an attachment to a local path |
| Clear a chat's unread badge |
Chats are referenced by name, phone number, or JID. A name that matches more than one chat is rejected with the list of candidates rather than guessed at — the one irreversible mistake here is sending a message to the wrong person.
Configuration
Copy .env.example to .env. Everything is optional. Notable knobs:
WA_MCP_READONLY=1— the four writing tools are never registered. Claude cannot send anything; useful if you only want it reading context.WA_MCP_BLOCKLIST=Therapist,5511999998888— chats matching these substrings are never written to the database at all.WA_MCP_FULL_HISTORY=1— request the largest history dump WhatsApp will give.WA_MCP_DATA— move the data directory somewhere else.
Sharing this
It's self-contained and has no hardcoded paths, so it clones and runs. What must
not be shared is data/ — data/auth/ holds credentials that are equivalent to
a logged-in session on your account, and data/whatsapp.db is your message history in
plaintext. Both are gitignored. If you publish this, publish the code only.
Things worth knowing
This uses an unofficial client. Baileys is a reverse-engineered implementation of the WhatsApp Web multi-device protocol. It is against WhatsApp's terms of service, and accounts do occasionally get banned — most often for bulk or automated sending to people who did not message first. Reading your own chats and replying at human volume is the low-risk end of this; blasting messages is the high-risk end. If you ever need this for a business, use the official WhatsApp Business Cloud API instead.
History is limited. WhatsApp only pushes a window of recent history to a newly linked device — typically weeks to months, not years. Everything from link time forward accumulates in full, so the database gets more useful the longer it runs.
The bridge must be running to send. Reads work offline from SQLite; sends,
downloads, and read receipts need the daemon. Run it under systemd or pm2 if you
want it always up.
Your message history ends up in a model's context. That is the entire point, but it is worth saying out loud: anything Claude reads here leaves your machine. The blocklist and read-only mode exist for the chats you would rather it never touch.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Drive your real WhatsApp inbox from Claude — send, reply, label, assign, and triage via TimelinesAI.
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
WhatsApp CRM for AI agents: search contacts, read chats, manage the sales pipeline, send messages.
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to read and send WhatsApp messages, including media and call history, via a local bridge.MIT
- AlicenseNot gradedqualityCmaintenanceConnects WhatsApp group chats to Claude, enabling reading, searching, exporting, replying, and AI-powered intelligence processing of conversations.1112MIT
- AlicenseAqualityCmaintenanceEnables Claude to read and search WhatsApp messages, transcribe voice notes, and analyze images locally through a read-only bridge.19MIT
- AlicenseNot gradedqualityCmaintenanceConnect your personal WhatsApp to Claude — send messages, read chats, and manage contacts.GPL 3.0