WhatsApp MCP Server
An MCP server for your personal WhatsApp account: search and read chats, contacts, send messages and files through an agent
High risk
We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.
Why this level
- Sends messages and files on your behalf from a personal WhatsApp account
- Reads all personal chats, which creates an exfiltration risk under prompt injection
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/whatsapp-mcp-serverDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Assembled automatically, review before installing.
This entry is high risk, so there is no one-click install. Review the code and add the config by hand.
Run in a terminal
claude mcp add --transport stdio --env 'PATH_TO_UV=<PATH_TO_UV value>' --env 'PATH_TO_SRC=<PATH_TO_SRC value>' whatsapp-mcp-server -- uvx --directory ./whatsapp-mcp-server run main.pyOr add to the file .mcp.json, in the project
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
code --add-mcp '{"name":"whatsapp-mcp-server","type":"stdio","command":"uvx","args":["--directory","./whatsapp-mcp-server","run","main.py"],"env":{"PATH_TO_UV":"<PATH_TO_UV value>","PATH_TO_SRC":"<PATH_TO_SRC value>"}}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"whatsapp-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add whatsapp-mcp-server --env 'PATH_TO_UV=<PATH_TO_UV value>' --env 'PATH_TO_SRC=<PATH_TO_SRC value>' -- uvx --directory ./whatsapp-mcp-server run main.pyOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.whatsapp-mcp-server]
command = "uvx"
args = ["--directory", "./whatsapp-mcp-server", "run", "main.py"]
env = { PATH_TO_UV = "<PATH_TO_UV value>", PATH_TO_SRC = "<PATH_TO_SRC value>" }If the file already exists, append the block to the end.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"whatsapp-mcp-server": {
"type": "local",
"command": [
"uvx",
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"environment": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"whatsapp-mcp-server": {
"command": "uvx",
"args": [
"--directory",
"./whatsapp-mcp-server",
"run",
"main.py"
],
"env": {
"PATH_TO_UV": "<PATH_TO_UV value>",
"PATH_TO_SRC": "<PATH_TO_SRC value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
PATH_TO_UVrequired- Path to the uv executable
PATH_TO_SRCrequired- Path to the whatsapp-mcp source directory
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Clone lharries/whatsapp-mcp, start the bridge with go run main.go in the whatsapp-bridge folder and authenticate by QR code. Then add the whatsapp server to the agent's MCP config with the path to uv and to the whatsapp-mcp-server folder, and restart the agent.
Other ways from the author
git clone https://github.com/lharries/whatsapp-mcp.git
cd whatsapp-mcp/whatsapp-bridge
go run main.goThe first run of the bridge shows a QR code; scan it with WhatsApp on your phone. Keep the bridge running while you use the server.
This is third-party code. Review the repository files before installing.
What it does
The server connects to a personal WhatsApp account through the multidevice web API built on the whatsmeow library. It has two parts: a Go bridge that authenticates via QR code and stores message history in a local SQLite database, and a Python server that exposes MCP tools to the agent. The agent can search contacts and chats, read messages with context, send text to direct chats and groups, send images, video, documents and voice notes, and download attachments. Messages stay on your machine and reach the model only when the agent calls a tool that reads them.
Who it is for. For anyone who wants to work with their own WhatsApp chats from an agent: support, sales, personal automation.
Good fit when
- You need to find and read messages or attachments in your chats through an agent
- You need to send a message, file or voice note to a contact or group
- You need to pull the history with a person without scrolling by hand
Not a fit when
- You need the official WhatsApp Business API rather than a personal account
- You cannot link your personal number as an extra device
Example request
Find my latest chat with Anna and send her a message that the meeting moves to tomorrowLimitations
Works only with a personal account through device linking; it does not use the official business channel. It needs Go and Python, and the bridge and server must run at the same time. Roughly every 20 days you re-authenticate by QR code, and WhatsApp caps the number of linked devices. WhatsApp voice notes require FFmpeg. The author warns about data exfiltration through prompt injection: an agent that can both read chats and send messages can leak data if fed malicious text.
How to disable. Remove the whatsapp block from the agent's MCP configuration and stop the Go bridge. To unlink the device, open WhatsApp on your phone, go to Linked Devices, and remove the session. The local databases can be deleted from the whatsapp-bridge/store folder.
MCP
- Transport
- stdio
- Authentication
- not required
Security check
- Sends messages and files on your behalf from a personal WhatsApp account
- Reads all personal chats, which creates an exfiltration risk under prompt injection
README in short
The README covers a two-part setup: a Go bridge that connects to WhatsApp, authenticates by QR code and keeps a local SQLite database, and a Python MCP server. It then gives the JSON config for Claude Desktop and Cursor with paths to uv and the server folder. It lists the tools: contact and chat search, reading messages and their context, sending messages, files and voice notes, and downloading media. Separate sections cover the Windows build with CGO, media handling and common authentication issues. MIT licensed.
FAQ
Where are messages stored?
In a local SQLite database in whatsapp-bridge/store. They reach the model only when the agent reads them through a tool.
Is this the official WhatsApp Business API?
No. The server connects to a personal account via the multidevice web API, like an ordinary linked device.
Related
A self-hosted knowledge base with block-level references and a built-in MCP server for connecting AI agents to your notes
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI