WhatsApp MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, search and reply to your WhatsApp chats from your AI, using your own number.
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.
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.16 npmISC
- 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.16 npm1ISC
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to read and search your own WhatsApp messages stored in a local SQLite database, captured live via a linked device.10 npmMIT
- 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.865 PyPIMIT