WhatsApp Desktop MCP
An MCP server that connects WhatsApp Web to AI tools like Gemini and Claude, providing chat reading, messaging, and a local CRM with draft-and-approve workflows.
README
๐ 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_chatstool automatically attaches CRM tags, notes, and pipeline stages in one single requestโminimizing tool calling overhead. - ๐ Remote Tunnel Integration: Built-in
ngroktunneling 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/).
๐ ๏ธ How to Work & Installation
Option A: 1-Click Windows Setup Installer (Recommended)
- Download
WhatsApp_MCP_Setup.exefrom the Releases page. - Double-click
WhatsApp_MCP_Setup.exeto launch the Setup Wizard. - 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).
- Install the application to
- 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:8000.
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/your-username/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:8000/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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.