WhatsApp MCP Server for AI Agents - TypeScript, Baileys and Cloud API
# Add to your Claude Code skills
git clone https://github.com/heitorcarvalhohlbryzeis6-cloud/whatsapp-mcp-serverGuides for using ai agents skills like whatsapp-mcp-server.
See how whatsapp-mcp-server compares with popular alternatives.
whatsapp-mcp-server is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by heitorcarvalhohlbryzeis6-cloud. WhatsApp MCP Server for AI Agents - TypeScript, Baileys and Cloud API. It has 58 GitHub stars.
whatsapp-mcp-server's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/heitorcarvalhohlbryzeis6-cloud/whatsapp-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
whatsapp-mcp-server is primarily written in HTML. It is open-source under heitorcarvalhohlbryzeis6-cloud on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh whatsapp-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
wamcp is a WhatsApp MCP server that connects AI agents to WhatsApp through the Model Context Protocol, exposing 61 tools, 10 resources, and 12 real-time events that agents discover automatically on connect. It supports both Baileys (WhatsApp Web) and the Meta Cloud API behind a single interface, so the same agent code works against either backend. It's built for developers wiring WhatsApp into MCP-compatible frameworks like Claude, LangChain, or Google ADK without writing REST wrappers or webhook parsers. Written in TypeScript with Docker deployment and Redis-backed rate limiting to keep high-volume messaging within WhatsApp's limits.
| Feature | Description |
|---|---|
| 🔌 MCP-native | Exposes WhatsApp over the Model Context Protocol using Streamable HTTP and stdio transports, so any MCP-compatible agent can connect without custom glue. |
| 📱 Dual-channel backends | Choose Baileys (WhatsApp Web) or the Meta Cloud API behind a single unified interface. |
| 🧰 61 tools | A broad, wa_-prefixed tool surface spanning messaging, chats, groups, contacts, profile, presence, and more. |
| 📚 10 resources | Discoverable MCP resources for reading WhatsApp state alongside tool calls. |
| 📡 12 real-time events | Push notifications for incoming messages, presence/typing, connection changes, and other live activity. |
| 🔄 Multi-instance | Drive multiple WhatsApp numbers from one server process. |
| 📨 Rich messaging | Text, media, documents, polls, reactions, replies, edits, deletes, and view-once messages. |
| 👥 Group management | List groups, inspect participants, and manage membership and settings. |
| 👤 Contacts & profile | Number checks, contact search, blocking, and profile/privacy operations. |
| 🔁 Auto-reconnect | Resilient session handling that recovers from dropped connections. |
| 🗃️ Persistent storage | Sessions, messages, and metadata survive restarts. |
| 🧩 TypeScript | Fully typed codebase for safe integration and extension. |
Agent ──MCP (Streamable HTTP | stdio)──▶ wamcp ──▶ Baileys / Cloud API ──▶ WhatsApp
| Backend | Use when |
|---|---|
| Baileys | You want WhatsApp Web-style access without a Meta business account. |
| Cloud API | You already have Meta Cloud API credentials and want the official hosted channel. |
wa_* tools grouped by domain:
• Messaging • Chats • Groups
• Contacts • Profile • Presence
• Media • Reactions • Polls
• ... (61 tools total)
wamcp sits between your AI agent and WhatsApp as a single MCP endpoint. Your agent speaks the Model Context Protocol — either over Streamable HTTP or over stdio — and the server does the rest: it manages the WhatsApp session, queues outgoing sends, persists what it sees, and pushes real-time signals back to the agent as they arrive.
┌──────────────┐ MCP (HTTP / stdio) ┌───────────┐ Baileys ┌────────────┐
│ AI Agent │ ◄────────────────────► │ wamcp │ ◄────────► │ WhatsApp │
│ (Claude, ...)│ tools / resources │ server │ Cloud API│ (anything) │
└──────────────┘ events / SSE └─────┬─────┘ └────────────┘
│
┌──────┴──────┐
│ Storage │
│ (sessions, │
│ messages) │
└─────────────┘
wamcp presents itself as an MCP server. On connect, the client discovers the full surface automatically:
| Capability | Count | What the agent sees |
|---|---|---|
| Tools | 61 | Callable actions like sending a message, listing groups, reacting, checking a number |
| Resources | 10 | Readable state such as chats, contacts, groups, and instance status |
| Events | 12 | Real-time notifications pushed over the connection (incoming message, typing, connection changes, and more) |
No generated client library, no endpoint mapping. The agent asks what's available and gets the catalog.
wamcp supports two WhatsApp backends behind one interface. Pick the one that fits your deployment:
| Channel | Session | Best for |
|---|---|---|
| Baileys | WhatsApp Web link (QR / pairing code) | Personal numbers, full feature surface |
| Cloud API | Meta-issued token + phone number ID | Business accounts, official rate limits |
Both are driven through the same wa_* tool names, so an agent's tool calls stay stable when you switch channels. Where a capability exists only on one channel (e.g. QR linking on Baileys), the other channel returns a clear unsupported-operation error rather than failing silently.
Agent calls wa_send_text({ chatId, text })
│
▼
┌─────────────────┐ validate input against the tool schema
│ MCP handler │
└────────┬────────┘
▼
┌─────────────────┐ authenticate + normalize to a channel-neutral form
│ Channel layer │
└────────┬────────┘
▼
┌─────────────────┐ enqueue the outbound action (rate-limited)
│ Send queue │
└────────┬────────┘
▼
┌─────────────────┐ deliver via Baileys or Cloud API
│ WhatsApp │
└────────┬────────┘
▼
response returned to agent (delivery status, message ID, ...)
Outgoing messages go through a queue so bursts are throttled to safe rates instead of tripping WhatsApp's abuse detection. The agent gets back a structured result — not a fire-and-forget acknowledgment.
When something happens on the WhatsApp side, wamcp turns it into one of two things for the agent:
wa_get_messages, wa_search_messages, resource reads) return real history rather than requiring a round trip to WhatsApp.Incoming audio can optionally be transcribed, and outgoing voice notes can optionally be synthesized, both gated behind configuration so the default path stays dependency-light.
A single wamcp process can host multiple WhatsApp instances — separate numbers or separate channels — each with its own session and its own state. Every tool and resource takes an instance identifier (implicit or explicit depending on call shape), so your agent manages them all through the same connection.
| Transport | When to use |
|---|---|
| Streamable HTTP | Server deployed once, agents connect remotely; supports SSE for events |
| stdio | Agent and server live on the same machine; the agent spawns the server |
Sessions are durable: Baileys credentials persist across restarts, so a reconnecting instance resumes without re-pairing. When the WhatsApp connection drops, the server reconnects with exponential backoff on its own — the agent only needs to listen for connection events if it wants to surface them to the user.
WA MCP is configured through environment variables, a JSON config file passed via WA_CONFIG_FILE, or CLI flags. Environment variables take precedence over the config file, and CLI flags take precedence over both. For the complete list of supported keys, see the API reference.
| Source | How to provide | Notes |
|---|---|---|
| Environment variables | .env file or process environment |
Prefix WA_; recommended for Docker |
| JSON config file | WA_CONFIG_FILE=/path/to/config.json |
Useful for multi-instance and per-instance overrides |
| CLI flags | --transport, --port, --config |
Highest precedence; useful for local runs |
| Variable | Default | Purpose |
|---|---|---|
WA_TRANSPORT |
http |
MCP transport: http (Streamable HTTP) or stdio |
WA_PORT |
3000 |
HTTP listen port (used when WA_TRANSPORT=http) |
WA_HOST |
0.0.0.0 |
HTTP bind address |
WA_REDIS_URL |
redis://localhost:6379 |
Redis connection for BullMQ queues and event fan-out |
WA_DB_PATH |
./data/wamcp.db |
SQLite file for sessions, messages, contacts, groups |
WA_LOG_LEVEL |
info |
debug, info, warn, error |
WA_CONFIG_FILE |
— | Path to a JSON config file |
WA_DATA_DIR |
./data |
Directory for SQLite, media cache, and session state |
Select the backend used to talk to WhatsApp. Both backends expose the same MCP tool surface.
| Variable | Default | Purpose |
|---|---|---|
WA_CHANNEL |
baileys |
baileys (WhatsApp Web) or cloud (Meta Cloud API) |
WA_CLOUD_PHONE_NUMBER_ID |
— | Required when WA_CHANNEL=cloud |
WA_CLOUD_WABA_ID |
— | WhatsApp Business Account ID |
WA_CLOUD_ACCESS_TOKEN |
— | Cloud API bearer token (or set per instance with wa_set_cloud_credentials) |
WA_CLOUD_VERIFY_TOKEN |
— | Webhook verification token for inbound Cloud API events |
| `WA_CLOUD |