Skip to main content

WhatsApp Web MCP Server

io.github.mario-andreschak/mcp-whatsapp-web

v1.2.0Updated Sep 5, 2026stdio · npm

WhatsApp MCP via web.js or browserless Baileys: messages, media, chats, groups and contacts

Install

Nothing to fill in: copy and run.

Run in your terminal

claude mcp add mcp-whatsapp-web -e WHATSAPP_BACKEND=webjs -e LOG_LEVEL=info -e LOG_STDERR_LEVEL=warn -e WHATSAPP_NO_SANDBOX=false -e HEALTH_CHECK_INTERVAL_MS=60000 -e TOOL_READY_TIMEOUT_MS=45000 -e MCP_HTTP_HOST=127.0.0.1 -- npx -y [email protected]

Configuration

16 settings.

  • WHATSAPP_BACKEND
    Env var· optional
    WhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairingDefault: webjs
  • BAILEYS_SESSION_DIR
    Env var· optional
    Baileys credentials and synchronized history directory (default: <working directory>/baileys-sessions). Use a private absolute path, owned by one server process.
  • LOG_LEVEL
    Env var· optional
    Log level for the log file (logs/mcp-whatsapp.log)Default: info
  • LOG_STDERR_LEVEL
    Env var· optional
    Log level for stderr (visible in most MCP client logs)Default: warn
  • WHATSAPP_HEADLESS
    Env var· optional
    webjs only: set to false to show the browser window instead of running headless
  • WHATSAPP_NO_SANDBOX
    Env var· optional
    webjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.Default: false
Show 10 more
  • BROWSER_EXECUTABLE_PATH
    Env var· optional
    webjs only: browser executable. Chrome and Edge are auto-detected; set this to use a specific browser. Chrome/Edge is required for sending videos and GIFs.
  • WHATSAPP_SESSION_DIR
    Env var· optional
    webjs only: persistent browser profile directory (default: <working directory>/whatsapp-sessions)
  • WHATSAPP_PAIRING_PHONE_NUMBER
    Env var· optional
    Phone number pairing: when set (international, symbol-free format, e.g. 4915112345678), an 8-character pairing code is logged to stderr on startup instead of relying on the QR code
  • FFMPEG_PATH
    Env var· optional
    Path to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)
  • WA_WEB_VERSION
    Env var· optional
    webjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.
  • HEALTH_CHECK_INTERVAL_MS
    Env var· optional
    webjs only: connection health check interval in milliseconds (<=0 disables)Default: 60000
  • TOOL_READY_TIMEOUT_MS
    Env var· optional
    How long tool calls wait for the WhatsApp client to become ready before erroringDefault: 45000
  • MCP_HTTP_PORT
    Env var· optional
    When set, additionally exposes the MCP endpoint at http://127.0.0.1:<port>/mcp (Streamable HTTP) from the same process
  • MCP_HTTP_HOST
    Env var· optional
    Bind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)Default: 127.0.0.1
  • MCP_OAUTH
    Env var· optional
    Enable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form

Listed in the official MCP Registry since Sep 5, 2026. Mirrored daily; last checked Nov 26, 2026.