whatsapp-export-mcp
Reads WhatsApp chat exports (.zip or .txt, from iPhone or Android) directly from local disk: summarises participants and period, pages through messages by date range and sender with citable message indices, searches text ignoring case and accents, lists and saves attachments (photos, voice messages, videos, documents, stickers, contact cards), and reports per-person and per-month statistics. Voice messages are listed but not transcribed, and the server makes no network requests.
whatsapp-export-mcp
An MCP server that lets Claude, Cursor and other AI assistants read a WhatsApp chat export. Point it at the .zip you get from Export chat and ask questions about the conversation: what was agreed, when someone said something, who sent the most voice messages, which photos are missing.
You: Open ~/Downloads/WhatsApp Chat with Ana.zip. When did we settle the moving date, and who suggested it?
Claude: (calls open_export, then search_messages "move")
Ana suggested Saturday the 20th on 2024-04-02 at 18:31 (#1204); you confirmed it at 18:40 (#1207).Six tools: summarise an export, read messages by date or sender, search (case and accents ignored), list attachments, per-person statistics, and save a file out of the export.
Every message line carries its index (
#1204), so the assistant can cite the exact message.iPhone and Android exports,
.zipor.txt, including archives re-zipped by Windows. Parsing comes fromwhatsapp-export-reader.Runs on your machine. The server makes no network requests.
Voice messages are listed, not transcribed, so the assistant can see that a voice message was sent but not what it said. To get every voice message written out inside the conversation, as a PDF, use Zap2Doc on the same export.
Install
Requires Node.js 18.17 or newer. No global install needed: clients start it with npx.
Claude Desktop
Settings → Developer → Edit Config, then add to claude_desktop_config.json:
{
"mcpServers": {
"whatsapp-export": {
"command": "npx",
"args": ["-y", "whatsapp-export-mcp"]
}
}
}Restart Claude Desktop. The tools appear under the tools icon in a new chat.
Claude Code
claude mcp add whatsapp-export -- npx -y whatsapp-export-mcpCursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"whatsapp-export": {
"command": "npx",
"args": ["-y", "whatsapp-export-mcp"]
}
}
}Any other MCP client
Run npx -y whatsapp-export-mcp as a stdio server.
Related MCP server: whatsapp-mcp-local
Tools
Tool | What it does |
| Reads the export and summarises it: participants with message counts, period, attachments by kind, files the chat mentions but the export lacks, and notes about the file. |
| Messages in order, filtered by date range ( |
| Messages containing a word or phrase, ignoring case and accents, optionally from one sender. |
| Photos, voice messages, videos, documents, stickers and contact cards, with sender, time and whether the export contains them. Filter by |
| Messages, voice messages and other attachments per person, messages per month, busiest days. |
| Copies one file (a photo, an |
Every tool takes path, the export file. A file is parsed once and kept in memory until it changes on disk, so follow-up questions are fast.
Messages come back one per line:
#1204 2024-04-02 18:31 Ana Souza: What if we move on Saturday the 20th? The van is free that day
#1205 2024-04-02 18:32 Ana Souza: [voice message: PTT-20240402-WA0057.opus]
#1206 2024-04-02 18:38 Bruno Lima: [image: IMG-20240402-WA0058.jpg] the van's booking page
#1207 2024-04-02 18:40 Bruno Lima: Saturday works, booking itThings to ask
"Summarise this chat month by month, citing message numbers."
"Find every message where we talked about the rent, and list the dates."
"What did Ana promise, and did she follow up later in the chat?"
"How many voice messages did each of us send? Which ones are missing from the export?"
"Save all the photos from March into ~/Desktop/march." (The assistant lists them, then calls
save_attachmentfor each.)
Getting the export
iPhone: open the chat → tap the name at the top → Export Chat → With all media (or Without media). Android: open the chat → ⋮ → More → Export chat → Include media.
Guides with screenshots: iPhone · Android.
Privacy
The server reads the file from your disk and makes no network requests. But what the tools return goes to the AI assistant you are using, and from there to its model provider, under that assistant's own terms. Ask about a conversation only if you are comfortable with that provider reading the parts the assistant pulls in. The assistant reads only what the tools return, so a narrow question (one month, one search) sends less than "summarise everything".
FAQ
Can the assistant hear the voice messages?
No. It sees that a voice message was sent, by whom and when. To have them transcribed, save the .opus files with save_attachment and use a speech-to-text tool, or turn the export into a PDF with every voice message written out at Zap2Doc.
Does it work with group chats? Yes. Notices such as "Ana added Bruno" are marked as notices, not as messages from a person.
The dates look wrong.
WhatsApp writes dates in the phone's regional format without saying which one. If open_export reports that the date order is a guess, pass date_order: "dmy" or "mdy".
How big an export can it handle? The archive is read entry by entry, and only the chat text is held in memory. Years of messages are fine. Each entry is capped at 512 MiB.
Development
npm install
npm test # end-to-end through an in-memory MCP client, synthetic chats only
npm run buildLicense
MIT © Sam Rodrigues
Available Tools
6 toolschat_statsChat statisticsBRead-only
Messages, voice messages and other attachments per person, messages per month, and the busiest days.
Inputs: path (required), date_order.
get_messagesRead messagesARead-only
Return messages in order, optionally between two dates and from one sender. Each line starts with #index so answers can cite the exact message. Page with offset and limit.
Inputs: path (required), limit, offset, sender, +3 more.
list_attachmentsList attachmentsARead-only
List the photos, voice messages, videos, documents and other files the chat refers to, with who sent them, when, and whether the export contains them.
Inputs: path (required), kind, limit, date_order.
open_exportOpen a WhatsApp exportARead-only
Read a WhatsApp chat export and summarise it: participants and their message counts, period, attachments and anything unusual about the file. Call this first.
Inputs: path (required), date_order.
save_attachmentSave an attachmentA
Copy one file out of the export (a photo, a voice message .opus, a document) into a folder, by the name the chat uses for it. Returns the saved path.
Inputs: name (required), path (required), output_dir (required).
search_messagesSearch messagesARead-only
Find messages containing a word or phrase (case and accents ignored), optionally from one sender.
Inputs: path (required), query (required), limit, sender, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct role: open_export bootstraps, get_messages reads sequentially, search_messages finds by text, chat_stats aggregates, and the two attachment tools list vs. save. Mild overlap exists between open_export's summary (participants, counts, period) and chat_stats, which could make an agent hesitate on where to get aggregate numbers, but the descriptions steer reasonably well.
Five of six names follow a verb_noun snake_case pattern (open_export, get_messages, search_messages, list_attachments, save_attachment). chat_stats deviates by being noun_noun with no verb, a minor inconsistency in an otherwise predictable scheme.
Six tools is well-scoped for a read-only chat-export analyzer: one entry point, one message reader, one search, one stats tool, and two attachment handlers. Nothing appears redundant or missing in terms of surface size.
The read-only lifecycle is covered: open, summarize, page through messages, search, list and extract attachments. Minor gaps remain, such as retrieving a single message by index directly or filtering attachments by type/sender, but agents can work around these with offset paging and client-side filtering.
Maintenance
Related MCP Connectors
Your WhatsApp history in Claude and ChatGPT: search years of chats, voice notes transcribed.
Your own WhatsApp in Claude, ChatGPT and other AI apps. Not affiliated with WhatsApp or Meta.
Your own WhatsApp in Claude and ChatGPT: read chats, draft replies, send messages you approve.
Connect your own WhatsApp number to Cursor, Claude and ChatGPT: catch up, search, send replies.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables local querying of WhatsApp message history via SQLite, with profile separation, media transcription, and operational summaries.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides Claude with read-only access to your WhatsApp chat history entirely on your local machine, enabling natural language search, summarization, and retrieval of messages without sending data to the cloud.14 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read and search your WhatsApp chat history locally with no cloud or API keys, and optionally send audited messages.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to ingest WhatsApp chat exports and shared files, search messages without diacritics, read conversations and documents or images, and draft WhatsApp replies via wa.me links while keeping data in the user's own Cloudflare account.MIT