WhatsApp MCP
Provides tools for interacting with WhatsApp to send text messages and media, manage contacts and groups, and retrieve chat history and recent messages.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WhatsApp MCPsend 'I'm running 10 minutes late' to Sarah"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
<<<<<<< HEAD
whatsapp_MCP
=======
WhatsApp MCP — Remote HTTP Server
A Model Context Protocol (MCP) server for WhatsApp built with whatsapp-web.js.
Supports two modes:
Mode | File | Use case |
stdio |
| Claude Desktop (local) |
Remote HTTP/SSE |
| Claude.ai "Remote MCP URL" / any HTTP client |
Quick Start
1. Install dependencies
npm install2. Build TypeScript
npm run build3. Run the remote server
npm run start:remote
# or in dev mode (no build needed):
npm run dev:remote4. Scan the QR code
Open http://localhost:3000/qr in your browser and scan with WhatsApp → Linked Devices.
Endpoints
Method | Path | Description |
GET |
| Health check + status |
GET |
| QR code page (browser) or |
GET |
| List all available MCP tools |
GET |
| WhatsApp connection status |
POST |
| Send a WhatsApp message |
GET |
| List recent chats |
GET |
| List contacts |
GET |
| Fetch messages from a chat |
POST |
| Generic tool invocation |
GET |
| MCP SSE endpoint (for Claude Remote MCP) |
POST |
| MCP POST endpoint (used with |
REST API Examples
Check status
curl http://localhost:3000/tools/statusSend a message
curl -X POST http://localhost:3000/tools/send-message \
-H "Content-Type: application/json" \
-d '{"to": "919876543210", "message": "Hello from MCP!"}'Get recent chats
curl "http://localhost:3000/tools/chats?limit=10"Get messages from a chat
curl "http://localhost:3000/tools/messages/919876543210?limit=20"Generic tool invocation
curl -X POST http://localhost:3000/tools/invoke \
-H "Content-Type: application/json" \
-d '{"tool": "whatsapp_get_groups", "args": {}}'Optional: Bearer Token Auth
Set the API_KEY environment variable to protect REST endpoints:
API_KEY=mysecretkey npm run start:remoteThen include the header in requests:
curl -H "Authorization: Bearer mysecretkey" http://localhost:3000/tools/statusTesting with ngrok (public HTTPS URL)
Install ngrok: https://ngrok.com/download
Start your server:
npm run start:remoteIn a new terminal:
ngrok http 3000Copy the
https://xxxx.ngrok-free.appURL
Paste this into Claude → Settings → Integrations → Remote MCP:
https://xxxx.ngrok-free.app/sseDeploy to Render
Push this repo to GitHub
Go to https://render.com → New → Web Service
Connect your repo
Set:
Build Command:
npm install && npm run buildStart Command:
npm run start:remoteEnvironment:
NODE_ENV=productionOptional:
API_KEY=yoursecretkey
Deploy → copy your
https://your-app.onrender.comURL
Paste into Claude Remote MCP:
https://your-app.onrender.com/sse⚠️ Important for Render: WhatsApp session data (
.wwebjs_auth) does not persist across Render deploys by default. Use a Render Disk (persistent storage) or re-scan the QR after each deploy. See Render Disks.
Project Structure
whatsapp-mcp/
├── src/
│ ├── index.ts # stdio MCP server (Claude Desktop)
│ ├── remote.ts # HTTP/SSE MCP server (Remote MCP + REST API)
│ └── send_message.ts # CLI script to send a message
├── dist/ # Compiled JS (after npm run build)
├── .wwebjs_auth/ # WhatsApp session data (gitignore this!)
├── package.json
├── tsconfig.json
└── README.mdAvailable MCP Tools
Tool | Description |
| Check connection status |
| Send a text message |
| Send image/video/doc |
| List contacts |
| List groups |
| Group details + members |
| Create a new group |
| Recent chats |
| Messages from a chat |
.gitignore recommendations
node_modules/
dist/
.wwebjs_auth/
.wwebjs_cache/
.env2848b1a (whatsapp mcp)
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PONMANIAN-SA/whatsapp_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server