OpenWA MCP Server
Provides comprehensive tools for managing WhatsApp sessions, sending multi-format messages (text, image, file, audio, video, emoji reactions), conducting bulk campaigns, orchestrating groups (create, add/remove members, promote/demote, update subject), managing contacts (get, check, block/unblock), and configuring webhooks for real-time events.
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., "@OpenWA MCP Serversend a message to +1234567890"
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.
🟢 OpenWA MCP Server
An enterprise-grade Model Context Protocol (MCP) server that seamlessly wraps the powerful OpenWA WhatsApp REST API. It exposes 44 robust tools over standard I/O (stdio) transport, enabling any MCP-compatible AI assistant (such as Cursor, Claude Desktop, Cline, and Antigravity) to securely manage WhatsApp sessions, dispatch multi-format messages, control group participants, search contacts, manage tag labels, and setup callbacks in real-time.
🧱 System Architecture
┌─────────────────────────────────────────────────────────────────┐
│ 1. AI CLIENT (Cursor, Claude, Cline, etc.) │
│ User: "Send a promotional flyer to my active VIP groups..." │
└─────────────────────────────────────────────────────────────────┘
│
▼ [JSON-RPC over stdio]
┌─────────────────────────────────────────────────────────────────┐
│ 2. OPENWA MCP SERVER (TypeScript) │
│ • Matches user request to the `send_image` tool schema │
│ • Validates payload boundaries using declarative Zod schemas │
│ • Authenticates securely via local dotenv environment configs │
└─────────────────────────────────────────────────────────────────┘
│
▼ [REST API Request with X-API-Key]
┌─────────────────────────────────────────────────────────────────┐
│ 3. OPENWA WHATSAPP REST DAEMON │
│ • Translates API payloads into native WhatsApp Web calls │
│ • Manages multi-session state machines & SQLite indexes │
└─────────────────────────────────────────────────────────────────┘
│
▼ [WhatsApp Network Protocol]
┌─────────────────────────────────────────────────────────────────┐
│ 4. TARGET WHATSAPP DEVICES │
│ • Bulk promotional flyers delivered safely and instantly │
└─────────────────────────────────────────────────────────────────┘✨ Features
44 Built-in Tools: Comprehensive control over the entire WhatsApp ecosystem.
Robust Zod Validation: Pure, declarative parameter validation on every request.
Zero-Poll Webhooks: Simple callbacks to receive instant WhatsApp events directly.
Multi-Session Native Engine: Manage multiple phone accounts under a single server wrapper.
Strict Separation of Concerns: Highly modular, human-written TypeScript architecture.
🛠️ Installation & Setup
Prerequisites
Node.js:
v22.0.0or higherTypeScript:
v5.0.0or higherA running and accessible OpenWA REST API instance
A secure API Key generated from your OpenWA server configuration
1. Clone & Build
# Clone the repository
git clone https://github.com/ExoCubeYT/openwa-mcp.git
cd openwa-mcp
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env2. Configure Environment
Edit your local .env file to match your active OpenWA REST API backend:
OPENWA_BASE_URL=http://localhost:2785/api
OPENWA_API_KEY=your_secure_api_key_here3. Build Production Targets
npm run buildThe production output will compile cleanly into the dist/index.js bundle directory.
🚀 AI Agent Integrations
To load the OpenWA MCP server into your favorite developer environment, reference the standard JSON-RPC launch config.
Note: Replace
C:/path/to/openwa-mcpwith the absolute local filesystem path of your cloned workspace directory.
Claude Desktop
Edit your global configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"openwa": {
"command": "node",
"args": ["C:/path/to/openwa-mcp/dist/index.js"],
"env": {
"OPENWA_BASE_URL": "http://localhost:2785/api",
"OPENWA_API_KEY": "your_secure_api_key_here"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project root (or set globally via Settings > Features > MCP):
{
"mcpServers": {
"openwa": {
"command": "node",
"args": ["C:/path/to/openwa-mcp/dist/index.js"],
"env": {
"OPENWA_BASE_URL": "http://localhost:2785/api",
"OPENWA_API_KEY": "your_secure_api_key_here"
}
}
}
}Cline (VS Code Extension)
Edit your global extension state configurations in cline_mcp_settings.json:
{
"mcpServers": {
"openwa": {
"command": "node",
"args": ["C:/path/to/openwa-mcp/dist/index.js"],
"env": {
"OPENWA_BASE_URL": "http://localhost:2785/api",
"OPENWA_API_KEY": "your_secure_api_key_here"
},
"disabled": false
}
}
}Claude Code
Add .mcp.json to your project workspace root:
{
"mcpServers": {
"openwa": {
"command": "node",
"args": ["C:/path/to/openwa-mcp/dist/index.js"],
"env": {
"OPENWA_BASE_URL": "http://localhost:2785/api",
"OPENWA_API_KEY": "your_secure_api_key_here"
}
}
}
}VS Code (Copilot / Continue / Open Code)
Create .vscode/mcp.json inside your local workspace:
{
"servers": {
"openwa": {
"command": "node",
"args": ["C:/path/to/openwa-mcp/dist/index.js"],
"env": {
"OPENWA_BASE_URL": "http://localhost:2785/api",
"OPENWA_API_KEY": "your_secure_api_key_here"
}
}
}
}🧰 WhatsApp Tool Catalog (44 Total)
All tool schemas are structured logically using modular TypeScript domains under src/tools/.
📱 Sessions & Authentication (7)
Tool | Params | Description |
| None | Lists all active WhatsApp web browser sessions |
|
| Launches a new browser instance for authentication |
|
| Resumes a stopped session container |
|
| Safely shuts down a running browser instance |
|
| Wipes the credentials and directory of a session |
|
| Generates a base64 pairing QR code for WhatsApp link |
|
| Returns |
💬 Messaging Services (8)
Tool | Params | Description |
|
| Dispatches a plaintext message to a contact/group |
|
| Fetches and sends an image from a URL |
|
| Sends document files (PDFs, docs) from a URL |
|
| Sends audio file streams directly to a target chat |
|
| Sends high-definition videos from web URLs |
|
| Attaches a quick emoji reaction to a message |
|
| Retrieves historical context and message logs |
|
| Deletes/revokes a message for everyone |
🚀 Bulk Campaigns (2)
Tool | Params | Description |
|
| Delivers text announcements to target chats |
|
| Broadcasts promotional flyers to multiple contacts |
👥 Group Orchestration (10)
Tool | Params | Description |
| None | Returns a list of all groups the session is in |
|
| Provisions a new group with custom contacts |
|
| Resolves admins, descriptions, and metadata |
|
| Adds a contact to an existing group |
|
| Removes/kicks a participant from the group |
|
| Grants admin permissions to a participant |
|
| Strips admin privileges from a group manager |
|
| Targeted message relay for group channels |
|
| Exits the specified group safely |
|
| Renames the group conversation title |
📇 Contact Management (6)
Tool | Params | Description |
| None | Lists all saved contacts and known numbers |
|
| Returns metadata, status, and profile information |
|
| Verifies if a raw phone number is on WhatsApp |
|
| Resolves high-resolution avatar display URLs |
|
| Instantly blocks incoming chats from a number |
|
| Restores normal chat capabilities to a number |
🔔 Webhook Configs (4)
Tool | Params | Description |
| None | Lists active callback URLs configured for events |
|
| Subscribes a server URL to WhatsApp events |
|
| Removes an active event callback listener |
|
| Mutates subscribed events on an active webhook |
🏷️ Chat Labels (5)
Tool | Params | Description |
| None | Fetches all custom label classifications |
|
| Creates a new colored tag label |
|
| Removes a custom label classification |
|
| Adds a label classification to a chat thread |
|
| Removes a label classification from a chat thread |
📦 Media Assets (2)
Tool | Params | Description |
|
| Downloads media files stored inside a message |
|
| Caches media on the server to prevent redelivery |
🛠️ Local Development
To run the codebase in live-refresh watch mode during extensions, run:
# Spawns tsx to track active source code files directly
npm run devTo run standard test transport handshakes, build the module and execute the diagnostic listener:
npm run build
node dist/index.js🤝 Contributing
We welcome contributions of all shapes and sizes! To keep codebases pristine and secure, please adhere to our strict project design conventions.
Step-by-Step Contribution Flow
Fork the Repository: Set up your workspace branch on GitHub.
Implement Your Logic: Maintain strict separation of concerns. Keep your tools and clients isolated.
No AI Comments: Adhere to our zero AI-style commenting standard. Use short, human-like annotations where needed, and document details in
.explanationfiles only.Build & Test: Ensure
npm run buildgenerates zero TypeScript errors.Create a Pull Request: Submit your pull request for review against our development branch.
See CONTRIBUTING.md for deeper details on our design paradigms.
📄 License
Distributed under the MIT License. See the LICENSE file for details.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/ExoCubeYT/openwa-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server