A Model Context Protocol (MCP) server that enables LLM applications to interact with WhatsApp through the Baileys library.
- 📱 WhatsApp Integration - Send and receive WhatsApp messages through MCP
- 🔐 Session Management - QR code and pairing code authentication
- 💬 Message Tools - Send text, media, and interactive messages
- 👥 Group Management - Create groups, manage participants
- 📞 Contact Operations - Check contacts, get profile info
- 🗄️ Database Support - Optional Prisma integration for persistent sessions
- Node.js >= 20.0.0
- npm or yarn
cd mcp-server
npm installCopy the environment template:
cp .env.template .envEdit .env with your settings. See Environment Variables for details.
STDIO Mode (for MCP clients like Claude Desktop):
npm run build
npm startHTTP Mode (for web applications):
npm run build
npm run start:httpDevelopment Mode:
npm run dev # STDIO with hot reload
npm run dev:http # HTTP with hot reload| Document | Description |
|---|---|
| Getting Started | Setup guide and first steps |
| Architecture | System design and components |
| MCP Tools Reference | Complete API documentation |
| Environment Variables | Configuration options |
| Webhooks | Event notifications setup |
| Deployment | Production deployment guide |
Add to your Claude Desktop configuration:
{
"mcpServers": {
"whatsapp": {
"command": "node",
"args": ["/path/to/mcp-server/lib/index.js"]
}
}
}├── mcp-server/ # MCP Server implementation
│ ├── src/ # TypeScript source code
│ ├── prisma/ # Database schema (optional)
│ └── lib/ # Compiled JavaScript
├── docs/ # Documentation
└── starting_point/ # Original Baileys library (reference)
This project is licensed under the MIT License - see the LICENSE file for details.
Built on top of Baileys by WhiskeySockets.
Original Baileys library copyright © 2025 Rajeh Taher/WhiskeySockets.
Disclaimer: This project is not affiliated with WhatsApp. Use responsibly and in accordance with WhatsApp's Terms of Service.