# loglux/whatsapp-mcp-stream [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/loglux/whatsapp-mcp-stream  
**GitHub Stars:** 5  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/loglux-whatsapp-mcp-stream

## Description
WhatsApp MCP server over Streamable HTTP with web admin UI (QR/status/settings), bidirectional media upload/download, and SQLite persistence.

## Tools
Capabilities this server exposes over MCP:

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

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/loglux/whatsapp-mcp-stream), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
docker compose build
```

2. Start the server:

```sh
docker compose up -d
```

## Documentation

## What loglux/whatsapp-mcp-stream MCP server does

loglux/whatsapp-mcp-stream MCP server exposes WhatsApp operations through an MCP endpoint at `/mcp`. It uses Baileys for the WhatsApp connection and includes a browser-based administration page at `/admin` for QR authentication, connection status, logout, runtime settings, and chat history.

The tool set covers the main objects an agent may need to work with: contacts, individual and group chats, messages, and media. It can search or resolve contacts, inspect chat metadata, list messages, search message text, retrieve message context, and send text or media. Group-oriented tools can identify overlapping members, members without direct chats, and members absent from contacts, or run those checks together as a group audit.

Chat and message data are stored in a local SQLite database located in the session volume. Media can move in both directions: the server can receive uploaded files, send media from a path, URL, or base64 content, and download media from a WhatsApp message.

## How it works

The service uses Streamable HTTP rather than a local stdio process. An MCP client first sends an `initialize` request to `/mcp`, including `Accept: application/json, text/event-stream`, then uses the returned `mcp-session-id` for later tool calls.

WhatsApp authentication begins with `get_qr_code`; `check_auth_status` reports whether the client is ready. Once authenticated, tools address contacts and chats using identifiers such as WhatsApp JIDs. `send_message` handles text, while `send_media` accepts `media_path`, `media_url`, or base64 `media_content`. Optional idempotency keys are supported for both sending operations.

For larger files or repeated sends, `stage_media` stores a file in the server media directory and returns a path for later use. The HTTP API also supports JSON base64 uploads and multipart uploads. Uploaded or hosted files can be exposed through `/media`, depending on configuration.

## Setup and configuration

The documented Docker startup path is `docker compose build` followed by `docker compose up -d`. After startup, the default admin address is `http://localhost:3003/admin`, the MCP endpoint is `http://localhost:3003/mcp`, and hosted media uses `http://localhost:3003/media/<filename>`.

Runtime settings are editable in the admin UI and saved to `SETTINGS_PATH`, which defaults to a file under `MEDIA_DIR`. Supported settings control the public media URL, upload size and count limits, upload enablement, optional upload-token enforcement, and automatic media downloads and their size limit.

loglux/whatsapp-mcp-stream MCP server does not implement built-in authentication. A production deployment should place it behind an authentication gateway. If upload-token enforcement is enabled, upload requests can provide the token through `x-upload-token` or an `Authorization: Bearer` header.

On hosts where Docker runs with `--iptables=false`, the repository documents an optional mounted `resolv.conf` workaround for container DNS resolution. The service also provides `/healthz` for health checks and includes recovery handling for several Baileys synchronization and disconnect failures.

## Tools and capabilities

- Authenticate, check readiness, and log out of WhatsApp.
- Search, resolve, and inspect contacts, profile pictures, groups, and chats.
- List, search, retrieve, and inspect message context.
- Send text to people or groups.
- Send image, video, document, and audio media.
- Stage files, download message media, and run a ping health check.
- Audit group membership relationships and contact coverage.
- Persist chats and messages in SQLite.

## Limitations and notes

The service requires a WhatsApp session to be authenticated before account data or sending operations can work. Its built-in web interface manages linking and operational settings, but it is not an access-control layer. Protect the MCP and administration endpoints externally when exposing them beyond a trusted network.

The recovery logic can attempt resynchronization or restart the internal WhatsApp client when session-state corruption or disconnect conditions recur. The documented behavior still includes health reporting and Docker restart integration for cases that remain unhealthy.

Media upload behavior depends on the configured limits and whether uploads are enabled. For large files, multipart upload or a server-side path avoids putting the entire file into base64 content.

_Full upstream README: https://allmcps.com/mcp/loglux-whatsapp-mcp-stream/readme_

