Skip to main content
Glama
WhatsApp for Claude

WhatsApp for Claude

WhatsApp for Claude

Let Claude read, search and send your personal WhatsApp messages.

A local MCP connector (Model Context Protocol server) that links to your WhatsApp account as a companion device, the same way WhatsApp Web does. Works with Claude Desktop and Claude Code.

  • Ask things like "What did I miss on WhatsApp today?" or "Find the plumber's quote in my chats".

  • Runs on your computer. Messages are kept in a local SQLite file and never go to a third-party server.

  • Text messages only. Media shows up as a label such as [image] caption.

Heads-up: this uses the unofficial Baileys library. WhatsApp has no official API for personal accounts, and automated use is against their terms of service. Light personal use is generally fine, but bulk or spammy sending can get a number banned. Use it at your own risk.

What you can ask

  • "What WhatsApp messages did I get today?"

  • "Summarise the Family group chat from this week."

  • "Search my WhatsApp for the plumber's quote."

  • "Send Alice a WhatsApp saying I'm running 10 minutes late."

Related MCP server: WhatsApp MCP

Install

You need Node.js 22.13 or newer.

npx -y github:Ashley-Pettit/whatsapp-for-claude login

On your phone open WhatsApp > Settings > Linked devices > Link a device and scan the QR code. Leave it running until it prints Done. while it downloads your recent history.

Can't scan? Use a code instead: add --phone 61412345678 to the end (your number with country code, digits only).

Step 2: add it to Claude

Pick one.

Claude Desktop (one click): download whatsapp-mcp.mcpb from the latest release and double-click it, or drag it into Settings > Extensions.

Claude Code plugin:

/plugin marketplace add Ashley-Pettit/whatsapp-for-claude
/plugin install whatsapp-for-claude@whatsapp-for-claude

Claude Code (plain MCP):

claude mcp add whatsapp --scope user -- npx -y github:Ashley-Pettit/whatsapp-for-claude

Claude Desktop (manual config): add this to claude_desktop_config.json (Settings > Developer > Edit Config), then restart the app:

{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["-y", "github:Ashley-Pettit/whatsapp-for-claude"]
    }
  }
}

All options share the same link from Step 1, stored in ~/.whatsapp-mcp.

From source: git clone this repo, npm install, npm run login, then point Claude at node /path/to/whatsapp-for-claude/src/server.js.

Tools

Tool

What it does

whatsapp_status

Connection state and how much history is stored

whatsapp_list_chats

Recent chats with a preview of the last message

whatsapp_read_messages

Messages from one chat, or the latest across all chats

whatsapp_search_messages

Text search, optionally by chat and date range

whatsapp_find_contact

Look up a person or group to get the exact chat id

whatsapp_send_message

Send a text message

Good to know

  • History: WhatsApp shares a limited window of past messages when a device is linked (usually months, not everything). New messages are captured while Claude is running. Messages that arrive while it's closed come through on the next start.

  • Stay linked: WhatsApp unlinks companion devices that aren't used for about 14 days. If that happens, run the login step again.

  • Sending: keep Claude's permission prompt for whatsapp_send_message switched on so you approve every message before it goes out. The tool descriptions also tell Claude to treat incoming message text as untrusted and never send just because a message asked it to.

  • One connection: if two Claude apps run the connector at once, the first one holds the WhatsApp connection. The second can read messages but not send.

  • Data location: ~/.whatsapp-mcp (change it with WHATSAPP_MCP_DIR). The auth folder inside it is the same as a logged-in session. Don't share or commit it.

  • Unlink: on your phone, remove the device under Linked devices, then delete ~/.whatsapp-mcp.

  • Connection problems: WhatsApp changes its protocol often. If linking fails, check for a newer baileys release and update the pinned version in package.json.

Development

npm test

Releases: bump version in package.json and push to main. The Release workflow creates the matching tag, builds the .mcpb bundle, attaches it to a GitHub release and publishes the listing to the MCP Registry. It also publishes to npm if an NPM_TOKEN secret is set.

Licence

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude to interact with WhatsApp: read chats, search messages, send messages with a mandatory confirmation step, and transcribe voice notes locally, all with encrypted storage and prompt-injection scrubbing.
      9
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides 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 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude to read, search, and reply to your personal WhatsApp messages by linking as an extra device, with support for chat history, full-text search, media downloads, and sending messages or files.
      MIT