Whatsapp MCP logo

Whatsapp MCP

by @kahflane

Connects an AI agent to WhatsApp for local-first reading, search, messaging, scheduling, groups, status, and account management.

Install Whatsapp MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "kahflane-whatsapp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@kahflane/whatsapp-mcp"
      ],
      "env": {
        "WA_PAIRING_NUMBER": "YOUR_VALUE_HERE",
        "WA_SYNC_FULL_HISTORY": "YOUR_VALUE_HERE",
        "WA_DAILY_CAP": "YOUR_VALUE_HERE",
        "WA_MIN_GAP_MS": "YOUR_VALUE_HERE",
        "WA_MAX_GAP_MS": "YOUR_VALUE_HERE",
        "WA_DATA_DIR": "YOUR_VALUE_HERE",
        "WA_LOG_LEVEL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @kahflane/whatsapp-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@kahflane/whatsapp-mcp connects an MCP-compatible AI client to a WhatsApp account through the innovatorssoft Baileys fork, exposing 87 tools for reading, searching, sending, scheduling, and managing WhatsApp activity. It runs as one Node.js or Bun process, communicates with the client over stdio, and stores authentication, messages, contacts, and media locally in SQLite. Reach for it when an agent needs to work with WhatsApp conversations, groups, media, polls, statuses, or automation without moving the local message store to a hosted service. Use a dedicated number because the project describes its automation as unofficial and warns that WhatsApp may ban accounts.

Use cases

  • Search WhatsApp history for project decisions or unread messages
  • Send scheduled text, media, poll, or event messages
  • Manage groups, members, invites, and join requests
  • Publish WhatsApp status updates to contacts or groups
  • Download and inspect media from synchronized chats

Key features

  • 87 MCP tools for WhatsApp operations
  • Local SQLite storage for messages, contacts, chats, and media
  • QR-code and pairing-code login
  • Full-text offline message search
  • Scheduled messages, templates, and keyword auto-replies
  • Send pacing, daily caps, and an outbound kill-switch

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 33d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · @kahflane/whatsapp-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars8Stargazers on the source repository.
npm downloads416Package downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Whatsapp MCP works

What @kahflane/whatsapp-mcp does

@kahflane/whatsapp-mcp exposes WhatsApp account operations as Model Context Protocol tools. It can inspect connection state, list chats and contacts, resolve names, read messages, search synchronized history, track unread conversations, and download media. Messaging tools cover text, images, video, audio, documents, stickers, locations, contacts, polls, events, reactions, edits, replies, forwards, pins, broadcasts, interactive buttons, lists, and commerce messages for Business accounts.

The tool set also covers group administration, chat organization, profile and privacy settings, status or story publishing, scheduled messages, reusable templates, and keyword-based automatic replies. Status content can include text, images, video, GIFs, and voice, with delivery to contacts or groups.

How it works

The MCP process contains both the protocol server and the WhatsApp client. A long-lived Baileys WebSocket handles the WhatsApp connection while the MCP side receives JSON-RPC requests from an AI client over stdio. Contacts, chats, messages, authentication data, and media are kept on the local machine in SQLite and related local directories.

Reading and searching can use the locally synchronized history without an active online lookup. On first login, the account can synchronize its history into the local store. Authentication persists between runs, so the QR or pairing-code login is intended as an initial setup step rather than a recurring action.

Outbound activity includes jittered send delays, a configurable daily send limit, and a kill-switch that blocks all sends. These controls are intended to reduce automated sending risk, not to guarantee account safety.

Setup and configuration

The package can be launched on demand with npx -y @kahflane/whatsapp-mcp or with bunx, requiring Node.js 18+ for npx or Bun 1.1+. It can also be run from a source checkout after installing dependencies with Bun. MCP clients need a local server entry whose command is npx and whose arguments are -y and @kahflane/whatsapp-mcp.

After restarting the client, call wa_status, request a login QR with wa_get_login_qr, and scan it from WhatsApp's Linked Devices settings. WA_PAIRING_NUMBER enables pairing-code login instead. The connection state can then be checked again with wa_status.

Configuration is supplied through environment variables. WA_SYNC_FULL_HISTORY controls full history synchronization on the first sync, WA_DAILY_CAP sets the daily send ceiling, and WA_MIN_GAP_MS plus WA_MAX_GAP_MS define the jittered delay range. WA_DATA_DIR selects the base directory for authentication, the database, and media; WA_LOG_LEVEL controls stderr logging. The default data directory is ~/.whatsapp-mcp.

Tools and capabilities

  • Check connection, login state, store statistics, and send counters.
  • Obtain a QR code or pairing code, log out, and remove local authentication.
  • List chats and contacts, resolve names, read messages, search history, and inspect unread items.
  • Fetch older history, monitor synchronization, and download decrypted media.
  • Send and modify messages, including polls, events, broadcasts, interactive content, and Business commerce messages.
  • Create and administer groups, manage invite links and join requests, and control chat settings.
  • Publish status content, manage profile and privacy settings, and configure automation.
  • Restrict outbound sending with the kill-switch.

Limitations and notes

WhatsApp automation through this project is unofficial and violates WhatsApp's Terms of Service according to its warning. Accounts can be banned, so the project recommends using a dedicated or burner number rather than a primary line. It also recommends gradually warming up new numbers and provides pacing and daily-cap controls.

Local-first storage means the synchronized history and credentials reside on the machine running the MCP process. The amount of available history depends on synchronization and any subsequent history-fetch operations. Sending can be blocked globally by the restriction control, and the daily cap or configured delays can limit automated message throughput.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Whatsapp MCP

@kahflane/whatsapp-mcp is an MCP server that connects AI agents to a WhatsApp account through the Baileys client. Its tools can read and search local history, send text and media, manage groups and chats, publish status updates, schedule messages, and control account or privacy settings.

Run it through `npx -y @kahflane/whatsapp-mcp` or `bunx` in your MCP client's local server configuration. Node.js 18+ is required for npx, while Bun 1.1+ is supported. A source installation can also be run with Bun after cloning the repository and installing dependencies.

Call `wa_get_login_qr` and scan the displayed QR code under WhatsApp's Linked Devices settings. Set `WA_PAIRING_NUMBER` if you want to use a pairing code instead. Use `wa_status` before and after login to check the connection and synchronization state.

Yes, @kahflane/whatsapp-mcp works with Cursor through a JSON MCP server entry. Add the server command using `npx`, pass `-y` and `@kahflane/whatsapp-mcp` as arguments, then place the configuration in Cursor's MCP configuration file.

It stores authentication, the SQLite database, and media locally under `~/.whatsapp-mcp` by default. Set `WA_DATA_DIR` to choose another base directory. Reading and full-text search use the locally synchronized history.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewWhatsapp MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kahflane-whatsapp-mcp?style=directory)](https://allmcps.com/mcp/kahflane-whatsapp-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/kahflane-whatsapp-mcp"><img src="https://allmcps.com/api/badge/kahflane-whatsapp-mcp?style=directory" alt="Whatsapp MCP on AllMCPs" /></a>