mcpField
πŸš€
πŸš€ WhatsApp Flows API MCP Server

πŸš€ WhatsApp Flows API MCP Server

Local
github.com/Ronnie-Leon76Communication0Updated 73w ago

About πŸš€ WhatsApp Flows API MCP Server

A containerized MCP server for managing interactive WhatsApp surveys and collecting responses, with ERP integration options and background processing for large customer lists.

Key features

  1. 01Create and send WhatsApp surveys
  2. 02Integrate with ERP systems
  3. 03Process jobs in the background
  4. 04Monitor jobs and queue statistics
  5. 05Manage Redis through a web UI

Use cases

  1. 01Send surveys to large customer lists
  2. 02Connect surveys with ERP systems
  3. 03Track survey job progress
  4. 04Inspect Redis data and performance

MCP support

Exposes tools to send surveys as background jobs, check job status, and retrieve queue statistics for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json Β· Universal config
{
"mcpServers": {
"whatsapp-flows": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"redis:7-alpine"
]
}
}
}
Run commanddocker run -i --rm redis:7-alpine

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ociredis:7-alpine

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

πŸš€ WhatsApp Flows API MCP Server

Docker TypeScript Redis WhatsApp

A containerized Model Context Protocol (MCP) server for creating and managing WhatsApp surveys with ERP system integration


✨ Features

  • 🐳 Dockerized Architecture - Complete containerized setup with Redis and background processing
  • πŸ”§ Modular ERP Integration - Support for Business Central, SAP, Oracle, and custom ERP systems
  • ⚑ Background Processing - Async job processing for handling large customer lists
  • πŸ“± WhatsApp Flow Management - Create and send interactive surveys via WhatsApp Business API
  • πŸ“Š Monitoring Tools - Built-in dashboards for job monitoring and Redis management
  • πŸ”„ Development Support - Hot reload and development containers for rapid iteration

πŸš€ Quick Start

Prerequisites

Before you begin, ensure you have:

  • βœ… Docker and Docker Compose installed
  • βœ… WhatsApp Business API credentials
  • βœ… Environment variables configured
1️⃣ Clone and Configure
git clone https://github.com/Ronnie-Leon76/whatsapp-flows-mcp-server.git
cd whatsapp-flows-mcp-server

# Copy and configure environment variables
cp .env.example .env
# Edit .env with your WhatsApp Business API credentials
2️⃣ Start Services
🏭 Production Mode
make start
# or
./scripts/start.sh
πŸ› οΈ Development Mode (with hot reload)
make start-dev
# or
./scripts/start-dev.sh
3️⃣ Access Services
ServiceURLDescription
MCP ServerRunning in containerMain MCP server (stdio transport)
Job Dashboardhttp://localhost:3001Monitor background jobs
Redis Commanderhttp://localhost:8081Redis management interface
Redislocalhost:6379Redis instance

πŸ—οΈ Architecture

Docker Services Overview
graph TB
    A[MCP Server] --> D[Redis Job Queue]
    B[Job Worker 1] --> D
    C[Job Worker 2] --> D
    D --> E[Job Dashboard]
    D --> F[Redis Commander]
    
    style A fill:#e1f5fe
    style B fill:#f3e5f5
    style C fill:#f3e5f5
    style D fill:#ffebee
    style E fill:#e8f5e8
    style F fill:#fff3e0
Core Services
ServicePurposeReplicas
mcp-serverMain MCP server1
redisJob queue and caching1
job-workerBackground job processing2
job-dashboardJob monitoring web UI1
redis-commanderRedis management UI1

πŸ› οΈ Commands Reference

Make Commands
CommandDescription
make helpπŸ“‹ Show all available commands
make buildπŸ”¨ Build Docker images
make start▢️ Start production services
make start-devπŸ› οΈ Start development services
make stop⏹️ Stop all services
make logsπŸ“œ View logs from all services
make logs-mcpπŸ“œ View MCP server logs
make logs-celeryπŸ“œ View worker logs
make clean🧹 Clean up Docker resources
make restartπŸ”„ Restart all services
make shell-mcp🐚 Open shell in MCP container
make shell-celery🐚 Open shell in worker container
make redis-cliπŸ’Ύ Open Redis CLI
NPM Scripts
npm run docker:build      # Build Docker images
npm run docker:start      # Start production services
npm run docker:start-dev  # Start development services
npm run docker:stop       # Stop all services
npm run docker:logs       # View logs

βš™οΈ Configuration

πŸ”‘ Required Environment Variables
# WhatsApp Business API Configuration
WHATSAPP_ACCESS_TOKEN=your_access_token_here
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id_here
WHATSAPP_BUSINESS_ACCOUNT_ID=your_business_account_id_here
WHATSAPP_VERIFY_TOKEN=your_verify_token_here
πŸ”§ Optional Environment Variables
# Redis Configuration (auto-configured in Docker)
REDIS_URL=redis://redis:6379/0

# Worker Configuration
WORKER_CONCURRENCY=5

# Dashboard Configuration
PORT=3001

# Paths (auto-configured in Docker)
CONFIG_PATH=/app/config
SURVEYS_PATH=/app/surveys

πŸ› οΈ Development

Hot Reload Development
# Start development environment with hot reload
make start-dev

# View development logs
docker-compose -f docker-compose.dev.yml logs -f
Local Development (without Docker)
# Start Redis locally
docker run -d -p 6379:6379 redis:7-alpine

# Install dependencies
npm install

# Start MCP server
npm run dev

# Start worker (in separate terminal)
cd celery_app
celery -A tasks worker --loglevel=info

πŸ“Š Monitoring & Debugging

πŸ“ˆ Job Dashboard

Access at http://localhost:3001 to:

  • βœ… Monitor active/completed jobs
  • πŸ“‹ View job details and progress
  • πŸ‘₯ Monitor worker status
  • ⚑ Real-time job execution tracking
πŸ’Ύ Redis Commander

Access at http://localhost:8081 to:

  • πŸ” Browse Redis keys
  • πŸ“Š Monitor Redis performance
  • πŸ‘οΈ View stored data
  • πŸ”§ Debug Redis issues
πŸ”§ New MCP Tools
  • send-survey - Background job processing for large customer lists
  • get-job-status - Monitor background job progress
  • get-queue-stats - View job queue statistics
πŸ“œ Viewing Logs
# All services
make logs

# Specific service
docker-compose logs -f mcp-server
docker-compose logs -f job-worker
docker-compose logs -f redis

# Follow logs in real-time
docker-compose logs -f --tail=100

πŸš€ Production Deployment

Docker Compose Production
# Start production services
make start

# Scale workers
docker-compose up -d --scale job-worker=4

# Update services
docker-compose pull
docker-compose up -d
πŸ₯ Health Checks

All services include comprehensive health checks:

ServiceHealth Check
Redisredis-cli ping
MCP ServerNode.js health endpoint
Job WorkerWorker status ping
πŸ’Ύ Persistent Data

Data persistence through Docker volumes:

VolumePurpose
redis_dataRedis database
mcp_configERP configurations
mcp_surveysSurvey definitions
mcp_logsApplication logs
worker_logsWorker logs

πŸ”§ Troubleshooting

Common Issues
🚫 Services won't start
# Check Docker status
docker-compose ps

# View service logs
make logs

# Check system resources
docker stats
πŸ”΄ Redis connection issues
# Test Redis connection
make redis-cli
ping

# Check Redis logs
docker-compose logs redis
⚠️ Jobs not processing
# Check worker status
make logs-celery

# Access job dashboard
open http://localhost:3001

# Check Redis queue
make redis-cli
LLEN job_queue
πŸ”‘ Environment variables not loaded
# Verify .env file exists and is configured
cat .env

# Restart services
make restart

# Check environment in container
docker-compose exec mcp-server env | grep WHATSAPP
πŸ” Debugging
# Access container shells
make shell-mcp      # MCP server container
make shell-celery   # Worker container

# View container resources
docker stats

# Inspect container configuration
docker-compose config

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ Star this repository if you find it helpful!

Report Bug Β· Request Feature Β· Contribute

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.