WhatsApp MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WhatsApp MCP Server find my last messages with Sarah about the dinner plans"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WhatsApp MCP Server
A native Model Context Protocol (MCP) server for WhatsApp on macOS.
This server bridges local WhatsApp Catalyst SQLite storage (ChatStorage.sqlite) with native OS messaging, enabling AI agents to read conversations, search message history, inspect media attachments, and send/draft messages with hardware-enforced biometric authorization (Apple Touch ID / Windows Hello).
Key Features
Read-Only SQLite Storage Parsing: Connects directly to WhatsApp's sandboxed CoreData SQLite database using URI mode (
file:...?mode=ro) with read-only pragmas and automatic WAL lock snapshot fallback. Never locks or alters the desktop client database.Hardware-Enforced Biometrics: All message sending operations are gated by native OS biometric prompts (macOS Touch ID / Windows Hello) with interactive recipient and text preview before dispatch.
Flexible Message Dispatch:
auto: Focuses WhatsApp, stages the message, and automatically dispatches via native AppleScript Return keystroke.draft: Opens the chat and stages the message text in the input box for manual human review and dispatch.
Rich Media & Context Resolution: Inspects images, documents, PDFs, voice notes, and contact cards, resolving local filesystem paths and disk presence.
Cross-Version CoreData Schema Adaptation: Automatically inspects table metadata at runtime to adapt across macOS Catalyst updates.
Related MCP server: WhatsApp MCP Server (TypeScript)
Architectural Overview
┌────────────────────────────────┐
│ AI Agent / MCP Client │
│ (Claude, Cursor, Antigravity) │
└───────────────┬────────────────┘
│ stdio (JSON-RPC)
▼
┌────────────────────────────────┐
│ WhatsApp MCP Server │
└───────┬────────────────┬───────┘
│ │
[Read-Only Layer] │ │ [Write Layer]
(Zero-Friction SQLite) │ │ (Biometric Guard)
▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ ChatStorage.sqlite│ │ Native Biometrics │
│ (mode=ro + WAL │ │ (Touch ID / Hello)│
│ snapshot safe) │ └─────────┬─────────┘
└───────────────────┘ │
▼
┌───────────────────┐
│ WhatsApp.app │
│ (URL Scheme + UI) │
└───────────────────┘Prerequisites & Permissions
1. macOS Full Disk Access (FDA)
WhatsApp for macOS stores its SQLite database inside a sandboxed Group Container:
~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared/ChatStorage.sqlite
To allow the MCP server (or your terminal / IDE) to read the database:
Open System Settings -> Privacy & Security -> Full Disk Access.
Click the
+button.Add your terminal application (e.g., Terminal, iTerm2, Ghostty) or your MCP client host (e.g., Cursor, VS Code, Antigravity) or Python executable.
Restart your terminal / IDE.
To verify access at any time, run:
whatsapp-mcp --statusInstallation
Using uv (Recommended)
# Clone the repository
git clone https://github.com/hemelbesem90s/WhatsApp-MCP.git
cd WhatsApp-MCP
# Create environment and install
uv venv .venv --python 3.13
source .venv/bin/activate
uv pip install -e ".[dev]"Using standard pip
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Configuration
Settings can be specified in a .env file or passed as environment variables:
Variable | Type | Default | Description |
| Path |
| Path to WhatsApp SQLite database |
| Path |
| Path to WhatsApp media directory |
| bool |
| Enable write tools ( |
| bool |
| Require Touch ID / Windows Hello for write actions |
| str |
| Message dispatch mode ( |
| str |
| Logging level ( |
MCP Tool Reference
Read Tools (Zero Friction, Read-Only)
Tool Name | Parameters | Description |
| (none) | Tests WhatsApp installation, database readability, and Full Disk Access status with summary stats. |
|
| Lists recent 1:1 and group chats with unread counts and message previews. |
|
| Retrieves full chat metadata, group membership roster, and media breakdown. |
|
| Lists messages across chats or within a chat with rich timestamp/media filtering. |
|
| Full-text substring search across message history. |
|
| Searches contacts by name, push name, phone number, or JID. |
|
| Retrieves chronological conversation context surrounding a message ID. |
|
| Lists media attachments with local file disk verification. |
|
| Resolves absolute filesystem path, disk presence, size, and MIME type. |
Write Tools (Biometric-Gated)
Tool Name | Parameters | Description |
|
| Sends a message to a phone number or JID via native desktop WhatsApp. Gated by Touch ID. |
|
| Stages a message draft in WhatsApp for manual human review without sending. Gated by Touch ID. |
Client Integration Examples
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"whatsapp": {
"command": "/path/to/whatsapp-mcp/.venv/bin/whatsapp-mcp",
"args": [],
"env": {
"WHATSAPP_MCP_ENABLE_WRITE_TOOLS": "true",
"WHATSAPP_MCP_REQUIRE_BIOMETRIC": "true",
"WHATSAPP_MCP_SEND_MODE": "auto"
}
}
}
}Antigravity / Gemini CLI (mcp_config.json)
{
"mcpServers": {
"whatsapp": {
"command": "/path/to/whatsapp-mcp/.venv/bin/whatsapp-mcp",
"args": [],
"env": {
"WHATSAPP_MCP_ENABLE_WRITE_TOOLS": "true",
"WHATSAPP_MCP_REQUIRE_BIOMETRIC": "true",
"WHATSAPP_MCP_SEND_MODE": "auto"
}
}
}
}Development & Testing
# Run unit test suite with coverage
make test
# Run linter
make lint
# Run type checker
make typecheck
# Full test and verification suite
make checkLicense
MIT License. See LICENSE for details.
Available Tools
11 toolscheck_connection_statusA
Check whether WhatsApp.app is installed, if the ChatStorage.sqlite database is accessible, and whether macOS Full Disk Access is granted (with setup instructions if needed). Returns summary statistics including chat count, message count, media count, and latest message date.
Inputs: no named parameters.
draft_messageA
Open WhatsApp with the recipient focused and message body pre-filled without pressing Enter. Allows the user to review, edit, or manually send the message in the app. Requires explicit user confirmation (confirm=true) and native biometric verification.
Inputs: text (required), recipient (required), confirm.
get_chatA
Retrieve detailed metadata for a WhatsApp chat session by JID, phone number, or contact name. Includes unread count, message count, group membership roster (for group chats), and media breakdowns.
Inputs: chat_id (required).
get_media_pathB
Resolve the absolute filesystem path for a media attachment by media ID or message ID. Checks disk existence, file size, and MIME type.
Inputs: media_id, message_id.
get_message_contextA
Retrieve the conversational context around a specific message. Returns the target message along with preceding and succeeding messages in chronological order.
Inputs: message_id (required), after, before.
list_chatsA
List recent 1:1 and group chat sessions from WhatsApp's local storage. Includes contact name, JID, unread count, last message date, last message text preview, archived status, and pinned status.
Inputs: limit, offset, search, unread_only, +1 more.
list_mediaA
List media attachments (images, PDFs, documents, audio clips, videos) from WhatsApp storage. Verifies whether the media files exist locally on disk and returns sizes, captions, and MIME types.
Inputs: limit, offset, chat_id, media_type.
list_messagesA
List messages from WhatsApp's local storage with rich filtering. Filter by chat, date range (ISO 8601), sender ('me' vs 'other'), media type, or text search. Returns message ID, stanza ID, text, timestamps, sender info, read status, and media details.
Inputs: limit, order, since, until, +5 more.
search_contactsA
Search contacts across WhatsApp chat sessions and contact records. Returns matched contact names, phone numbers, JIDs, and last interaction timestamps.
Inputs: query (required), limit.
search_messagesB
Search message history for specific keywords or phrases. Returns matching messages with full conversation context and timestamps.
Inputs: query (required), limit, offset, chat_id.
send_messageA
Send a WhatsApp message to a phone number or JID. Requires explicit user confirmation (confirm=true) and native OS biometric verification (Touch ID / Windows Hello). Dispatches message using the native desktop WhatsApp application.
Inputs: text (required), recipient (required), confirm.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target clearly distinct resources: chats, messages, contacts, media, plus two write actions (send vs draft) that are well differentiated by their confirmation semantics. The main overlap is search_messages versus list_messages, which already advertises a text search filter, so an agent could plausibly pick either for the same query.
Every tool follows a consistent snake_case verb_noun pattern (list_chats, get_chat, search_messages, get_media_path, send_message, draft_message), making intent predictable from the name alone.
Eleven tools sit squarely in the ideal 3-15 range and each covers a distinct step of the read/search/send workflow. Nothing feels padded or missing at the count level.
The surface covers connection diagnostics, chat/message/contact/media discovery, context retrieval, and message dispatch, which is close to full lifecycle for a local WhatsApp reader. Minor gaps remain: no media content download or send-attachment capability, no reply/quote targeting, and no way to mark chats read.
Maintenance
Related MCP Connectors
Free WhatsApp MCP server for ChatGPT and Claude: read and search chats, every send you approve.
WhatsApp for Claude, ChatGPT or any AI agent: search, reply and send. Personal or Business API.
Read-only WhatsApp MCP for your AI agent: it reads the chats you choose. Try the public demo.
Your own WhatsApp as an MCP server: read, search and send from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with your personal WhatsApp account, allowing them to search messages and contacts, retrieve chat history, and send messages to individuals or groups. Uses WhatsApp Web API with local data storage for privacy and security.ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with your personal WhatsApp account to search messages, list chats, and send messages. It stores all authentication and message data locally using SQLite for privacy and direct multi-device API connection.1ISC
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to read and search your own WhatsApp messages stored in a local SQLite database, captured live via a linked device.MIT
- AlicenseAqualityCmaintenanceMCP server that gives AI agents read and write access to WhatsApp on macOS, reading local chat history offline and sending messages via pre-filled drafts with explicit user confirmation.8MIT