# whatsapp-mcp-stream

> whatsapp-mcp-stream is an open-source MCP server for communication. MCP server giving AI clients WhatsApp access over Streamable HTTP, with media and admin UI. It is available on API, Self-hosted and Web.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, Self-hosted, Web
- **Repository:** https://github.com/loglux/whatsapp-mcp-stream
- **GitHub stars:** 5
- **License:** MIT
- **Categories:** [communication](https://ai-powered.com/categories/communication)
- **Listing updated:** 2026-12-01

## About

Connects an AI client to a personal or business WhatsApp account through the Model Context Protocol. It runs on Baileys and exposes tools for listing and searching chats, contacts, group members and messages, sending text and media, and downloading inbound attachments. A small web admin page handles QR-code linking, session status, logout and runtime settings, plus a viewer for stored chat history.

Chats and messages are kept in a local SQLite database in the session volume, so history can be searched and exported as JSON with optional downloaded media. Files can be staged on the server or fetched from a URL and then sent by path, which avoids re-uploading the same file to several recipients. Upload endpoints support base64 and multipart requests, optionally protected by a token.

The project suits developers and operators who want an assistant to work with WhatsApp conversations, group audits or outbound messaging. It ships with self-healing logic for common session-state failures and a health endpoint for container orchestration. Authentication is not built in, so the README recommends placing it behind an auth gateway.

## Features

- **Streamable HTTP MCP endpoint:** Serves MCP tools over Streamable HTTP at a single /mcp path for any compatible client.
- **Chat and message tools:** Lists, searches and resolves chats, contacts, group members and individual messages.
- **Media send and download:** Sends images, video, documents and audio from paths, URLs or base64, and downloads inbound media.
- **Local chat persistence:** Stores chats and messages in SQLite and exposes paginated history APIs and chat export.
- **Admin QR and settings page:** Web UI for QR linking, session status, logout, runtime settings and a chat history viewer.
- **Session self-recovery:** Automatically attempts soft resync and internal restarts when the WhatsApp session degrades.
- **Group audit routines:** Finds members shared across groups, members without direct chats and members missing from contacts.

## Good for

- Let an AI assistant search and summarise past WhatsApp conversations
- Audit group membership to find overlapping or uncontacted members
- Send files staged on a server to several recipients without re-uploading
- Build an automated WhatsApp messaging workflow with idempotent sends
- Export a chat's history and downloaded media for record keeping

## Tools

From the tool list in its README, going by the names, 3 of 27 tools change data; 4 names don't say. From the server's own tool labels and tool names; not verified by us.

- `get_qr_code` (name suggests: reads): Get the latest WhatsApp QR code as an image for authentication.
- `check_auth_status` (name suggests: reads): Check if the WhatsApp client is authenticated and ready.
- `logout`: Logout from WhatsApp and clear the current session.
- `search_contacts` (name suggests: reads): Search contacts by name or phone number.
- `resolve_contact`: Resolve a contact by name or phone number (best matches).
- `get_contact_by_id` (name suggests: reads): Get contact details by JID.
- `get_profile_pic` (name suggests: reads): Get profile picture URL for a JID.
- `get_group_info` (name suggests: reads): Get group metadata and participants by group JID.
- `list_chats` (name suggests: reads): List chats with metadata and optional last message.
- `get_chat_by_id` (name suggests: reads): Get chat metadata by JID.
- `list_groups` (name suggests: reads): List group chats only.
- `get_direct_chat_by_contact_number` (name suggests: reads): Resolve a direct chat JID by phone number.
- `get_chat_by_contact` (name suggests: reads): Resolve a contact by name or phone number and return chat metadata.
- `analyze_group_overlaps` (name suggests: reads): Find members that appear across multiple groups.
- `find_members_without_direct_chat` (name suggests: reads): Find group members with no direct chat.
- `find_members_not_in_contacts` (name suggests: reads): Find group members missing from contacts.
- `run_group_audit` (name suggests: changes): Run combined group audit as one routine operation.
- `list_messages` (name suggests: reads): Get messages from a specific chat.
- `search_messages` (name suggests: reads): Search messages by text (optionally scoped to a chat).
- `get_message_by_id` (name suggests: reads): Get a specific message by ID (jid:id).
- `get_message_context` (name suggests: reads): Get recent messages around a specific message.
- `get_last_interaction` (name suggests: reads): Get the most recent message for a JID.
- `send_message` (name suggests: changes): Send a text message to a person or group. Supports optional idempotency_key.
- `send_media` (name suggests: changes): Send media (image/video/document/audio).
- `stage_media`: Save a file to the server's media directory and return its local path.
- `download_media` (name suggests: reads): Download media from a message.
- `ping`: Health check tool.

## FAQ

### Does whatsapp-mcp-stream include built-in authentication?

No. The README says built-in authentication is not implemented yet and recommends placing the server behind a gateway that enforces auth, such as authmcp-gateway.

### How is the WhatsApp connection made?

The admin UI shows a QR code to link the account, and the server uses the Baileys library to connect.

### Where is chat data stored?

Chats and messages are persisted to a local SQLite database in the session volume, with the path configurable through DB_PATH.

### How can I send a local file?

Place it in the mounted ./files directory and reference it with media_path in send_media, or pass a media_url to send_media or stage_media.

### Is whatsapp-mcp-stream free?

Yes. whatsapp-mcp-stream is open source, so you can use and self-host it for free.

### What are the best alternatives to whatsapp-mcp-stream?

The closest alternatives to whatsapp-mcp-stream are WhatsApp Web MCP Server, whatsapp-mcp, Whatsapp, whatsapp-mcp and WhatsApp MCP.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [WhatsApp Web MCP Server](https://ai-powered.com/mcp/whatsapp-web-mcp-server): WhatsApp Web MCP Server is an open-source MCP server for communication.
- [whatsapp-mcp](https://ai-powered.com/mcp/whatsapp-mcp-5): whatsapp-mcp is an open-source MCP server for communication.
- [Whatsapp](https://ai-powered.com/mcp/whatsapp-6): Whatsapp is a freemium MCP server for communication.
- [whatsapp-mcp](https://ai-powered.com/mcp/whatsapp-mcp-4): whatsapp-mcp is an open-source MCP server for communication.
- [WhatsApp MCP](https://ai-powered.com/mcp/whatsapp-mcp-3): WhatsApp MCP is an MCP server for communication.
- [mcp](https://ai-powered.com/mcp/mcp-5): mcp is an open-source MCP server for communication.
- [WhatsApp Connect](https://ai-powered.com/mcp/whatsapp-connect): WhatsApp Connect is an open-source MCP server for communication.
- [Wa MCP](https://ai-powered.com/mcp/wa-mcp-2): Wa MCP is an open-source MCP server for communication.

---
Source: https://ai-powered.com/mcp/whatsapp-mcp-stream
