Labsco
khetsinghrajput logo

WhatsApp MCP Server

โ˜… 2

from khetsinghrajput

Connect your WhatsApp to Claude Desktop. Everything stays on your machine โ€” no cloud, no servers

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

WhatsApp MCP โ€” Local

Connect your WhatsApp to Claude Desktop. Everything stays on your machine โ€” no cloud, no servers, developer sees nothing.

  • ๐Ÿ“ฆ All messages stored in a local SQLite database (~/.whatsapp-mcp/whatsapp.db)
  • ๐Ÿ”’ Auth keys stored only in ~/.whatsapp-mcp/session/ โ€” never leave your machine
  • ๐Ÿ” Full-text search across complete chat history
  • ๐Ÿ“ฅ Import old chats via WhatsApp's Export Chat feature

Available Tools

ToolWhat it does
whatsapp_statusConnection status + database stats
whatsapp_list_chatsAll chats sorted by most recent
whatsapp_list_groupsGroup chats only
whatsapp_find_contactSearch contacts by name or phone number
whatsapp_get_messagesRead messages from a chat (full history)
whatsapp_send_messageSend a message
whatsapp_search_messagesFull-text search across all messages

Import Old Chats

WhatsApp only sends recent history during initial sync. To get older messages:

Step 1 โ€” Export from your phone

  1. Open the chat in WhatsApp
  2. Tap โ‹ฎ โ†’ More โ†’ Export Chat
  3. Choose Without Media
  4. Send the .txt file to your computer

Step 2 โ€” Run the importer

First find the contact's JID using whatsapp_find_contact "Their Name" in Claude, then:

npm run import -- "C:/path/to/WhatsApp Chat with John Doe.txt" "923001234567@s.whatsapp.net" "John Doe"

The importer shows:

โœ… Import complete!
   Contact  : John Doe
   Messages : 1,847 imported
   Range    : 15/03/2023 โ†’ 17/05/2026

๐Ÿ“ฆ Database now has 3,091 messages across 109 chats

Messages are de-duplicated automatically โ€” safe to run multiple times.


Your Data

~/.whatsapp-mcp/
  session/          โ† WhatsApp auth keys (never shared)
    creds.json
    pre-key-*.json
  whatsapp.db       โ† All messages, searchable forever

To unlink from WhatsApp: Phone โ†’ Settings โ†’ Linked Devices โ†’ find WhatsApp MCP โ†’ Log Out. Then delete ~/.whatsapp-mcp/session/ and restart Claude Desktop โ€” you'll get a new QR.

To fully remove: Delete ~/.whatsapp-mcp/ and remove the mcpServers block from the config.