# whatsapp-mcp [Health: Active]

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

## Description
WhatsApp MCP Server — community fork with LID contact fixes, group management, security hardening, and contact name resolution

## Tools
Capabilities this server exposes over MCP:

- **search_contacts** — Search contacts by name or phone number (LID-aware)
- **list_messages** — Retrieve messages with filters, pagination, context, readable stickers, locations and contact cards; reactions appear with their target message; WhatsApp statuses are excluded (statuses stored by older versions are deleted at bridge startup)
- **request_chat_history** — Ask the online phone for 1-50 messages before the oldest stored message (`count` defaults to 50); requires a nonempty chat. Results arrive asynchronously; check with `list_messages`. Wakes the phone; hidden by `MCP_READONLY`. REST: `POST /api/chat/backfill {"chat_jid":"...","count":50}
- **list_chats** — List chats with metadata
- **suggest_favorites** — Suggest favorites from last month's two-way conversations; only proposes
- **list_favorites** — The favorites: WhatsApp's Favorites list plus the suggestions you accepted
- **decide_favorite** — Record your decision for one contact: accept, reject or remove
- **morning_summary** — The day's summary: only what needs your action, favorites first, max 10 plus a "more N" count; one photograph per day
- **create_chase_draft** — Write a draft chasing someone about a matter they owe; sends nothing
- **list_chase_drafts** — List chase drafts (pending, sent, discarded)
- **approve_chase_draft** — Send a draft in your name: only the exact text you approved goes out
- **discard_chase_draft** — Discard a pending draft; it is never sent later
- **list_matters** — Open matters (pending requests and commitments) with state, proof and why they need attention on a day
- **review_next_messages** — Messages not reviewed yet, with the open matters of those chats; never moves the cursor
- **record_matter** — Record a matter citing the message that proves it (or add a mention to an existing one)
- **close_matter** — Close a matter: confirmed by a later message from the other person, or by the owner
- **reopen_matter** — Reopen a closed or expired matter when the conversation returns to it
- **mark_reviewed** — Advance the review cursor
- **send_contact** — Send a contact as a native contact card (vCard)
- **vote_in_poll** — Cast (or retract) your own vote in a poll
- **list_active_chats** — Who you talked to in a period (e.g. one day): one row per conversation with first/last time, count, last-message snippet and a link
- **get_chat** — Get info about a specific chat
- **get_direct_chat_by_contact** — Find a direct chat by phone number (LID-aware)
- **get_contact_chats** — All chats involving a contact
- **get_last_interaction** — Most recent message with a contact
- **get_message_context** — Messages around a specific message, including locations, contact cards, stickers and reactions on each message
- **send_message** — Send a text message, optionally as a native reply quoting a stored text message and/or @-mentioning people
- **react_to_message** — Add or remove a reaction; for another group member's message, its author must be stored in the bridge's local history
- **delete_message** — Delete a message for everyone; another group member's message requires a stored author and group admin permission
- **send_file** — Send image, video, document, or audio file from the MCP server's machine (uploaded to the bridge)
- **send_audio_message** — Send audio as a WhatsApp voice message
- **send_voice_message** — Convert text to speech and send it as a voice message, with an optional `notice` text sent just before it (opt-in, see [Voice messages from text](#voice-messages-from-text-opt-in))
- **download_media** — Download image, video, audio, document or sticker media from a message to the MCP server's machine, get that path
- **create_upload_link** — Web connector only: one-time page where the user uploads a file for `send_file(upload_id=...)
- **create_group** — Create a new WhatsApp group
- **leave_group** — Leave a group
- **update_group_participants** — Add/remove/promote/demote group members
- **send_chat_presence** — Send typing or recording indicators
- **get_group_invite_link** — Get a group invite link, or revoke it and get a new one (`reset`)
- **join_group_with_link** — Join a group by invite link or code
- **update_group_settings** — Set group name, description, announce-only, locked
- **check_whatsapp** — Check if phone numbers are registered on WhatsApp
- **create_poll** — Send a poll (2-12 options) to a chat
- **get_poll_votes** — Read the votes of a poll the bridge saw live

## 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/rodrigopg/whatsapp-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Run:

```sh
bash -s -- --service --codex
```

2. Configure:

```sh
cp .env.example .env            # set API_AUTH_TOKEN (openssl rand -hex 32)
```

3. Start the server:

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

4. Sign in:

```sh
docker compose logs -f bridge   # scan the QR, or open http://127.0.0.1:8080/qr
```

5. Install:

```sh
curl -fsSL https://raw.githubusercontent.com/rodrigopg/whatsapp-mcp/main/install.sh | bash -s -- --codex
```

6. Start the server:

```sh
args = ["--directory", "/path/to/whatsapp-mcp/whatsapp-mcp-server", "run", "main.py"]
```

## Documentation

## What whatsapp-mcp does

whatsapp-mcp connects an AI assistant to a personal WhatsApp account and makes selected conversation data and messaging actions available through MCP. It supports contact lookup, chat and message search, filtered message retrieval, message context, recent interactions, active-chat reports, and native contact-card sharing. Messages can include text, images, videos, documents, and audio; the project also supports audio transcription.

The server adds workflow tools for personal follow-up management. It can identify open matters and messages awaiting review, record or close commitments, reopen matters when a conversation resumes, and generate a morning summary limited to items requiring action. It can create chase drafts, list them, send only an explicitly approved draft, or discard a pending draft.

## How it works

The bridge signs in to the user's WhatsApp account through the WhatsApp Web multidevice API, using the whatsmeow library. A QR code is used during pairing. WhatsApp data is retained in a local SQLite database, and the agent receives data when it calls the corresponding MCP tools.

Contact resolution handles both phone-based JIDs and WhatsApp's internal LID identifiers. The bridge normalizes contacts and merges corresponding chat records so searches and direct-chat lookups can use phone numbers more reliably. Sent text messages are persisted locally immediately, including on accounts where a multi-device echo is unavailable.

Some operations are asynchronous. For example, request_chat_history asks the online phone for older messages; use list_messages afterward to inspect the returned messages. The bridge also exposes local REST routes, including the backfill endpoint used for that operation.

## Setup and configuration

Claude Code installation is available through the project's plugin marketplace:

```text
/plugin marketplace add rodrigopg/claude-plugins
/plugin install whatsapp-mcp@rodrigopg
/whatsapp-mcp:setup
```

The setup flow installs the components, displays a QR code, and guides pairing from WhatsApp's linked-devices screen. A PNG QR fallback is stored in the bridge's store directory and is removed after pairing.

The REST API binds to loopback by default. BIND_ADDR can widen exposure, but a non-loopback address requires API_AUTH_TOKEN; requests then use a Bearer token. MCP_READONLY switches the bridge to a mode that rejects API operations that send or change WhatsApp data. MEDIA_ALLOWED_ROOTS can replace the default permitted locations for files sent by path. Local settings and stored message data are protected with restrictive filesystem permissions.

## Tools and capabilities

- Search contacts with name, phone-number, and LID-aware matching.
- List chats and messages with filters, pagination, and surrounding context.
- Request older chat history from the paired phone.
- Summarize daily actions and manage favorites.
- Track matters, review unprocessed messages, and advance the review cursor.
- Draft, approve, send, or discard follow-up messages.
- Send text, files, native contact cards, reactions, poll votes, and quoted replies.
- Retrieve direct chats, contact-related chats, last interactions, and activity by time period.

## Limitations and notes

The project is independent and is not affiliated with WhatsApp or Meta. Agents can encounter prompt injection in message content, so remote deployments should be treated as access to private data and account actions. Read-only mode reduces the available write surface but does not change the sensitivity of messages exposed to the agent.

Sending files by path is restricted to approved locations by default, including Downloads, temporary storage, and downloaded media. Files must be regular files no larger than 100 MB, and session and message databases remain outside the permitted media roots. Deleting another group member's message requires both stored author information and group-admin permission. Reacting to another member's message likewise requires that member to exist in the bridge's local history.

Favorites suggestions are proposals only, while chase drafts do not send until approved. A requested history backfill wakes the paired phone and returns results asynchronously.

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

