WA MCP
Supports the Meta Cloud API as an alternative backend channel for WhatsApp, allowing AI agents to send and receive messages, manage instances, and interact with WhatsApp business features using Meta's official API.
Provides tools for messaging (text, images, video, audio, documents, polls, reactions, etc.), group management (create, manage members, settings, invite links), contacts and profile operations (block/unblock, business profile), and real-time event notifications through the WhatsApp platform using Baileys (WhatsApp Web) or Meta Cloud API.
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., "@WA MCPsend a message to Mom saying I'll be home soon"
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.
🤖 What is WA MCP?
WA MCP is a WhatsApp MCP server built with TypeScript that gives AI agents full access to WhatsApp through the Model Context Protocol. It supports both Baileys (WhatsApp Web) and Meta Cloud API as dual-channel backends, deployable with Docker in a single command.
Your agent connects once and auto-discovers 63 tools, 10 resources, and 12 real-time events — zero configuration, zero REST wrappers, zero glue code.
Your AI Agent ←→ MCP Protocol ←→ WA MCP ←→ WhatsAppInstead of writing HTTP clients, parsing webhook payloads, and mapping endpoints to tools manually — your agent just connects and goes. Works out of the box with Claude, Google ADK, LangChain, and any MCP-compatible AI agent framework.
💡 MCP (Model Context Protocol) is the open standard for connecting AI agents to tools and data. WA MCP speaks MCP natively via Streamable HTTP and stdio transports.
Related MCP server: wa-bridge
🚀 Quick Start
One command with Docker
docker compose upThat's it. WA MCP + Redis, ready on http://localhost:3000/mcp.
Or run locally
# Prerequisites: Node.js >= 22, Redis running
npm install
cp .env.example .env
# Development (stdio transport)
npm run dev
# Production (HTTP transport)
npm run build && npm startConnect your agent
from google.adk.tools.mcp_tool import McpToolset
tools = McpToolset(url="http://localhost:3000/mcp")
# Agent auto-discovers 63 WhatsApp tools
# wa_create_instance, wa_send_text, wa_send_image, ...from langchain_mcp import McpToolkit
toolkit = McpToolkit(server_url="http://localhost:3000/mcp")
tools = toolkit.get_tools()Add to your claude_desktop_config.json:
{
"mcpServers": {
"whatsapp": {
"command": "node",
"args": ["path/to/wa-mcp/dist/index.js"],
"env": {
"WA_TRANSPORT": "stdio",
"WA_REDIS_URL": "redis://localhost:6379"
}
}
}
}✨ Features
Feature | Description | |
🔌 | MCP-native | Streamable HTTP + stdio transports. No REST, no webhooks. |
📱 | Dual-channel | Baileys (WhatsApp Web) + Meta Cloud API — same interface. |
🔄 | Multi-instance | Run 1–50 WhatsApp numbers from a single server. |
📨 | Full messaging | Text, images, video, audio, documents, polls, reactions, replies, forwards, edits, deletes, view-once. |
👥 | Groups | Create, manage members, promote/demote admins, settings, invite links, join requests, ephemeral messages. |
👤 | Contacts & Profile | Number check, block/unblock, business profiles, privacy, status updates. |
📡 | Real-time events | 12 notification types via SSE: messages, typing, groups, calls, connection status. |
⚡ | Rate limiting | BullMQ queues prevent WhatsApp bans (20 msg/min Baileys, 80 msg/min Cloud). |
🔁 | Auto-reconnect | Automatic reconnection with exponential backoff. |
🗃️ | Persistent | SQLite storage for sessions, messages, contacts, groups. |
🐳 | Single container |
|
🛠️ Tools
WA MCP exposes 63 tools across 9 domains. All tools use the wa_ prefix.
Tool | Description |
| Create a new WhatsApp connection |
| Connect (generates QR code) |
| Gracefully disconnect |
| Permanently remove instance |
| Disconnect + reconnect |
| Get QR as base64 (Baileys) |
| Get pairing code (Baileys) |
| Set Cloud API token |
Tool | Description |
| Send text message |
| Send image with caption |
| Send video with caption |
| Send audio / voice note |
| Send file / document |
| Send GPS location |
| Send vCard contact |
| Create a poll |
| React with emoji |
| Send URL with preview |
| Forward a message |
| Edit sent message |
| Delete message |
| Pin a message |
| Send view-once media |
| Show typing / recording |
| Mark messages as read |
Tool | Description |
| Get chat message history |
| Archive / unarchive |
| Pin / unpin chat |
| Mute / unmute |
| Delete chat |
| Clear chat history |
Tool | Description |
| Create group |
| Add members |
| Remove members |
| Promote to admin |
| Demote from admin |
| Change group name |
| Change description |
| Change settings |
| Leave group |
| Get invite link |
| Revoke invite link |
| Join via invite code |
| Toggle disappearing messages |
| Approve / reject join request |
Tool | Description |
| Search contacts by name or phone |
| Check if number is on WhatsApp |
| Block contact |
| Unblock contact |
| Get business profile |
Tool | Description |
| Set profile picture |
| Remove profile picture |
| Change display name |
| Change status text |
| Update privacy settings |
Tool | Description |
| Post text status |
| Post image status |
| Post video status |
Tool | Description |
| Follow a newsletter |
| Unfollow a newsletter |
| Send to newsletter |
Tool | Description |
| Reject incoming call |
📖 Resources
Resources expose read-only WhatsApp state via whatsapp:// URIs:
URI | Description |
| List all instances |
| Instance details + queue stats |
| All contacts |
| Active conversations |
| All groups |
| Group metadata |
| Message history |
| Own profile |
| Privacy settings |
| Blocked contacts |
📡 Real-time Notifications
Events are pushed to agents via SSE (Server-Sent Events):
Event | Trigger |
| New incoming message |
| Status change (sent → delivered → read) |
| Message deleted |
| Emoji reaction added/removed |
| Message edited |
| Typing / recording / online |
| Chat metadata changed |
| Group info changed |
| Member add/remove/promote/demote |
| Contact info changed |
| Instance status change (includes QR as base64) |
| Incoming call |
🏗️ Architecture
┌─────────────────────────────────────────────┐
│ AI Agent Runtime │
│ (Google ADK, Claude, LangChain, ...) │
└──────────────────┬──────────────────────────┘
│ MCP Streamable HTTP
┌──────────────────▼──────────────────────────┐
│ WA MCP Server │
│ │
│ ┌────────────────────────────────────────┐ │
│ │ Layer 1 — MCP Transport (HTTP/stdio) │ │
│ ├────────────────────────────────────────┤ │
│ │ Layer 2 — MCP Core │ │
│ │ 63 Tools │ 10 Resources │ 12 Events │ │
│ ├────────────────────────────────────────┤ │
│ │ Layer 3 — Services │ │
│ │ Instance Manager │ Queue │ Dedup │ │
│ ├────────────────────────────────────────┤ │
│ │ Layer 4 — Channel Abstraction │ │
│ │ ┌──────────────┐ ┌────────────────┐ │ │
│ │ │ Baileys │ │ Cloud API │ │ │
│ │ │ (WebSocket) │ │ (HTTPS) │ │ │
│ │ └──────────────┘ └────────────────┘ │ │
│ └────────────────────────────────────────┘ │
│ SQLite (Drizzle) BullMQ (Redis) │
└─────────────────────────────────────────────┘
│
▼ WebSocket / HTTPS
WhatsApp ServersDual-Channel Design
Baileys | Cloud API | |
Protocol | WhatsApp Web (WebSocket) | Meta Official (HTTPS) |
Auth | QR Code / Pairing Code | Access Token |
Cost | Free | Per-conversation pricing |
Compliance | Unofficial | Meta-approved |
Best for | Dev, testing, low volume | Production, enterprise |
Both backends implement the same ChannelAdapter interface. Your agent doesn't know or care which one is active — the tools work identically.
⚙️ Configuration
Copy .env.example to .env and configure:
Variable | Default | Description |
|
|
|
| — | Bearer token auth. Unset = no auth (dev) |
|
| HTTP server port |
|
| Redis for BullMQ queues |
|
|
|
|
| Messages/min per Baileys instance |
|
| Messages/min per Cloud API instance |
|
| Auto-delete old messages |
|
| Auto-reconnect on disconnect |
|
| Media cache size limit |
| — | Meta webhook verification |
|
| Webhook receiver port |
|
| Daily WhatsApp Web version check |
🐳 Docker
Production
docker compose up -dServices:
wa-mcp — The MCP server on port
3000redis — BullMQ backend with AOF persistence
Health Check
curl http://localhost:3000/health{
"status": "ok",
"uptime": 3600,
"instances": { "total": 3, "connected": 2, "disconnected": 1 },
"version": "1.0.0"
}Resource Requirements
Instances | RAM | CPU | Disk |
1–5 | 256 MB | 0.5 vCPU | 1 GB |
5–20 | 512 MB | 1 vCPU | 5 GB |
20–50 | 1 GB | 2 vCPU | 10 GB |
📁 Project Structure
src/
├── index.ts # Entry point (HTTP/stdio)
├── constants.ts # Defaults and limits
├── server/mcp.ts # MCP server setup
├── tools/ # 🔧 63 MCP tools (9 files)
├── resources/ # 📖 10 MCP resources (8 files)
├── notifications/events.ts # 📡 12 event types
├── channels/
│ ├── channel.interface.ts # ChannelAdapter contract
│ ├── baileys/ # Baileys implementation
│ └── cloud-api/ # Cloud API implementation
├── services/
│ ├── instance-manager.ts # Instance lifecycle
│ ├── message-queue.ts # BullMQ rate limiting
│ ├── dedup.ts # Message deduplication
│ └── media.ts # Media handling
├── db/
│ ├── schema.ts # Drizzle table definitions
│ └── client.ts # SQLite connection
├── schemas/ # Zod validation (9 files)
└── types/ # TypeScript definitions🗺️ Roadmap
Phase 1 — Foundation: Baileys adapter, text messaging, QR auth, instance management
Phase 2 — Full messaging: all media types, dedup, reactions, edits, forwards
Phase 3 — Groups, contacts, profile, status/stories, newsletters
Phase 4 — Cloud API adapter: dual-channel unified interface
Phase 5 — Hardening: error recovery, CI/CD, tests, docs, v1.0 release
Phase 6 — Baileys v7 upgrade, LID support, contact sync, message persistence
🤝 Contributing
Contributions are welcome! Here's how the codebase is organized:
One file per domain — tools, resources, schemas, and channels each have domain-specific files
Zod schemas for everything — all tool inputs are validated with strict Zod schemas in
src/schemas/Both adapters — new features should be implemented in Baileys and stubbed in Cloud API
Layered architecture — tools → services → channels. No cross-layer imports.
Structured logging — use Pino, never
console.log
# Development
npm run dev # Start with stdio transport
npm run build # Type-check + compile
npx tsc --noEmit # Type-check only📄 License
MIT — do whatever you want.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables interaction with WhatsApp using the Baileys library and Streamable HTTP transport. It supports managing contacts, chats, and messages, while providing a web admin UI for QR code authentication and media handling.Last updated285MIT
- Alicense-qualityAmaintenanceA self-hosted WhatsApp bridge that exposes a stdio MCP server with ~20 tools for reading conversations, sending messages, managing groups, contacts, and aliases, enabling AI agents to operate WhatsApp directly.Last updated2MIT
- Flicense-qualityDmaintenanceMCP server that wraps the Evolution API (WhatsApp) as semantic tools for LLM agents, enabling messaging, chat management, group operations, and instance control via natural language.Last updated
- Alicense-qualityCmaintenanceMCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.Last updated7MIT
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/delltrak/wamcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server