by lharries
Enables searching, reading, and sending personal WhatsApp messages and media through a Model Context Protocol (MCP) server, storing all data locally in SQLite and exposing controlled tools for LLMs like Claude.
The project provides an MCP server that connects to a personal WhatsApp account via the WhatsApp Web multidevice API (using the whatsmeow
Go library). It stores chat history in a local SQLite database and offers a set of standardized tools that LLM agents can invoke to query contacts, retrieve messages, and send text or media.
cd whatsapp-bridge && go run main.go
). Scan the QR code with your phone to authenticate.claude_desktop_config.json
for Claude Desktop or as mcp.json
for Cursor.Q: Do I need a WhatsApp Business account?
A: No, it works with any personal WhatsApp account linked via the multidevice web API.
Q: Is my data sent to the LLM automatically?
A: No, messages remain in the local SQLite DB and are only sent to the LLM when a tool explicitly requests them.
Q: What if FFmpeg is not installed?
A: Audio files can still be sent using send_file
, but they will not appear as playable voice messages.
Q: How often do I need to re‑authenticate?
A: The QR code login typically lasts ~20 days before requiring a fresh scan.
Q: What are the Windows-specific steps?
A: Enable CGO (go env -w CGO_ENABLED=1
) and install a C compiler (e.g., via MSYS2) before running the Go bridge.
This is a Model Context Protocol (MCP) server for WhatsApp.
With this you can search and read your personal Whatsapp messages (including images, videos, documents, and audio messages), search your contacts and send messages to either individuals or groups. You can also send media files including images, videos, documents, and audio messages.
It connects to your personal WhatsApp account directly via the Whatsapp web multidevice API (using the whatsmeow library). All your messages are stored locally in a SQLite database and only sent to an LLM (such as Claude) when the agent accesses them through tools (which you control).
Here's an example of what you can do when it's connected to Claude.
To get updates on this and other projects I work on enter your email here
Caution: as with many MCP servers, the WhatsApp MCP is subject to the lethal trifecta. This means that project injection could lead to private data exfiltration.
curl -LsSf https://astral.sh/uv/install.sh | sh
.ogg
Opus format. With FFmpeg installed, the MCP server will automatically convert non-Opus audio files. Without FFmpeg, you can still send raw audio files using the send_file
tool.Clone this repository
git clone https://github.com/lharries/whatsapp-mcp.git
cd whatsapp-mcp
Run the WhatsApp bridge
Navigate to the whatsapp-bridge directory and run the Go application:
cd whatsapp-bridge
go run main.go
The first time you run it, you will be prompted to scan a QR code. Scan the QR code with your WhatsApp mobile app to authenticate.
After approximately 20 days, you will might need to re-authenticate.
Connect to the MCP server
Copy the below json with the appropriate {{PATH}} values:
{
"mcpServers": {
"whatsapp": {
"command": "{{PATH_TO_UV}}", // Run `which uv` and place the output here
"args": [
"--directory",
"{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server", // cd into the repo, run `pwd` and enter the output here + "/whatsapp-mcp-server"
"run",
"main.py"
]
}
}
}
For Claude, save this as claude_desktop_config.json
in your Claude Desktop configuration directory at:
~/Library/Application Support/Claude/claude_desktop_config.json
For Cursor, save this as mcp.json
in your Cursor configuration directory at:
~/.cursor/mcp.json
Restart Claude Desktop / Cursor
Open Claude Desktop and you should now see WhatsApp as an available integration.
Or restart Cursor.
If you're running this project on Windows, be aware that go-sqlite3
requires CGO to be enabled in order to compile and work properly. By default, CGO is disabled on Windows, so you need to explicitly enable it and have a C compiler installed.
Install a C compiler
We recommend using MSYS2 to install a C compiler for Windows. After installing MSYS2, make sure to add the ucrt64\bin
folder to your PATH
.
→ A step-by-step guide is available here.
Enable CGO and run the app
cd whatsapp-bridge
go env -w CGO_ENABLED=1
go run main.go
Without this setup, you'll likely run into errors like:
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work.
This application consists of two main components:
Go WhatsApp Bridge (whatsapp-bridge/
): A Go application that connects to WhatsApp's web API, handles authentication via QR code, and stores message history in SQLite. It serves as the bridge between WhatsApp and the MCP server.
Python MCP Server (whatsapp-mcp-server/
): A Python server implementing the Model Context Protocol (MCP), which provides standardized tools for Claude to interact with WhatsApp data and send/receive messages.
whatsapp-bridge/store/
directoryOnce connected, you can interact with your WhatsApp contacts through Claude, leveraging Claude's AI capabilities in your WhatsApp conversations.
Claude can access the following tools to interact with WhatsApp:
The MCP server supports both sending and receiving various media types:
You can send various media types to your WhatsApp contacts:
send_file
tool to share any supported media type.send_audio_message
tool to send audio files as playable WhatsApp voice messages.
.ogg
Opus format.send_file
tool, but they won't appear as playable voice messages.By default, just the metadata of the media is stored in the local database. The message will indicate that media was sent. To access this media you need to use the download_media tool which takes the message_id
and chat_jid
(which are shown when printing messages containing the meda), this downloads the media and then returns the file path which can be then opened or passed to another tool.
whatsapp-bridge/store/messages.db
and whatsapp-bridge/store/whatsapp.db
) and restart the bridge to re-authenticate.For additional Claude Desktop integration troubleshooting, see the MCP documentation. The documentation includes helpful tips for checking logs and resolving common issues.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "whatsapp": { "command": "uv", "args": [ "--directory", "{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server", "run", "main.py" ], "env": {} } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by iFurySt
Provides authenticated access to XiaoHongShu (RedNote) notes, supporting keyword search, note retrieval by URL, and cookie persistence via a Model Context Protocol server.
by korotovsky
Provides a powerful Model Context Protocol interface for Slack workspaces, enabling message retrieval, search, and optional posting via Stdio or SSE transports without requiring bot permissions.
by ZubeidHendricks
Provides a standardized interface for interacting with YouTube content, enabling video retrieval, transcript access, channel and playlist management, and advanced analytics through the Model Context Protocol.
by InditexTech
Provides Microsoft Teams integration via the Model Context Protocol, enabling reading, creating, replying to messages and mentioning members.
by chigwell
Provides a full‑featured Telegram integration for MCP‑compatible clients, enabling programmatic access to chats, messages, contacts, profile management, and group administration.
by EnesCinr
Interact with Twitter to post tweets and search tweets programmatically via an MCP server.
by chaindead
Manages Telegram dialogs, messages, drafts, and read statuses via the Model Context Protocol, enabling AI assistants to query and interact with Telegram accounts.
by carterlasalle
Securely interfaces with the macOS Messages database via MCP, enabling LLMs to query, analyze, filter, and send iMessage or SMS communications with built‑in phone number validation, attachment handling, and group chat support.
by v-3
Enables large language models to interact with Discord channels, allowing them to send and read messages through Discord's API while keeping user control and security.