MCP server for WhatsApp integration via Baileys - read and send WhatsApp messages from Claude and other LLM clients
WhatsApp MCP server has a solid foundation with 8 well-named tools and clear descriptions. Tool naming follows verb_noun convention consistently (whatsapp_get_*, whatsapp_list_*, whatsapp_send_*). All tools have descriptions ranging from 150-400 chars, exceeding the 10-char minimum. Input schemas are present for all tools with proper JSON Schema structure. However, several critical gaps emerge: (1) Output schemas are documented in descriptions but not formally in the source code as structured response objects; (2) No error handling guidance or recovery paths for agents; (3) Security concerns around credential handling are present but not explicitly documented in tool scopes; (4) Some parameter descriptions could be more precise about constraints and formats. STDIO-only transport is a hard cap limiting score, but definition quality itself is above average for community servers.
Download media (attachments) for a message from the server's in-memory raw message store. Important: - The server can only download media for messages it has observed since it started. - Use whatsapp_list_messages to get message_id + chat_id. Args: - chat_id (string): Chat JID (from whatsapp_list_messages) - message_id (string): Message ID (from whatsapp_list_messages) - output_dir (string, optional): Directory to write the file to (supports "~/" expansion) Returns: - path: Absolute path to the downloaded file - media: Metadata (kind, mimetype, etc.)
Get detailed information about a WhatsApp group. Returns the group subject, description, participants, and creation date. Args: - group_id (string): WhatsApp group JID (e.g., '[email protected]') Use whatsapp_list_chats to find group IDs. Returns: - subject: Group name/subject - description: Group description text - participants: List of members with admin status - creation: Group creation timestamp
Get media (attachments) directly from the server as Base64 without saving to disk. Important: - The server can only return media for messages it has observed since it started. - Use whatsapp_list_messages to get message_id + chat_id. Args: - chat_id (string): Chat JID (from whatsapp_list_messages) - message_id (string): Message ID (from whatsapp_list_messages) - format (string, optional): Return format - "base64" (default) or "data_url". Base64 for direct use, Data URL for display. Returns: - base64: Base64 encoded media (for "base64" format) or image data URL (for "data_url" format) - media: Metadata (kind, mimetype, etc.)
Output schemas not formally documented in structured code. Descriptions state what fields are returned (e.g., 'id', 'timestamp', 'participants'), but responses lack explicit JSON Schema or TypeScript interface definitions in the source that agents can rely on for planning downstream calls.
No error handling guidance for agents. Tools document error conditions (e.g., 'WhatsApp is not connected', 'Message too long') but do not provide recovery steps or classify errors as retryable vs. fatal. An agent receiving 'WhatsApp is not connected' has no guidance on what to try next.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 62 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 53 | - | v1 |
Check the current WhatsApp connection status. Returns whether the client is connected, the linked phone number, or a QR code that needs to be scanned if not yet authenticated. Use this tool first to verify WhatsApp is connected before using other tools. Returns: - connected (boolean): Whether WhatsApp is currently connected - phoneNumber (string): The connected phone number (if connected) - qrCode (string): QR code data to scan (if waiting for authentication) - error (string): Error message (if connection failed)
List available WhatsApp chats (groups and contacts). Returns a list of chats with their IDs, names, and metadata. Use the chat ID from the results with other tools like whatsapp_send_message. Args: - limit (number): Maximum chats to return (1-100, default: 20) Returns: List of chats with: - id: Chat JID (use this for sending messages) - name: Display name of the chat - isGroup: Whether this is a group chat - unreadCount: Number of unread messages
List recent WhatsApp messages from the server's local message store. Important: This tool can only list messages that the running server has observed (and, if enabled, persisted). It does not fetch arbitrary chat history from WhatsApp. Args: - chat_id (string, optional): Chat JID to list messages from (DM or group). If omitted, returns recent messages across all chats. - limit (number): Maximum messages to return (1-100, default: 20) Returns: A formatted list of messages with timestamp, sender, and text. If a message contains media, the output includes basic media metadata and a hint to use whatsapp_download_media.
Send a file/media message to a WhatsApp chat or phone number. IMPORTANT: This tool sends a real message. The LLM client should confirm with the user before calling this tool. Args: - chat_id (string): WhatsApp chat JID or phone number with country code - path (string): Local file path (supports "~/" expansion) - kind (string, optional): document|image|video|audio|voice (voice sends a WhatsApp voice note / ptt) - caption (string, optional): Caption (image/video/document) - mimetype (string, optional): MIME type override - fileName (string, optional): File name override (document only) Returns: - id: Message ID of the sent message - timestamp: Unix timestamp when the message was sent
Send a text message to a WhatsApp chat or phone number. IMPORTANT: This tool sends a real message. The LLM client should confirm with the user before calling this tool. Args: - chat_id (string): WhatsApp chat JID or phone number with country code Examples: '4915123456789', '[email protected]', '[email protected]' - text (string): Message text to send (max 4096 characters) Returns: - id: Message ID of the sent message - timestamp: Unix timestamp when the message was sent Errors: - "WhatsApp is not connected" if client hasn't completed QR authentication - "Message too long" if text exceeds 4096 characters
Destructive operations (send_message, send_file, download_media) lack confirmation or dry-run patterns. Descriptions warn 'This tool sends a real message' but provide no mechanism for agents to preview or confirm before executing. Agents make mistakes, a confirm_before_execute pattern would prevent accidental messages.
Parameter descriptions lack explicit constraints. 'chat_id' accepts either a phone number with country code or a JID, but the description does not clearly state the format (e.g., 'phone number must be 10-15 digits with country code; JID format is [email protected] or [email protected]'). This forces LLMs to infer valid formats from examples rather than explicit rules.
No tool composition guidance. Media download and retrieval tools require message_id + chat_id from whatsapp_list_messages, but no explicit dependency hint in the descriptions. Agents may not understand the required sequence, leading to failed calls with missing IDs.
Missing scope declarations. Tools do not declare required permissions (e.g., 'read:messages', 'write:messages', 'send:message'). This prevents least-privilege agent configuration and limits audit trail clarity.
Pagination not explicitly constrained. whatsapp_list_chats and whatsapp_list_messages accept 'limit' (1-100) and define defaults (20), but do not mention next_cursor, offset, or how to retrieve more results beyond the limit. Large chat/message histories cannot be fully traversed.