WhatsApp MCP Server - Human-in-the-loop for AI agents via WhatsApp
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
This is an MCP (Model Context Protocol) server that enables AI agents (like Claude or Cursor) to interact directly with you via WhatsApp. It bridges the gap between your autonomous AI and your phone, allowing for runtime confirmations, permission requests, or simple status updates while you are away from your computer.
AI: Deploy to production?
WhatsApp: [YES] [NO]
You: YES
Agent continues.
Since this package is published to NPM, you can run it directly via npx in your MCP configuration.
Add this to your MCP configuration file:
Note about Allowed Numbers:
WHATSAPP_TARGET_NUMBERis the default recipient for all messages. However, if your target is a Whatsapp Group, any member of the group would be able to answer the AI by default. To restrict replies only to specific numbers (to prevent unauthorized people from answering), you can optionally add a comma-separated list of numbers as an environment variable:"WHATSAPP_ALLOWED_NUMBERS": "123@s.whatsapp.net,456@s.whatsapp.net". If set, the AI will ONLY honor responses from these specific matching users.
Troubleshooting
npx: executable file not found in $PATHorenv: node: No such file or directory: If your IDE/Agent complains it cannot findnpxornode, it's because GUI apps (like Cursor) don't inherit your terminal's$PATH. To fix this, explicitly pass yourPATHin the MCPenvconfig.
The very first time you use the MCP server, it needs to authenticate with WhatsApp Web:
connect tool via your Agent, or just use any WhatsApp tool normally. If the session is not authenticated yet, the server will trigger authentication automatically.~/.whatsapp-mcp/qr.html.~/.whatsapp-mcp/baileys_auth_info), so you don't need to scan it again across restarts.To make your AI agent run fully autonomously and only ask for permissions/guidance via WhatsApp (allowing you to step away from your computer):
Always Allow (or enable "yolo" mode in settings). This gives the agent the mechanical freedom to operate without pausing indefinitely for a UI click..cursorrules (or system prompt) file: You must explicitly instruct the AI to use WhatsApp whenever it reaches a logical decision point. Create a .cursorrules file in your project root with this exact prompt:With these two steps, the AI will proactively proactively use the ask_question tool to beam its logical permission requests directly to your phone instead of freezing in the IDE.
connect: Connects to the WhatsApp network. If not logged in, returns a native QR image in the tool result and may also provide a local HTML fallback.disconnect: Completely logs out of WhatsApp and invalidates the session credentials.send_message: Sends a one-way notification. Supports optional WhatsApp markdown mapping (*bold*). If the server is not connected yet, it auto-triggers authentication first.ask_question: Sends a prompt and blocks execution until a reply is received (with a timeout). Concurrent questions are smartly queued and tagged with references. If the server is not connected yet, it auto-triggers authentication first.get_incoming_messages: Polls unsolicited inbound WhatsApp messages so agents that do not support server-side sampling can still retrieve them.get_status: Provides agent connection state monitoring, including auth state such as connected, connecting, or qr_pending.whatsapp-autopilot prompt so clients can guide agents toward connect-first and WhatsApp-first behavior.If you'd like to run it locally from source:
npm installnpm run buildnpx.This project is licensed under the ISC License.
This project utilizes the following open-source libraries:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/whatsapp-mcp)<a href="https://allmcps.com/mcp/whatsapp-mcp"><img src="https://allmcps.com/api/badge/whatsapp-mcp?style=directory" alt="Whatsapp MCP on AllMCPs" /></a>