WhatsApp MCP
About This Server
An MCP server that lets AI agents send and receive WhatsApp messages. Connects via WhatsApp Web, supporting text message sending, reading message history, and contact management — enabling AI-powered WhatsApp automation.
Installation
npx -y whatsapp-mcpOfficial README installation guide
Prerequisites
- Go
- Python 3.6+
- Anthropic Claude Desktop app (or Cursor)
- UV (Python package manager), install with
curl -LsSf https://astral.sh/uv/install.sh | sh - FFmpeg (_optional_) - Only needed for audio messages. If you want to send audio files as playable WhatsApp voice messages, they must be in
.oggOpus format. With FFmpeg installed, the MCP server will automatically convert non-Opus audio files. Without FFmpeg, you can still send raw audio files using thesend_filetool.
Steps
1. Clone this repository
git clone https://github.com/lharries/whatsapp-mcp.git
cd whatsapp-mcp2. Run the WhatsApp bridge
Navigate to the whatsapp-bridge directory and run the Go application:
cd whatsapp-bridge
go run main.goThe 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.
3. 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.json4. Restart Claude Desktop / Cursor
Open Claude Desktop and you should now see WhatsApp as an available integration.
Or restart Cursor.
Windows Compatibility
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.
Steps to get it working:
1. 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.
2. Enable CGO and run the app
cd whatsapp-bridge
go env -w CGO_ENABLED=1
go run main.goWithout this setup, you'll likely run into errors like:
> Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work.
Frequently Asked Questions
How does WhatsApp MCP work? Is it safe?
It connects via the WhatsApp Web protocol. On first launch, you'll need to scan a QR code to link your WhatsApp account. The MCP server runs locally and messages are not routed through third-party servers. Using a dedicated WhatsApp account is recommended to avoid affecting your personal account.
Can WhatsApp MCP send bulk messages?
It supports sending personalized messages to multiple contacts sequentially. However, WhatsApp has anti-spam mechanisms — sending too many messages in a short time may result in account restrictions. Control your sending frequency to avoid triggering rate limits.
Can WhatsApp MCP read chat history?
Yes. It can read recent chat message lists and the content of specific conversations, allowing AI agents to understand context before replying or analyzing. It only reads messages already available in your WhatsApp — it does not access end-to-end encrypted cloud backups.