Skip to main content
Glama
srijonbasak

WhatsApp Desktop MCP

by srijonbasak

๐Ÿš€ WhatsApp Desktop MCP & Headless AI CRM Companion

An all-in-one local desktop companion that connects your WhatsApp Web directly to Google Gemini, Claude, Cursor, and other AI tools over the Model Context Protocol (MCP). Features an invisible local AI CRM with automated pipeline tracking and a human-in-the-loop "Draft & Approve" workflow.


โœจ Features

  • ๐Ÿ“ฑ Zero API Key Setup: Uses an embedded PyWebView browser wrapper to log in to WhatsApp Web directly. No Meta Cloud API setup or paid developer keys required!

  • ๐Ÿค– Headless AI CRM: Automatically tracks contacts, tags, and deal stages (Lead -> Negotiating -> Won) in a local, private JSON database (crm.json).

  • โœ๏ธ Draft & Approve Workflow: AI can draft intelligent responses directly inside your WhatsApp Web chat input box without hitting send. You retain 100% control to review and approve with one click.

  • โšก High Context Density: The read_chats tool automatically attaches CRM tags, notes, and pipeline stages in one single requestโ€”minimizing tool calling overhead.

  • ๐ŸŒ Remote Tunnel Integration: Built-in ngrok tunneling for connecting external AI models securely via HTTPS / Server-Sent Events (SSE).

  • ๐Ÿ”’ 100% Local & Private: All session cookies, message logs, and CRM data remain strictly on your local computer (.wa_session/).


Related MCP server: WAHA MCP

๐Ÿ“ธ Screenshots


๐Ÿ› ๏ธ How to Work & Installation

  1. Download WhatsApp_MCP_Setup.exe from the Releases page.

  2. Double-click WhatsApp_MCP_Setup.exe to launch the Setup Wizard.

  3. Click Install Now. The installer will automatically:

    • Install the application to %LOCALAPPDATA%\Programs\WhatsApp MCP Companion.

    • Create a Desktop Shortcut (WhatsApp MCP Companion).

    • Create a Start Menu Entry in Windows Start Menu.

    • Register the application in Windows Settings (Add/Remove Programs).

  4. On launch, log in to WhatsApp Web by scanning the QR code with your phone. Your companion server will start running locally at http://127.0.0.1:48211.

Option B: Running from Source (Developer Setup)

Prerequisites

  • Python 3.10+ installed on Windows.

Installation Steps

# 1. Clone the repository
git clone https://github.com/srijonbasak/wa-desktop-mcp.git
cd wa-desktop-mcp

# 2. Create and activate a virtual environment
python -m venv venv
.\venv\Scripts\activate

# 3. Install required dependencies
pip install -r requirements.txt

# 4. Launch the companion app
python run.py

๐Ÿ”Œ Connecting to Gemini / Claude / Cursor

1. Connecting via SSE Endpoint

In your MCP client settings (e.g. Gemini, Claude Desktop, or Cursor):

  • Transport Type: sse

  • Server URL: http://127.0.0.1:48211/sse (or your public ngrok URL if using remote tunneling).


๐Ÿ› ๏ธ Available MCP Tools

Tool Name

Type

Description

read_chats

Read

Lists active WhatsApp chats merged with local CRM deal stages and tags.

get_chat_history

Read

Scrapes the last 15 messages in the chat history for a specific contact.

draft_message

Write (Draft)

Types an AI-generated reply into the WhatsApp input box without sending it (Approve flow).

send_message

Write (Instant)

Sends a message directly to a target contact or phone number.

send_bulk_messages

Write (Bulk)

Sends rate-limited bulk messages across multiple recipients.

update_crm_contact

CRM

Updates a contact's deal stage (Lead, Negotiating, Won), tags, or notes in crm.json.


๐Ÿ“œ Building the Executable (.exe)

To compile the application into a single standalone .exe for distribution:

# 1. Install PyInstaller inside your virtual environment
pip install pyinstaller

# 2. Run the build script
python build_exe.py

The standalone executable will be generated at dist/WhatsApp_MCP_Companion.exe.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more details.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that enables AI to control WhatsApp Web via Puppeteer Stealth for reading and sending messages. It features human-like interaction patterns and anti-ban protections to securely manage chats and communications through natural language.
    3
    3 npm
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A self-hosted MCP server that connects AI clients to WhatsApp via the WAHA HTTP API. It enables users to manage sessions, search contacts, and send or receive messages and media directly through natural language interfaces.
    18 npm
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.
    9 npm
    MIT