WhatsAppMCP
The WhatsApp MCP Server enables sending and receiving WhatsApp messages, including text and media, through a custom REST API, with all data stored securely in a local SQLite database.
Install / Use
claude mcp add samueljayasingh -- npx -y github:samueljayasingh/WhatsAppMCPIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of WhatsAppMCP
WhatsAppMCP scores 79/100 on our quality scale, 529th of 590 Data & Analytics skills we index.
Its MCP Server is 6.4 KB long, well organised into 20 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so WhatsAppMCP is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
WhatsAppMCP compared with similar skills
All 4 of these similar skills score higher than WhatsAppMCP; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| WhatsAppMCP (this skill)by samueljayasingh | 79 | 3 | 3mo ago | MCP Server |
| claude-memby thedotmack | 100 | 102.7k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 101.5k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.7k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.5k | today | CLAUDE.md |
Frequently asked questions
- How do I install WhatsAppMCP?
- Run
claude mcp add samueljayasingh -- npx -y github:samueljayasingh/WhatsAppMCP. The install tabs above show the steps for each supported agent. - Which AI agents does WhatsAppMCP work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is WhatsAppMCP safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is WhatsAppMCP still maintained?
- The repository was last updated about 3 months ago, so WhatsAppMCP is actively maintained.
Skill content
View source on GitHubWhatsApp MCP Server
This is a Model Context Protocol (MCP) server for WhatsApp, with a custom REST app to send messages to specific phone numbers.
With this server, you can send WhatsApp messages (including text, images, videos, documents, and audio messages) to individuals or groups. The app connects directly to your personal WhatsApp account via the WhatsApp web multidevice API (using the whatsmeow library). All your messages are stored locally in a SQLite database.
Installation
Prerequisites
- Go (for the WhatsApp bridge)
- Python 3.6+ (for the Flask app)
- 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. - SQLite (included by default for data storage)
Steps
1. Clone the repository
Start by cloning the repository to your local machine.
git clone https://github.com/SamuelJayasingh/WhatsApp-MCP.git
cd WhatsApp-MCP
2. Run the WhatsApp Bridge
Navigate to the whatsapp-bridge directory and run the Go application to establish a connection with WhatsApp.
cd whatsapp-bridge
go run main.go
The first time you run this, the app will display a QR code in the terminal. You will need to scan the QR code with your WhatsApp mobile app to authenticate the connection.
- After authentication, the bridge will remain connected for approximately 20 days before you may need to re-authenticate.
3. Run the Flask App
After setting up the WhatsApp bridge, navigate to the whatsapp-mcp-server directory and start the Flask server.
cd whatsapp-mcp-server
python app.py
This will start a Flask API server that allows you to send WhatsApp messages to a specific phone number or group. The Flask app exposes endpoints for sending text, images, audio, and documents.
Windows Compatibility
If you're running this on Windows, ensure that CGO is enabled because the Go application depends on SQLite, which requires CGo to be enabled. By default, CGO is disabled on Windows.
Steps to Enable CGO and Install Dependencies
-
Install a C compiler: We recommend using MSYS2 to install a C compiler. Follow the MSYS2 guide to get started.
-
Enable CGO and run the app: Once MSYS2 is installed, make sure to set up your
ucrt64\binfolder in yourPATHand enable CGO:cd whatsapp-bridge go env -w CGO_ENABLED=1 go run main.go
Without this setup, you will encounter errors like:
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work.
Architecture Overview
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 an SQLite database. It serves as the bridge between WhatsApp and the Flask app. -
Flask MCP Server (
whatsapp-mcp-server/): A Python Flask server that allows you to send WhatsApp messages, both text and media, to specific phone numbers or groups.
Data Storage
- All message history is stored in a SQLite database located in the
whatsapp-bridge/store/directory. - The database contains tables for storing chats and messages.
- Messages are indexed for efficient searching and retrieval.
Usage
Once the WhatsApp bridge and Flask app are running, you can use the REST API to interact with your WhatsApp account and send messages.
Flask API Endpoints
- POST
/send_message: Send a WhatsApp message to a specified phone number or group JID. - POST
/send_file: Send a file (image, video, raw audio, document) to a specified recipient. - POST
/send_audio_message: Send an audio file as a WhatsApp voice message (requires the file to be an.oggOpus file or FFmpeg must be installed). - GET
/download_media: Download media from a WhatsApp message and get the local file path.
Media Handling Features
The MCP server supports both sending and receiving various media types:
Media Sending
-
Images, Videos, Documents: Send these media types using the
send_fileendpoint. -
Voice Messages: Send audio files as WhatsApp voice messages using the
send_audio_messageendpoint.- For optimal compatibility, audio files should be in
.oggOpus format. - With FFmpeg installed, the system will automatically convert other audio formats (MP3, WAV, etc.) to
.oggOpus format. - Without FFmpeg, raw audio files can be sent using the
send_filetool but they won’t appear as playable voice messages.
- For optimal compatibility, audio files should be in
Media Downloading
- Media metadata is stored in the local database. To access this media, use the
download_mediatool by providing themessage_idandchat_jid(both are shown when printing messages containing media). - The tool will download the media and return the local file path, which can be used to open or share the file.
Troubleshooting
Authentication Issues
- QR Code Not Displaying: If the QR code does not appear, try restarting the authentication script. If issues persist, verify that your terminal supports QR code display.
- WhatsApp Already Logged In: If you’re already logged in, the Go bridge will reconnect without showing the QR code.
- Device Limit Reached: WhatsApp limits the number of devices that can be linked. If you reach the limit, you will need to remove a device from WhatsApp on your phone (Settings > Linked Devices).
- No Messages Loading: After the initial authentication, it may take a few minutes to load all your message history, especially if you have many chats.
Connection Issues
- Ensure both the Go WhatsApp bridge and Flask server are running for proper communication.
- If your WhatsApp messages get out of sync, delete both database files (
whatsapp-bridge/store/messages.dbandwhatsapp-bridge/store/whatsapp.db) and restart the Go bridge to re-authenticate.
Acknowledgements
This project is based on the original work by lharries. Modifications were made to remove the integration with Claude and replace it with a custom Flask app for sending WhatsApp messages.
Related Skills
claude-mem
102.7kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
101.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
77.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.5kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
