WhatsApp integration for LLM agents
Top 10.9% on sourcepulse
This project provides a Model Context Protocol (MCP) server that integrates WhatsApp with AI models like Claude, enabling users to search messages, manage contacts, and send messages/media directly from their AI interface. It targets AI power users and developers seeking to leverage conversational AI for personal communication management.
How It Works
The system comprises a Go-based WhatsApp bridge and a Python MCP server. The Go bridge connects to WhatsApp's web API via the whatsmeow
library, handling authentication (QR code scanning) and storing message history in a local SQLite database. The Python MCP server exposes tools for AI models to query this database and interact with WhatsApp through the Go bridge, facilitating message retrieval, contact searching, and sending messages or media.
Quick Start & Requirements
uv
(Python package manager)..ogg
Opus format for voice messages.git clone https://github.com/lharries/whatsapp-mcp.git
cd whatsapp-bridge && go run main.go
(scan QR code for authentication).claude_desktop_config.json
or mcp.json
for Claude or Cursor respectively.CGO_ENABLED=1
and install a C compiler (e.g., via MSYS2).Highlighted Details
search_contacts
, list_messages
, send_message
, and send_file
..ogg
Opus format using FFmpeg for voice messages.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
WhatsApp's multi-device API requires re-authentication approximately every 20 days. Users may encounter device limits imposed by WhatsApp. Initial message history loading can take several minutes. Sync issues may require re-authentication and database resets.
2 weeks ago
1 day