WAHA MCP Server
The WAHA MCP Server provides 50+ tools for comprehensive WhatsApp automation, enabling AI agents to manage messaging, chats, contacts, groups, and interactive workflows.
Agent-Grade Tools: Inbox triage (waha_inbox), chat lookup (waha_find_chat), LLM-ready conversation context (waha_get_chat_context), human-like replies (waha_reply), and autonomous workflows via ask_user_via_whatsapp (sends a question and blocks until the user replies).
Session Management: List, create, start, stop, restart, delete, and logout sessions; authenticate via QR code or pairing code; check auth status; capture WhatsApp Web screenshots.
Messaging: Send text (with mentions, reply-to, link previews), images, videos, voice, files, locations, contacts, and polls; react, forward, edit, delete, star/unstar, mark as read; retrieve messages with filters and pagination.
Chat Management: List, get, archive/unarchive, pin/unpin, mute/unmute, delete, and clear chats.
Contacts: List contacts, get info, check if a number exists on WhatsApp, block/unblock, get profile pictures.
Group Management: Create, list, and get group details; add/remove/promote/demote participants; update subject, description, and picture; join via invite links; get/revoke invite codes; leave groups.
Presence: Set online/offline status, get contact presence/last seen, show/stop typing indicators.
Status/Stories: Post text, image, or voice status updates; delete statuses.
Labels (WhatsApp Business): Get, create, delete, and update labels; add/remove labels from chats; find chats by label.
Provides comprehensive tools for automating WhatsApp accounts via the WAHA HTTP API, including messaging (text, media, polls), chat and group management, contact interactions, and real-time presence control.
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., "@WAHA MCP ServerSend a WhatsApp message to 1234567890@c.us saying the report is ready"
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.
Hermes MCPs
Personal WhatsApp + Telegram MCP servers for AI agents (hermes-agent, Claude, and any MCP client)
Documentation โข Installation โข Configuration โข ๐ค Agent Setup โข ๐ชฝ Hermes Setup โข Tools Reference
๐ What is Hermes MCPs?
Two sibling MCP servers that give an AI agent control of the owner's personal messaging accounts, built on one shared TypeScript core:
WhatsApp (
dist/index.js, 84waha_*tools) โ via WAHA (WhatsApp HTTP API) on the GOWS engineTelegram (
dist/telegram/index.js, 15tg_*tools) โ directly over MTProto via gramjs, no bot API
Both share the same agent-grade design: inbox triage, LLM-ready conversation rendering, inline voice-note transcription (Soniox), compact token-efficient output, and self-explanatory errors.
โจ Key Features
๐ฑ Complete WhatsApp Control - Send/receive messages, manage chats, create groups
๐ฏ 84 Tools - Comprehensive API coverage for sessions, messaging, contacts, groups, status, labels, and interactive workflows
๐ง Agent-Grade Compound Tools -
waha_inbox(triage),waha_find_chat(name โ chatId),waha_reply(human-like answering),waha_get_chat_context(LLM-ready conversation rendering)๐๏ธ Voice Transcription - Incoming voice notes transcribed automatically via Soniox (Hebrew + 60 languages, OGG/Opus native) โ verified end-to-end on real speech
๐ Smart Media Handling - Auto-conversion for voice/video, URLs & local files, inline image viewing for vision models
๐ค AI-Native - Token-efficient compact responses, MCP tool annotations (read-only/destructive hints)
๐ Secure - Environment-based API key management, optional local-file sandbox (
WAHA_MCP_FILES_DIR)โก Fast & Reliable - TypeScript-powered, request timeouts, typed errors, vitest suite
โ๏ธ Telegram too - a second MCP server (
dist/telegram/index.js) controls your personal Telegram account over MTProto: 15tg_*tools sharing the same core (inbox digest, conversation rendering, voice transcription, send/react/edit, media, search). See Telegram server
Related MCP server: WAHA MCP Server
๐ Prerequisites
Before you begin, ensure you have:
Node.js 18+ - Download here
WAHA Plus on the GOWS engine, running in Docker - required for media (the basis of transcription & image viewing) and for connection stability. Full server setup โ
docs/waha-server-setup.mdWAHA API Key - any strong secret you set via
WHATSAPP_API_KEY(optional) Soniox API key - enables voice-note transcription (soniox.com; Hebrew + 60 languages)
Why Plus + GOWS? Core can't download incoming media (no voice transcription, no image viewing). NOWEB/WEBJS get the device force-unlinked or break on WhatsApp updates. The setup guide explains the tradeoffs and the anti-ban configuration in detail.
๐ ๏ธ Installation
1. Clone & Install
git clone https://github.com/dudu1111685/hermes_mcps.git
cd waha-mcp
npm install
npm run build2. Set Environment Variables
Create a .env file or export variables:
export WAHA_API_KEY="your-api-key-here"
export WAHA_URL="http://localhost:3001" # Optional, defaults to localhost:3001
export WAHA_DEFAULT_SESSION="default" # Optional โ see Session policy below
export SONIOX_API_KEY="your-soniox-key" # Optional โ enables voice note transcription
export WAHA_TIMEOUT_MS="30000" # Optional โ WAHA request timeout
export WAHA_MCP_FILES_DIR="/tmp/waha-mcp" # Optional โ restrict local-file reads to this dir
export WAHA_THROTTLE=1 # Optional โ enable anti-ban send pacing (off by default)Session policy: WAHA_DEFAULT_SESSION sets the default session name for every tool call. Set it to your session name (e.g. default) for a single-account setup. If you leave it unset, the session parameter becomes required on every tool call โ the safe choice when multiple WhatsApp accounts are connected, since a silent default could send from the wrong account. Call waha_list_sessions to enumerate available sessions.
Anti-ban throttle: off by default since the GOWS engine fixed device_removed disconnects. Set WAHA_THROTTLE=1 to enable pacing (3โ8s jitter between sends, max 8/min, group ops spaced 120s). High-volume or bursty sends to many recipients are still risky regardless of engine โ enable throttling for those use cases.
โ๏ธ Configuration
Claude Desktop
Add to claude_desktop_config.json:
Linux: ~/.config/claude/claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"waha": {
"command": "node",
"args": ["/absolute/path/to/waha-mcp/dist/index.js"],
"env": {
"WAHA_API_KEY": "your-api-key-here",
"WAHA_URL": "http://localhost:3001",
"WAHA_DEFAULT_SESSION": "default"
}
}
}
}Session note:
WAHA_DEFAULT_SESSIONmakes every tool default to that session. Omit it only if you connect multiple WhatsApp accounts and want the tool to require an explicitsessionon every call.
Cline / VS Code
Add to your Cline MCP settings (~/.vscode/mcp.json or workspace settings):
{
"mcpServers": {
"waha": {
"command": "node",
"args": ["/absolute/path/to/waha-mcp/dist/index.js"],
"env": {
"WAHA_API_KEY": "your-api-key-here",
"WAHA_DEFAULT_SESSION": "default"
}
}
}
}AI Agents (hermes-agent, Claude Code, and more)
๐ค Enable truly autonomous AI workflows:
Instead of the agent stopping when it needs user input, it can ask questions via WhatsApp and continue working!
๐ Setup guides: AGENT_SETUP.md (Claude Code / generic MCP) โข HERMES_SETUP.md (hermes-agent)
Quick config example:
{
"mcpServers": {
"waha": {
"command": "node",
"args": ["/path/to/waha-mcp/dist/index.js"],
"env": {
"WAHA_API_KEY": "your-key",
"WAHA_DEFAULT_SESSION": "default",
"USER_WHATSAPP_CHAT_ID": "1234567890@c.us"
}
}
},
"globalInstructions": "When you need user input during development, send the question with waha_ask_user and poll waha_check_replies every ~30-60s until answered. Never stop and wait for manual console input."
}How it works:
Claude hits a question โ asks via WhatsApp
You reply from your phone
Claude continues working immediately
Zero downtime! โก
๐ See also:
AGENT_SETUP.md- Setup + the ask/check-replies pattern for any MCP agentHERMES_SETUP.md- hermes-agent: config.yaml, tool selection, autonomy patternsskills/whatsapp-assistant/- WhatsApp behavioral playbook skill (agentskills.io format)skills/telegram-assistant/- Telegram behavioral playbook skill
Other MCP Clients
Use the mcporter CLI for quick testing:
mcporter call 'waha-mcp.waha_list_sessions()'
mcporter call 'waha-mcp.waha_send_text(chatId: "1234567890@c.us", text: "Hello from MCP!")'๐งฐ Tools Reference
๐ Categories
Tool | Description |
| Triage first. Chats sorted by recent activity with last-message previews โ "what needs attention?" |
| Resolve a person/group name to a chatId (fuzzy, ranked). Use before any send/read when you only have a name |
| Primary reading tool. LLM-ready conversation rendering: names resolved, voice notes transcribed inline (Soniox), media summarized |
| Human-like answering: mark seen โ typing indicator โ proportional delay โ send (anti-ban sequence in one call) |
Tool | Description |
| Transcribe a specific voice message via Soniox ( |
| Download incoming media โ images returned inline so vision models can see them, larger files saved to a temp path |
| Fetch a single message (quoted-message resolution, fresh media URLs) |
Tool | Description |
| List all sessions and their statuses |
| Get detailed info about a session |
| Create a new session |
| Start a stopped session |
| Stop a running session |
| Restart a session |
| Delete a session permanently |
| Disconnect WhatsApp account from session |
| Visual debug โ screenshot of the WhatsApp Web screen (returned as an image) |
Tool | Description |
| Get QR code for WhatsApp authentication |
| Request phone number pairing code |
| Check session authentication status |
Tool | Description |
| Send a text message (mentions, reply-to, link preview) |
| Send an image (local file or URL) |
| Send a video with auto-conversion |
| Send a voice message with auto-conversion |
| Send any document/file |
| Send a location pin |
| Send a contact vCard |
| Create and send a poll |
| React with emoji ๐โค๏ธ๐ |
| Forward a message to another chat |
| Get messages with pagination + timestamp/ack filters |
| Delete a message |
| Edit a sent message |
| Mark messages as read |
| Star/unstar a message |
| Pin a message for 24h/7d/30d |
๐ค Media Upload Features:
โ Local files & URLs supported
โ Auto MIME type detection
โ Auto video/voice conversion to WhatsApp format
โ 50+ file types supported
โ Base64 encoding handled automatically
Tool | Description |
| List all chats (sortable, paginated) |
| Get chat info (via overview lookup) |
| Archive/unarchive a chat |
| Mark a chat unread for human follow-up |
| Delete a chat |
| Clear all messages in a chat |
Note: WAHA has no chat-level pin/mute endpoints, so no pin/mute chat tools are exposed (message pinning is available via
waha_pin_message).
Tool | Description |
| Get contacts (paginated, sortable) |
| Get info about a contact |
| Get a contact's "about" status text |
| Check if number is on WhatsApp (verify before first-time sends!) |
| Save/edit a contact's name |
| Block/unblock a contact |
| Get profile picture URL |
Tool | Description |
| Create a new group |
| List all groups (lean payload by default) |
| Get detailed group info |
| List group participants |
| Add participants |
| Remove participants |
| Promote to admin |
| Demote from admin |
| Update group name |
| Update group description |
| Set group picture (local file or URL) |
| Join a group via invite link/code |
| Preview a group before joining |
| Admin-only messages/info settings |
| Leave a group |
| Get invite link |
| Revoke & regenerate link |
Tool | Description |
| Set online/offline status |
| Get contact's presence (last seen) |
| Subscribe to a contact's presence updates |
| Show typing indicator |
| Stop typing indicator |
| Send read receipts (see Messaging) |
Tool | Description |
| Post a text status (background color, font) |
| Post an image status (local file or URL) |
| Post a voice status (auto-converted to Opus) |
| Delete a posted status |
Tool | Description |
| Get all labels |
| Create a new label |
| Rename/recolor a label |
| Delete a label |
| Get labels of a chat |
| Replace a chat's label set |
| Find all chats with a label (triage loop) |
Tool | Description |
| Send a question via WhatsApp, return immediately with tracking info (non-blocking) |
| Check for replies since the question was sent โ single quick poll, the agent manages its own waiting loop |
Use Case Example:
// Claude Code is building a feature and needs clarification
const q = await waha_ask_user({
question: "Should I use REST or GraphQL for the API?",
chatId: "1234567890@c.us"
});
// ...continue other work, then periodically:
const replies = await waha_check_replies({
chatId: "1234567890@c.us",
sinceTimestamp: q.sinceTimestamp,
questionMessageId: q.questionMessageId
});
// User replied from phone: "Use GraphQL" โ continue with GraphQLWhy non-blocking? The old blocking design waited up to 60 minutes inside one tool call โ every MCP client times out long before that. The new pair lets the agent keep working and poll on its own schedule. Quoted replies to the question are detected reliably (including in groups via the fromUser filter).
๐ Security Note: Local File Access
Send tools that accept a local file path (waha_send_image, waha_send_file, waha_send_voice, status tools, etc.) can read any file the server process can access. Since chat content (including voice transcripts) from other people reaches the agent, a prompt-injected instruction could try to exfiltrate local files (e.g. SSH keys) by "sending" them.
To restrict reads to a single directory, set the WAHA_MCP_FILES_DIR environment variable (e.g. to /tmp/waha-mcp, where waha_get_media saves downloads). Paths outside it are then rejected. When unset, any local path is allowed.
๐ Chat ID Formats
Understanding WhatsApp ID formats:
Type | Format | Example |
User |
|
|
Group |
|
|
Channel |
|
|
Status |
|
|
Note: Phone numbers should exclude the
+prefix.
๐ฏ Quick Examples
Send a Text Message
mcporter call 'waha-mcp.waha_send_text(
chatId: "1234567890@c.us",
text: "Hello from WAHA MCP!"
)'Send an Image from URL
mcporter call 'waha-mcp.waha_send_image(
chatId: "1234567890@c.us",
imageUrl: "https://example.com/photo.jpg",
caption: "Check this out!"
)'Create a Group & Add Participants
# Create group
mcporter call 'waha-mcp.waha_create_group(
name: "Team Chat",
participants: ["1111111111@c.us", "2222222222@c.us"]
)'
# Add more participants
mcporter call 'waha-mcp.waha_add_group_participants(
chatId: "{group_id}@g.us",
participants: ["3333333333@c.us"]
)'List All Chats
mcporter call 'waha-mcp.waha_list_chats()'โ๏ธ Telegram Server
The repo ships a second, independent MCP server that operates your personal Telegram account directly over MTProto (via gramjs) โ no bot, no Telegram Bot API limits. It reuses the same core layer as the WhatsApp server (tool wrapper, compact formatting, Soniox voice transcription).
Setup
# 1. Get api_id + api_hash at https://my.telegram.org โ "API development tools"
# 2. One-time interactive sign-in (phone โ code โ optional 2FA password).
# Writes TELEGRAM_API_ID / TELEGRAM_API_HASH / TELEGRAM_SESSION into .env:
npm run telegram:loginโ ๏ธ
TELEGRAM_SESSIONgrants full access to the account โ treat it like a password and only pass it via environment configuration.
MCP client config
{
"mcpServers": {
"telegram": {
"command": "node",
"args": ["/absolute/path/to/waha-mcp/dist/telegram/index.js"],
"env": {
"TELEGRAM_API_ID": "123456",
"TELEGRAM_API_HASH": "...",
"TELEGRAM_SESSION": "...",
"SONIOX_API_KEY": "..."
}
}
}
}Tools (15, prefixed tg_)
Tool | Purpose |
| Digest of unread chats โ start here |
| Discover chats, resolve names to ids |
| Conversation rendered for reading; voice notes transcribed inline |
| Send messages/files, optional quote-reply |
| Act on messages |
| Per-chat or account-wide text search |
| Download media, transcribe voice |
| Housekeeping |
chat accepts what tg_list_chats returns: a numeric id (channels use the
-100โฆ form), @username, a +phone of a contact, or me (Saved Messages).
๐งช Development
Run in Watch Mode
npm run dev # Recompiles on file changesRun Tests
npm testBuild for Production
npm run build๐ Documentation
For detailed documentation, see the docs folder:
๐ค Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
WAHA (WhatsApp HTTP API) - The backbone of this integration
Model Context Protocol - Enabling AI-native tool integration
Anthropic - For Claude Desktop and MCP SDK
Built with โค๏ธ for the MCP community
โญ Star this repo โข ๐ Report Bug โข ๐ก Request Feature
Maintenance
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/dudu1111685/hermes_mcps'
If you have feedback or need assistance with the MCP directory API, please join our Discord server