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_BACKENDEnv var· optionalWhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairingDefault:webjsBAILEYS_SESSION_DIREnv var· optionalBaileys credentials and synchronized history directory (default: <working directory>/baileys-sessions). Use a private absolute path, owned by one server process.LOG_LEVELEnv var· optionalLog level for the log file (logs/mcp-whatsapp.log)Default:infoLOG_STDERR_LEVELEnv var· optionalLog level for stderr (visible in most MCP client logs)Default:warnWHATSAPP_HEADLESSEnv var· optionalwebjs only: set to false to show the browser window instead of running headlessWHATSAPP_NO_SANDBOXEnv var· optionalwebjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.Default:false
Show 10 moreShow fewer
BROWSER_EXECUTABLE_PATHEnv var· optionalwebjs 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_DIREnv var· optionalwebjs only: persistent browser profile directory (default: <working directory>/whatsapp-sessions)WHATSAPP_PAIRING_PHONE_NUMBEREnv var· optionalPhone 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 codeFFMPEG_PATHEnv var· optionalPath to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)WA_WEB_VERSIONEnv var· optionalwebjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.HEALTH_CHECK_INTERVAL_MSEnv var· optionalwebjs only: connection health check interval in milliseconds (<=0 disables)Default:60000TOOL_READY_TIMEOUT_MSEnv var· optionalHow long tool calls wait for the WhatsApp client to become ready before erroringDefault:45000MCP_HTTP_PORTEnv var· optionalWhen set, additionally exposes the MCP endpoint at http://127.0.0.1:<port>/mcp (Streamable HTTP) from the same processMCP_HTTP_HOSTEnv var· optionalBind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)Default:127.0.0.1MCP_OAUTHEnv var· optionalEnable OAuth for the HTTP endpoint: /mcp requires a bearer token and clients authenticate via a browser page showing the WhatsApp QR code / pairing form
Links
Listed in the official MCP Registry since Sep 5, 2026. Mirrored daily; last checked Nov 26, 2026.