mcp-whatsapp-business-api
If you are the rightful owner of mcp-whatsapp-business-api and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A production-ready Node.js Model Context Protocol (MCP) server that provides seamless integration between Claude and the WhatsApp Business Cloud API.
WhatsApp Business API MCP Integration
A production-ready Node.js Model Context Protocol (MCP) server that provides seamless integration between Claude and the WhatsApp Business Cloud API.
Features
๐ข Business Profile Management
- View and update business profile information
- Browse profile details via
whatsapp://business_profile
๐ฑ Phone Number Management
- List all registered phone numbers
- Get detailed phone number information
- Browse phone numbers via
whatsapp://phone_numbers
- Request verification codes
๐ฌ Messaging
- Send text, template, and media messages
- List and browse message templates via
whatsapp://templates
- Mark messages as read
- Support for images, audio, documents, video, and stickers
๐ Registration & Verification
- Register and deregister phone numbers
- Phone number verification
- Two-step verification management
- Check registration status
๐ Analytics & Monitoring
- Real-time WhatsApp event streaming
- Message delivery analytics
- Conversation cost tracking
- Template performance metrics
- Browse analytics via
whatsapp://analytics/*
๐๏ธ Database Integration (Optional)
- PostgreSQL support for data persistence
- Browse database tables and schemas via resources
๐ ๏ธ Developer Experience
- Dual transport modes: STDIO (for Claude Desktop) and SSE (for web clients)
- Real-time webhook processing and event broadcasting
- Comprehensive error handling with detailed WhatsApp API error information
- Pre-built prompts for common tasks
- TypeScript with strict type checking
- Docker containerization
- CI/CD pipeline with GitHub Actions
Quick Start
-
Clone and install:
git clone https://github.com/prakashwagle/mcp-whatsapp-business-api.git cd mcp-whatsapp-business-api npm install
-
Configure environment:
cp .env.example .env # Edit .env with your WhatsApp API credentials
-
Start development server:
npm run dev
-
Integrate with Claude:
npm run build npm install -g . claude --mcp="mcp-whatsapp-business-api"
๐ Complete Setup Guide
For detailed setup instructions including:
- WhatsApp Business API credential setup
- Production deployment options
- Security best practices
- MCP integration with Claude Desktop
- Troubleshooting guide
๐
Architecture
Tools vs Resources
This project follows the optimal MCP pattern:
-
๐ง Tools - For parameterized operations and real-time actions
whatsapp_send_text_message
whatsapp_get_phone_numbers
whatsapp_update_business_profile
-
๐ Resources - For browsable data discovery
whatsapp://business_profile
whatsapp://phone_numbers
whatsapp://templates
Built-in Prompts
help_with_business_profile
- Business profile management guidancehelp_with_messaging
- Text, template, and media messaging helphelp_with_registration
- Phone registration and verificationhelp_with_two_step_verification
- Security setup guidancehelp_with_whatsapp_api
- General API capabilities overview
Development
# Development server
npm run dev
# Build
npm run build
# Lint and format
npm run lint
npm run format
# Production server
npm start
Production Deployment
Multiple deployment options supported:
- AWS SSM Parameter Store (Recommended)
- Docker with environment variables
- Docker Swarm secrets
- AWS Secrets Manager
See for detailed deployment instructions.
Requirements
- Node.js 18+
- WhatsApp Business API account
- Facebook/Meta developer account
- Registered phone number for WhatsApp Business
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting:
npm test && npm run lint
- Submit a pull request
License
MIT License - see for details.
Support
- ๐
- ๐ Report Issues
- ๐ WhatsApp API Docs
- ๐ค MCP Documentation