Loading...
An MCP server for WhatsApp enabling message retrieval, contact search, and message sending via the WhatsApp web API, storing data locally in SQLite.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
An MCP server for WhatsApp enabling message retrieval, contact search, and message sending via the WhatsApp web API, storing data locally in SQLite.
This server offers convenient access to WhatsApp data but requires careful management of tool permissions to mitigate the risk of unintended actions or data exfiltration. It is safer for read-only operations but becomes riskier when message sending and file operations are enabled. Regular security audits and monitoring are recommended.
Performance depends on the size of the WhatsApp message history and the efficiency of the SQLite database queries. Large message histories may result in slower search and retrieval times.
The primary cost consideration is the computational resources required to run the Go bridge and Python server. There are no direct API costs associated with WhatsApp.
{
"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"
]
}
}
}CGO_ENABLEDsearch_contactsSearches for contacts by name or phone number.
Read-only operation, no side effects.
list_messagesRetrieves messages with optional filters and context.
Read-only operation, no side effects.
list_chatsLists available chats with metadata.
Read-only operation, no side effects.
get_chatGets information about a specific chat.
Read-only operation, no side effects.
get_direct_chat_by_contactFinds a direct chat with a specific contact.
Read-only operation, no side effects.
get_contact_chatsLists all chats involving a specific contact.
Read-only operation, no side effects.
get_last_interactionGets the most recent message with a contact.
Read-only operation, no side effects.
get_message_contextRetrieves context around a specific message.
Read-only operation, no side effects.
send_messageSends a WhatsApp message to a specified phone number or group JID.
Sends messages, potentially leading to unintended actions.
send_fileSends a file (image, video, raw audio, document) to a specified recipient.
Sends files, potentially leading to unintended sharing of sensitive information.
send_audio_messageSends an audio file as a WhatsApp voice message.
Sends audio messages, potentially leading to unintended sharing of sensitive information.
download_mediaDownloads media from a WhatsApp message and gets the local file path.
Downloads media to local storage, potentially exposing sensitive content.
QR Code
cloud
This server offers convenient access to WhatsApp data but requires careful management of tool permissions to mitigate the risk of unintended actions or data exfiltration. It is safer for read-only operations but becomes riskier when message sending and file operations are enabled. Regular security audits and monitoring are recommended.
The agent's autonomy depends on the configured tool access. Granting access to send_message and send_file tools enables the agent to initiate actions without explicit user confirmation.
Production Tip
Implement robust error handling and logging to monitor the server's behavior and identify potential issues in a production environment.
You will need to re-authenticate approximately every 20 days by scanning a new QR code.
You'll need to remove an existing device from WhatsApp on your phone (Settings > Linked Devices).
It can take several minutes for your message history to load, especially if you have many chats.
Delete both database files (`whatsapp-bridge/store/messages.db` and `whatsapp-bridge/store/whatsapp.db`) and restart the bridge to re-authenticate.
FFmpeg is only needed if you want to send audio files as playable WhatsApp voice messages and the audio files are not already in `.ogg` Opus format.
Your messages are stored locally in a SQLite database. Ensure your system is secure to protect this data. Be cautious of project injection risks.
No, this is designed to connect to a single personal WhatsApp account at a time.
Luke Harries
Lead Developer