MCP Server
MCP
WhatsApp Web MCP Server
MCP server for WhatsApp via whatsapp-web.js: send/receive messages, media, chats, groups, contacts
Install
npx -y [email protected]
Configuration Example
{
"remotes": [],
"packages": [
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "mcp-whatsapp-web",
"version": "1.1.0",
"runtimeHint": "npx",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Log level for the log file (logs/mcp-whatsapp.log)",
"format": "string",
"default": "info",
"choices": [
"trace",
"debug",
"info",
"warn",
"error",
"fatal"
],
"name": "LOG_LEVEL"
},
{
"description": "Log level for stderr (visible in most MCP client logs)",
"format": "string",
"default": "warn",
"choices": [
"trace",
"debug",
"info",
"warn",
"error",
"fatal"
],
"name": "LOG_STDERR_LEVEL"
},
{
"description": "Set to false to show the browser window instead of running headless (debugging aid)",
"format": "boolean",
"name": "WHATSAPP_HEADLESS"
},
{
"description": "Browser executable. Chrome and Edge are auto-detected in their standard install locations; set this only to use a specific browser. A real Chrome/Edge is required for sending videos and GIFs.",
"format": "filepath",
"name": "BROWSER_EXECUTABLE_PATH"
},
{
"description": "Where the WhatsApp session (browser profile) is stored (default: <working directory>/whatsapp-sessions)",
"format": "filepath",
"name": "WHATSAPP_SESSION_DIR"
},
{
"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",
"format": "string",
"name": "WHATSAPP_PAIRING_PHONE_NUMBER"
},
{
"description": "Path to an ffmpeg binary (only needed to override the ffmpeg installed automatically via the ffmpeg-static npm package)",
"format": "filepath",
"name": "FFMPEG_PATH"
},
{
"description": "Pin the WhatsApp Web version. Only set this if a WhatsApp-side update breaks the client.",
"format": "string",
"name": "WA_WEB_VERSION"
},
{
"description": "Connection health check interval in milliseconds (<=0 disables)",
"format": "number",
"default": "60000",
"name": "HEALTH_CHECK_INTERVAL_MS"
},
{
"description": "How long tool calls wait for the WhatsApp client to become ready before erroring",
"format": "number",
"default": "45000",
"name": "TOOL_READY_TIMEOUT_MS"
},
{
"description": "When set, additionally exposes the MCP endpoint at http://127.0.0.1:<port>/mcp (Streamable HTTP) from the same process",
"format": "number",
"name": "MCP_HTTP_PORT"
},
{
"description": "Bind address for the HTTP endpoint (do not expose publicly; the endpoint controls your personal WhatsApp account)",
"format": "string",
"default": "127.0.0.1",
"name": "MCP_HTTP_HOST"
},
{
"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",
"format": "boolean",
"name": "MCP_OAUTH"
}
]
}
]
}
mcp
model-context-protocol
npm
By
Comments
Sign in to leave a comment