This MCP server allows you to integrate your personal WhatsApp account with Claude AI. It enables searching and reading messages (including media), managing contacts, and sending various types of messages. Your data is stored locally in a SQLite database and only shared with an LLM when explicitly accessed through tools you control.
Clone the repository
git clone https://github.com/lharries/whatsapp-mcp.git
cd whatsapp-mcp
Start the WhatsApp bridge
cd whatsapp-bridge
go run main.go
On first run, scan the displayed QR code with your WhatsApp mobile app to authenticate. You may need to re-authenticate approximately every 20 days.
Configure your AI application
Create a configuration file with the following JSON (replace {{PATH}} placeholders with your actual paths):
{
"mcpServers": {
"whatsapp": {
"command": "{{PATH_TO_UV}}",
"args": [
"--directory",
"{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server",
"run",
"main.py"
]
}
}
}
For Claude Desktop, save this as claude_desktop_config.json
in:
~/Library/Application Support/Claude/claude_desktop_config.json
For Cursor, save this as mcp.json
in:
~/.cursor/mcp.json
Restart your AI application
After restarting Claude Desktop or Cursor, WhatsApp should appear as an available integration.
Windows users need to enable CGO for the SQLite integration:
Install a C compiler
Install MSYS2 and add the ucrt64\bin
folder to your PATH.
Enable CGO and run the application
cd whatsapp-bridge
go env -w CGO_ENABLED=1
go run main.go
Once connected, you can interact with your WhatsApp through Claude using the following tools:
The server supports various media operations:
send_file
for images, videos, and documentssend_audio_message
for voice messages
Media messages initially only store metadata in the database. To access the actual media:
message_id
and chat_jid
from the message containing mediadownload_media
tool with these parameterswhatsapp-bridge/store/messages.db
and whatsapp-bridge/store/whatsapp.db
) and restartFor more Claude Desktop integration help, visit the MCP documentation.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "whatsapp" '{"command":"{{PATH_TO_UV}}","args":["--directory","{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server","run","main.py"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"whatsapp": {
"command": "{{PATH_TO_UV}}",
"args": [
"--directory",
"{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server",
"run",
"main.py"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"whatsapp": {
"command": "{{PATH_TO_UV}}",
"args": [
"--directory",
"{{PATH_TO_SRC}}/whatsapp-mcp/whatsapp-mcp-server",
"run",
"main.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect