Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

WhatsApp Web MCP Server

Latest version: v1.5.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
MCP server Transport: stdio Publisher: mario-andreschak
31 Stars
13 Forks
3 Versions
TypeScript Repo language

Scan summary

WhatsApp Web MCP Server was last scanned on 30 Nov 2026 at version 1.5.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 30 Nov 2026.
  • Findings: No rules fired in version 1.5.0.
  • MCP server: Runs over stdio.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.5.0 LATEST 30 Nov 2026 No rules fired
1.2.0 5 Sep 2026 No rules fired
1.1.0 5 Jul 2026 Not shown

No rules fired in 1.5.0

Findings

Findings for v1.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.5.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Very Important

Automation of Whatsapp Messages without Meta (Business-)API is against WhatsApp' Terms of Service! You take full responsibility for everything you do with this MCP-Server. It is possible that your account will be flagged/restricted.

MCP WhatsApp Web (TypeScript)

A Model Context Protocol (MCP) server for WhatsApp Web, implemented in TypeScript. This project is a TypeScript port of the original whatsapp-mcp repository.

With this MCP server, you can:

  • Search and read your personal WhatsApp messages (including media)
  • Search your contacts
  • Send messages to individuals or groups
  • Send and receive media files (images, videos, documents, audio)

image image

Features

  • TypeScript Implementation: Fully typed codebase for better developer experience and code reliability
  • Selectable WhatsApp Backend: Uses whatsapp-web.js by default, with an optional Baileys backend that runs without a browser
  • MCP Server: Implements the Model Context Protocol for seamless integration with AI assistants
  • Media Support: Send and receive images, videos, documents, and audio messages
  • Webhooks (Baileys): signed notifications for new messages and for incoming calls, including who is calling
  • Chat limit: WHATSAPP_ALLOWED_CHATS keeps the agent to chosen numbers or groups; every other chat is refused (see Limiting the server to chosen chats)
  • Multiple Transport Options: Supports stdio and Streamable HTTP transports — even both at once from a single process (start with stdio and set MCP_HTTP_PORT to additionally expose http://127.0.0.1:<port>/mcp, or run HTTP-only with --http)
  • Flexible Authentication: QR code (as an MCP image tool), pairing code (request_pairing_code tool, or automatically printed to stderr at startup via WHATSAPP_PAIRING_PHONE_NUMBER), and an optional OAuth flow for HTTP clients (MCP_OAUTH=true) where the browser authorization page shows the WhatsApp QR code — unlinking WhatsApp revokes tokens so clients automatically re-authenticate

Architecture

This MCP server consists of:

  1. TypeScript MCP Server: Implements the Model Context Protocol to provide standardized tools for AI assistants to interact with WhatsApp
  2. WhatsApp Backend: A shared service interface selects web.js/Puppeteer or Baileys/WebSocket, handles authentication, and manages message sending/receiving
  3. Tool Implementations: Provides various tools for contacts, chats, messages, media, and authentication

Prerequisites

  • Node.js >= 22.0.0 (Node 22 or 24 recommended for the Baileys SQLite dependency)
  • npm or yarn
  • For the default webjs backend: Google Chrome or Microsoft Edge (auto-detected; needed for video/GIF codec support; other operations can use Puppeteer's bundled Chromium)
  • For baileys: install optional dependencies, including the native better-sqlite3 module. No Chrome, Edge, or Chromium is needed at runtime.

FFmpeg is bundled automatically via the ffmpeg-static npm package — no manual installation needed. You can point the FFMPEG_PATH environment variable at your own binary to override it.

Installation

npx
npx mcp-whatsapp-web
Manual Installation
  1. Clone this repository

    git clone https://github.com/mario-andreschak/mcp-whatsapp-web.git
    cd mcp-whatsapp-web
  2. Install dependencies

    npm install
  3. Build the project

    npm run build
  4. Configure environment variables (optional)

    Copy the example environment file and modify as needed:

    cp .env.example .env

    You can select the backend with WHATSAPP_BACKEND, adjust logging levels, pin the WhatsApp Web version, or override the auto-detected browser (BROWSER_EXECUTABLE_PATH) and ffmpeg binary (FFMPEG_PATH). WHATSAPP_HEADLESS=false shows the web.js browser window, and WHATSAPP_SESSION_DIR relocates its persistent profile. Without these settings the sign-in is kept in a fixed place for your user account, so it no longer matters which folder a program starts the server from (see Keeping the link).

Choosing a backend

WHATSAPP_BACKEND=webjs is the default and preserves existing sessions and MCP tool names. It uses a dedicated persistent LocalAuth profile, not your personal Chrome profile. It now keeps the browser's native user agent and graphics defaults, omits Puppeteer's automation banner flag, and leaves the browser sandbox enabled. Containers that require disabling the sandbox can explicitly set WHATSAPP_NO_SANDBOX=true. These settings do not guarantee that automation is undetectable.

To use the optional Baileys backend, set these variables in your MCP client configuration or .env, then restart the server:

WHATSAPP_BACKEND=baileys
# Optional: where the sign-in lives. Leave it out to use the standard place.
#BAILEYS_SESSION_DIR=C:/path/to/your/baileys-sessions

BAILEYS_SESSION_DIR is optional; without it the sign-in lives in the standard place described in Keeping the link. Pair this backend separately with get_qr_code or request_pairing_code. The existing WHATSAPP_PAIRING_PHONE_NUMBER option also works. Baileys cannot reuse the web.js browser profile. You can switch back to webjs and resume its existing session.

Baileys links as a Chrome device (shown as "Chrome (Windows)" or "Chrome (Mac OS)" under Linked devices). WhatsApp currently ends new links that claim to be the Desktop app with status 428 ("Connection Terminated") before a QR code appears. Desktop would request the full chat history; Chrome receives recent history, and live messages are stored from then on. BAILEYS_BROWSER=Desktop restores the old behaviour. At startup the backend also looks up the current WhatsApp Web version from web.whatsapp.com, because WhatsApp refuses clients that report an outdated one; WA_WEB_VERSION pins it, and a failed lookup falls back to the version bundled with Baileys.

Baileys and SQLite are pinned optional dependencies installed by normal npm install. If your package manager omitted them, run npm install --include=optional. SQLite uses a native addon; a supported prebuilt binary or a local native build toolchain is required. To avoid downloading Chromium when installing for Baileys or an existing system browser, use:

$env:PUPPETEER_SKIP_DOWNLOAD = 'true'
npm install --include=optional
npm run build

On macOS/Linux, the equivalent installation command is PUPPETEER_SKIP_DOWNLOAD=true npm install --include=optional. Selecting Baileys loads only its driver and never starts or cleans up browser processes. An unavailable backend produces an error; it never silently switches drivers or retries a send through another backend.

Baileys sessions and history
  • Credentials, Signal keys, contacts, chats and messages persist in session.sqlite inside the sign-in folder. Keep the whole folder private and out of version control. Only one running server may own a sign-in folder. Use separate folders for independent accounts.
  • Normal shutdown and lost connections keep the sign-in. Only a clear "this device was removed" from WhatsApp, or the logout tool, ends it; both revoke the OAuth access tokens. Baileys HTTP OAuth state is stored separately from web.js in oauth-store.json inside the sign-in folder.
  • get_backend_status reports the active backend, authentication, stored record counts and history synchronization state. Being connected does not mean history has finished arriving. An available history state means local data is available, not that WhatsApp supplied a complete archive.
  • Contact and history tools query the local synchronized store. Initial full-history sync is requested and can take time on large accounts. list_messages may request up to 100 additional older messages when a known chat has fewer than requested, with a bounded wait and a per-chat cooldown. Late history batches are persisted for subsequent queries. WhatsApp may still supply only part of an account's history.
  • Treat returned message IDs as opaque and use IDs from the active backend. Legacy @c.us phone-number inputs, @s.whatsapp.net, groups and @lid identifiers are supported; known LID/phone mappings are persisted. Message IDs from web.js cannot be passed to Baileys or vice versa.
  • Text, media, downloads, voice notes and the existing authentication tools use the same MCP interface. Voice-note inputs must be local files or base64; FFmpeg converts them to mono Opus/Ogg before sending. If conversion fails, the tool reports an error without sending a different message type.

The Baileys backend is opt-in and pinned to 7.0.0-rc14. Review upstream changes before upgrading, especially authentication and message-format migrations. See the Baileys documentation and release history.

Keeping the link

You should only need to scan the QR code once. After that the server stays linked, even when it is restarted, started by a different program, or loses its internet connection for a while.

Where the sign-in lives. By default the sign-in is kept in one fixed place for your user account, whatever folder a program starts the server from:

System Baileys web.js
Windows %LOCALAPPDATA%\mcp-whatsapp-web\baileys-sessions %LOCALAPPDATA%\mcp-whatsapp-web\whatsapp-sessions
macOS ~/Library/Application Support/mcp-whatsapp-web/baileys-sessions ~/Library/Application Support/mcp-whatsapp-web/whatsapp-sessions
Linux ~/.local/share/mcp-whatsapp-web/baileys-sessions (or under $XDG_DATA_HOME) ~/.local/share/mcp-whatsapp-web/whatsapp-sessions
  • If you set BAILEYS_SESSION_DIR (or WHATSAPP_SESSION_DIR for web.js), that folder is always used.
  • Older versions kept the sign-in in a baileys-sessions (or whatsapp-sessions) folder inside the folder the server was started from. If such a sign-in exists and no folder is set, the server keeps using it and says so in its log.
  • At start the log says which folder is used and whether it holds a sign-in. get_backend_status shows it too, as connection.signInFolder.

Moving the sign-in. Stop every program that runs the server, move the whole folder (all files in it) to the new place, then either put it in the standard place above or point BAILEYS_SESSION_DIR at it, and start the server again.

Using it from more than one program. Two programs cannot share one sign-in at the same time. The second one waits and takes over by itself when the first one closes. If both should run at the same time, give the second program its own folder (BAILEYS_SESSION_DIR) and link it as its own device by scanning a new QR code. WhatsApp allows several linked devices per phone. Never copy a sign-in folder to a second program: the two copies would keep pushing each other off.

When the connection drops. The server reconnects by itself: quickly at first, then every five minutes for as long as it runs, so it recovers on its own when the network comes back. Asking for WhatsApp (for example check_auth_status or any tool) makes it try again at once. get_backend_status tells you in plain words what is going on: connection.state is linked, reconnecting, waiting_for_link, waiting_for_other_program or stopped, with since, lastReason and the next attempt.

What really ends a link. Only these need a new QR code:

  • The device was removed under Settings > Linked devices on the phone, or with the logout tool.
  • The phone was offline for a long time (WhatsApp ends linked devices after about 14 days without the phone).
  • WhatsApp itself ends the link, for example for an account problem.

Short network problems, restarts, stray errors from WhatsApp and a full disk do not end the link; the server keeps the sign-in and tries again.

Backups of discarded sign-ins. When WhatsApp clearly says the device was removed, the old sign-in is not deleted. It is set aside as a dated copy in the backups folder inside the sign-in folder (the newest three are kept), and the log says why. If that was a mistake, stop the server, move the current session.sqlite (and its -wal and -shm files) out of the way and copy the backup back as session.sqlite. The logout tool is different: it is your explicit choice and erases the sign-in without a backup.

Limiting the server to chosen chats

A linked device sees the whole WhatsApp account. If the agent should only ever deal with certain chats (one customer, a support number, a family group), list them in WHATSAPP_ALLOWED_CHATS:

# Phone numbers with country code and/or chat IDs, separated by commas
WHATSAPP_ALLOWED_CHATS=+49 151 12345678, 120363000000000000@g.us

With this set, the agent works as if the other chats did not exist:

  • Sending text, media, voice notes or reactions anywhere else is refused before anything is sent.
  • list_chats and search_contacts show only the listed chats.
  • Reading messages, chat or contact details, media or voice-note transcripts from any other chat is refused.
  • Webhooks (messages and calls) report only the listed chats, whatever a subscription asks for. A subscription that names another chat is refused, and events that were waiting from before the limit are not sent.
  • get_backend_status shows the list as allowedChats, and the server tells the connecting AI client about the limit.

In a listed group the agent reads and answers everyone in that group, but it cannot write to a member privately unless that number is listed too.

Write numbers as +49 151 12345678, 0049 151 12345678 or 4915112345678; a number without country code (0151 ...) is refused. WhatsApp sometimes shows a person only by a private id ending in @lid. The server matches it to the listed number as soon as it knows the pair; until then that chat is refused, never let through. You can also list the @lid id itself.

A mistake in the list (a typo, a number without country code, or the setting present but empty) stops the server at start, so a slip never opens the whole account. Leave the setting out to allow every chat, as before.

This limits what the agent can do through this server. The linked device itself still receives the whole account, like any linked WhatsApp device, and the Baileys backend keeps the synchronized history in its sign-in folder, so keep that folder private. For a complete separation, link a WhatsApp number that is used only for this.

Voice notes

Voice notes arrive as audio, so on their own they show up as "type": "ptt" with an empty body. Transcription is off by default; to turn it on, point WHATSAPP_TRANSCRIBE_COMMAND at a speech-to-text command. The server converts each voice note to a 16 kHz mono WAV file, runs the command once per batch with the file paths appended, and reads one JSON line per file:

{"file": "C:\\Temp\\wa-voice-x\\0.wav", "text": "Hallo zusammen, kurz zum Termin morgen ..."}

A command given a single file may also print plain text. Any engine works this way (faster-whisper, whisper.cpp, a script calling a hosted API). The command decides where the audio goes: a local engine keeps voice notes on the machine.

examples/transcribe-faster-whisper.py is a ready-made local command (pip install faster-whisper). It reads WHISPER_MODEL (default large-v3), WHISPER_DEVICE, WHISPER_COMPUTE_TYPE, WHISPER_LANGUAGE and WHISPER_PROMPT (names and terms that often come up), for example:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • MCP Registry io.github.mario-andreschak/mcp-whatsapp-web

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229