WhatsApp Web MCP Server
WhatsApp MCP via web.js or browserless Baileys: messages, media, chats, groups and contacts
Documentation & Preview
{ "mcpServers": { "mcp-mcp-whatsapp-web": { "command": "npx", "args": [ "-y", "--package", "mcp-whatsapp-web@1.2.0", "mcp-whatsapp-web" ], "env": { "WHATSAPP_BACKEND": "${ENV_WHATSAPP_BACKEND}", "BAILEYS_SESSION_DIR": "${ENV_BAILEYS_SESSION_DIR}", "LOG_LEVEL": "${ENV_LOG_LEVEL}", "LOG_STDERR_LEVEL": "${ENV_LOG_STDERR_LEVEL}", "WHATSAPP_HEADLESS": "${ENV_WHATSAPP_HEADLESS}", "WHATSAPP_NO_SANDBOX": "${ENV_WHATSAPP_NO_SANDBOX}", "BROWSER_EXECUTABLE_PATH": "${ENV_BROWSER_EXECUTABLE_PATH}", "WHATSAPP_SESSION_DIR": "${ENV_WHATSAPP_SESSION_DIR}", "WHATSAPP_PAIRING_PHONE_NUMBER": "${ENV_WHATSAPP_PAIRING_PHONE_NUMBER}", "FFMPEG_PATH": "${ENV_FFMPEG_PATH}", "WA_WEB_VERSION": "${ENV_WA_WEB_VERSION}", "HEALTH_CHECK_INTERVAL_MS": "${ENV_HEALTH_CHECK_INTERVAL_MS}", "TOOL_READY_TIMEOUT_MS": "${ENV_TOOL_READY_TIMEOUT_MS}", "MCP_HTTP_PORT": "${ENV_MCP_HTTP_PORT}", "MCP_HTTP_HOST": "${ENV_MCP_HTTP_HOST}", "MCP_OAUTH": "${ENV_MCP_OAUTH}" } } }, "setup": { "fields": [ { "id": "ENV_WHATSAPP_BACKEND", "label": "WHATSAPP_BACKEND", "description": "WhatsApp backend: webjs uses a persistent browser profile; baileys connects without a browser and requires separate pairing", "required": false, "secret": false, "default": "webjs" }, { "id": "ENV_BAILEYS_SESSION_DIR", "label": "BAILEYS_SESSION_DIR", "description": "Baileys credentials and synchronized history directory (default: <working directory>/baileys-sessions). Use a private absolute path, owned by one server process.", "required": false, "secret": false, "default": "" }, { "id": "ENV_LOG_LEVEL", "label": "LOG_LEVEL", "description": "Log level for the log file (logs/mcp-whatsapp.log)", "required": false, "secret": false, "default": "info" }, { "id": "ENV_LOG_STDERR_LEVEL", "label": "LOG_STDERR_LEVEL", "description": "Log level for stderr (visible in most MCP client logs)", "required": false, "secret": false, "default": "warn" }, { "id": "ENV_WHATSAPP_HEADLESS", "label": "WHATSAPP_HEADLESS", "description": "webjs only: set to false to show the browser window instead of running headless", "required": false, "secret": false, "default": "" }, { "id": "ENV_WHATSAPP_NO_SANDBOX", "label": "WHATSAPP_NO_SANDBOX", "description": "webjs only: explicitly disable the browser sandbox for containers that require it. The sandbox is enabled by default.", "required": false, "secret": false, "default": "false" }, { "id": "ENV_BROWSER_EXECUTABLE_PATH", "label": "BROWSER_EXECUTABLE_PATH", "description": "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.", "required": false, "secret": false, "default": "" }, { "id": "ENV_WHATSAPP_SESSION_DIR", "label": "WHATSAPP_SESSION_DIR", "description": "webjs only: persistent browser profile directory (default: <working directory>/whatsapp-sessions)", "required": false, "secret": false, "default": "" }, { "id": "ENV_WHATSAPP_PAIRING_PHONE_NUMBER", "label": "WHATSAPP_PAIRING_PHONE_NUMBER", "description": "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", "required": false, "secret": false, "default": "" }, { "id": "ENV_FFMPEG_PATH", "label": "FFMPEG_PATH", "description": "Path to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)", "required": false, "secret": false, "default": "" }, { "id": "ENV_WA_WEB_VERSION", "label": "WA_WEB_VERSION", "description": "webjs only: pin the WhatsApp Web version if a WhatsApp-side update breaks the client.", "required": false, "secret": false, "default": "" }, { "id": "ENV_HEALTH_CHECK_INTERVAL_MS", "label": "HEALTH_CHECK_INTERVAL_MS", "description": "webjs only: connection health check interval in milliseconds (<=0 disables)", "required": false, "secret": false, "default": "60000" }, { "id": "ENV_TOOL_READY_TIMEOUT_MS", "label": "TOOL_READY_TIMEOUT_MS", "description": "How long tool calls wait for the WhatsApp client to become ready before erroring", "required": false, "secret": false, "default": "45000" }, { "id": "ENV_MCP_HTTP_PORT", "label": "MCP_HTTP_PORT", "description": "When set, additionally exposes the MCP endpoint at http://127.0.0.1:<port>/mcp (Streamable HTTP) from the same process", "required": false, "secret": false, "default": "" }, { "id": "ENV_MCP_HTTP_HOST", "label": "MCP_HTTP_HOST", "description": "Bind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)", "required": false, "secret": false, "default": "127.0.0.1" }, { "id": "ENV_MCP_OAUTH", "label": "MCP_OAUTH", "description": "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", "required": false, "secret": false, "default": "" } ], "requirements": [ "安装 Node.js / npm" ] }, "provenance": { "registryServer": "io.github.mario-andreschak/mcp-whatsapp-web", "registryVersion": "1.2.0", "registryUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.mario-andreschak%2Fmcp-whatsapp-web/versions/1.2.0", "repository": "mario-andreschak/mcp-whatsapp-web", "sourceCommit": "dcb4246bc670148154d7e26190e666740d51c19d", "namespaceRepositoryOwnerMatched": true, "package": { "registry": "npm", "identifier": "mcp-whatsapp-web", "version": "1.2.0", "integrity": "sha512-Cu0FlynrIJBHr8yxoPJuE4zsyi1ODzmpx1fh9TZUU8HI2qLKGyiTNjqR0sDe5R0m69afF4g6C6sEv+hRUhqJIg==", "packageRepositoryMatched": true, "checkedAt": "2026-10-21T01:03:13.268Z" }, "scope": "Install configuration verified; dependency implementation and remote behavior have not been audited" } }