askmywa
<img src="whatsapp-go/assets/logo.svg" width="96" height="96" alt="askmywa logo">
# askmywa — WhatsApp MCP for Claude
**[askmywa.com](https://askmywa.com)** · *[Version française](README.fr.md)* · [Privacy policy](https://askmywa.com/privacy/)
[](https://glama.ai/mcp/servers/Ruwad-io/askmywa)
An [MCP](https://modelcontextprotocol.io) server for your personal WhatsApp account, as a single Go binary for Mac, Windows and Linux, including Raspberry Pi.
It links to WhatsApp as a companion device through [whatsmeow](https://github.com/tulir/whatsmeow), keeps a local archive of your messages, and lets an assistant such as Claude Desktop search them, read them, download attachments and, after your approval, send messages and files.
[Watch the 53-second demo](https://askmywa.com/#demo) · [See an illustrated example with its source messages](https://askmywa.com/#example). Both use fictional messages. The video presents actual local search and preview results in an illustrated interface, with no WhatsApp pairing or send.
## What it does
- **Local archive.** Messages received from WhatsApp are stored in a SQLite database on your computer. When your assistant calls a tool, the returned messages and contact details are sent to its provider (Anthropic for Claude, OpenAI for ChatGPT and Codex), under that provider's privacy policy. askmywa runs no server and collects none of them.
- **Real names.** Senders are resolved when messages are stored, from your address book first, then the name people set for themselves. Phone numbers and WhatsApp's hidden `@lid` identifiers are merged into one contact.
- **Full-text search.** Accent- and case-insensitive: `ecole` finds `école`.
- **Typed tools.** Every tool declares its input and output schema, paginates with a cursor and returns errors that say how to fix the call.
- **Sending previews by default.** `send_message`, `send_file` and `send_audio_message` return a preview unless `confirm=true` is supplied. The assistant is instructed to show you the exact recipient and content and obtain your approval before confirming. askmywa cannot independently verify that the assistant obtained your agreement; there is no separate approval window.
- **No network port by default.** The MCP server talks to the WhatsApp daemon over a private Unix socket. Files can only be sent from one configured folder.
- **Server mode and webhooks, if you want them.** On your own server, askmywa can run send-only (it keeps no message), behind a private HTTP door with a secret and send caps, and post each new message to another app as a signed webhook. See [Server mode](#server-mode-send-only-a-private-http-door-and-webhooks).
> **Caution.** Like any MCP server that reads private data and can send messages, this one is exposed to [the lethal trifecta](https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/): a prompt injection hidden in a message could try to make the assistant leak data. The preview-and-confirm flow relies on the assistant following its instructions, so read previews before approving them.
## How it differs from lharries/whatsapp-mcp
This is a rewrite, not a patch set. The tool names and the WhatsApp library are the same, so assistants and prompts written for the original keep working.
| | [lharries/whatsapp-mcp](https://github.com/lharries/whatsapp-mcp) | This project |
|---|---|---|
| Components | Go bridge plus a Python MCP server run with `uv` | One Go binary |
| Link between them | HTTP API on port 8080 of every network interface, no authentication | Private Unix socket, readable only by you |
| Sender names | Looked up at read time from the chat list; group members and `@lid` senders often show as raw numbers | Resolved when stored, from the address book first; phone numbers and `@lid` identities merged into one contact |
| Search | `LIKE` on message text, accent-sensitive, unindexed | SQLite FTS5 index, accent- and case-insensitive |
| Tool results | Mostly formatted text, page numbers | Typed JSON with schemas, cursor pagination with `has_more` |
| Sending | Immediate | Preview by default; send with `confirm=true` |
| Files that can be sent | Any readable path | Only files under one configured folder |
| Running it | `go run main.go` in an open terminal | A background service with rotated logs on Mac, Windows and Linux |
| Installing it | Go, Python, `uv`, a terminal QR code and a hand-edited JSON config | A Claude Desktop extension, linked with a code typed on the phone |
An existing install of the original can switch without pairing again: the new daemon copies the old session and imports the old history, and never writes to the old files. See [Migrating from the original project](whatsapp-go/README.md#migrating-from-the-original-project).
## Install in Claude Desktop (Mac and Windows, no terminal)
1. Download [`askmywa.mcpb`](https://github.com/Ruwad-io/askmywa/releases/latest/download/askmywa.mcpb), the latest version, from [askmywa.com](https://askmywa.com) or the [releases](https://github.com/Ruwad-io/askmywa/releases/latest). The same file works on Mac and Windows.
2. Double-click it. Claude Desktop opens and asks you to confirm the install.
3. In a new conversation, write: **Connect my WhatsApp.** Claude asks for permission to use askmywa's tools: choose the permissions you are comfortable with. Sending previews by default; the assistant is instructed to ask for your approval before confirming a send.
4. Claude asks for your phone number, then gives you an 8-character code. On your phone, open WhatsApp > Settings (on Android, the ⋮ menu) > Linked devices > Link a device > **Link with phone number instead**, and type the code.
Messages supplied by WhatsApp start appearing over the next few minutes, and the link keeps working after a restart. WhatsApp may supply only part of your older history: searches cover the local archive, not necessarily every message on your phone. Ask the assistant for the oldest and newest stored messages in a chat before relying on a summary. To send a file, put it in the `Documents/WhatsApp MCP` folder first (you can choose another folder in the extension's settings).
To remove it, ask Claude to **disconnect WhatsApp from this computer** (it unlinks the computer, stops the background service and, if you want, deletes the stored messages), then uninstall the extension in Claude Desktop's settings.
> The Mac app is signed and notarized by Apple. The Windows app is not code-signed yet: if Windows shows a SmartScreen warning, choose *More info* > *Run anyway*.
>
> It talks to WhatsApp through an unofficial interface, the same way WhatsApp Web automation tools do. WhatsApp's terms do not allow this, and WhatsApp could restrict an account that uses it.
## Install without the extension (Mac, Windows, Linux)
On Linux, a Raspberry Pi or a Mac, one command downloads the right build, checks its SHA-256, installs it (on a Mac, `askmywa.app` in `~/Applications`, with the command linked in `~/.local/bin`), starts the background service and offers to link WhatsApp:
```bash
curl -fsSL https://github.com/Ruwad-io/askmywa/releases/latest/download/install.sh | sh
```
Run it again to upgrade. Add `sh -s -- --no-service` after the pipe to install only the binary. If the ChatGPT desktop app or Codex is set up for your user (`~/.codex`), the installer also adds askmywa to their MCP servers; quit and reopen ChatGPT to use it, or pass `--no-codex` to skip this.
With [Homebrew](https://brew.sh) on Mac or Linux:
```bash
brew install ruwad-io/tap/askmywa
askmywa install-service
askmywa link
```
Or download the archive for your system from the [latest release](https://github.com/Ruwad-io/askmywa/releases/latest):
| System | Archive |
|---|---|
| Mac (Apple Silicon / Intel) | `darwin-arm64` / `darwin-amd64` |
| Windows (x64 / ARM) | `windows-amd64` / `windows-arm64` |
| Linux, Raspberry Pi 3, 4 and 5 | `linux-amd64` / `linux-arm64` |
| Raspberry Pi with a 32-bit kernel (Pi 2, older Pi OS) | `linux-armv7` |
You can also build from source with Go 1.26 or newer:
```bash
git clone https://github.com/Ruwad-io/askmywa.git
cd askmywa/whatsapp-go
mkdir -p ~/.local/bin
go build -o ~/.local/bin/askmywa .
```
After a manual download or a build, install the background service, which starts at login (a launchd agent on Mac, a systemd user service on Linux, a scheduled task on Windows), then link WhatsApp:
```bash
~/.local/bin/askmywa install-service
~/.local/bin/askmywa link
```
`link` asks for your phone number and prints an 8-character code. On your phone, open WhatsApp > Settings (on Android, the ⋮ menu) > Linked devices > Link a device > **Link with phone number instead**, and type the code. You can also ask Claude to connect WhatsApp instead.
Add the server to Claude Desktop's `claude_desktop_config.json` (Mac: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`) and restart Claude Desktop. The path must be absolute: `~` is not expanded there.
```json
{
"mcpServers": {
"whatsapp": {
"command": "/Users/YOU/.local/bin/askmywa",
"args": ["serve"]
}
}
}
```
On Windows, use the full path to `askmywa.exe`, with doubled backslashes. Cursor uses the same block in `~/.cursor/mcp.json`, and Claude Code accepts it with `claude mcp add whatsapp -- /path/to/askmywa serve`. For Codex and the ChatGPT desktop app, which share `~/.codex/config.toml`: `codex mcp add askmywa -- /path/to/askmywa serve`.
### On a Raspberry Pi or another always-on machine
A Pi left on can keep receiving messages while your laptop sleeps; it does not guarantee a complete history. Connect to the Pi over SSH and run the one-line installer above: it installs the service, asks systemd to keep it running after you log out, and links WhatsApp with a code typed on your phone, so no QR code or screen is needed.
Claude Desktop on your laptop can then use the Pi over SSH, provided you log in to the Pi with an SSH key, without a password prompt:
```json
{
"mcpServers": {
"whatsapp": {
"command": "ssh",
"args": ["pi@raspberrypi.local", "/home/pi/.local/bin/askmywa", "serve"]
}
}
}
```
Files to send must then be on the Pi, in its send folder.
## Server mode: send-only, a private HTTP door and webhooks
askmywa can also run on a server for **one trusted app of yours**: for
example a personal assistant app that drafts replies and lets you send them
on one click. Three options, each off by default, combine into a second
linked device that keeps nothing and only does what that app needs.
[askmywa.com/server](https://askmywa.com/server/) shows the same thing step by step.
**Send-only.** `--send-only` (or `ASKMYWA_SEND_ONLY=1`) keeps **no message**:
no live message, no history sync, no copy of what is sent. Only the WhatsApp
session and contact names are stored (and group names). It refuses
`--legacy-store`, since there is no history to import into.
**The HTTP door.** `--http-addr ADDR` (or `ASKMYWA_HTTP_ADDR`) serves three
operations over plain HTTP. The secret is read from `ASKMYWA_HTTP_TOKEN` only
(32+ characters, never a flag, so it never shows in `ps`), and every request
needs `Authorization: Bearer <secret>`.
| Request | Answer |
|---|---|
| `GET /v1/status` | `{"connected": true, "logged_in": true, "send_only": true}` |
| `GET /v1/contact?phone=%2B33600000001` | `{"name": "…"}`: the name **you** gave that number in your address book, or `null`. A push or business name is chosen by the other person and never vouches for a number. |
| `POST /v1/send` with `{"to": "+33600000001", "text": "…", "idempotency_key": "…"}` | `{"message_id": "…", "timestamp": "…"}`: one text to one person; no group, no file, nothing else in the body. The text leaves exactly as given (up to 4 000 characters). |
```bash
export ASKMYWA_HTTP_TOKEN=… # the same secret the app holds
curl -s http://askmywa.internal:8080/v1/status -H "Authorization: Bearer $ASKMYWA_HTTP_TOKEN"
curl -s -G http://askmywa.internal:8080/v1/contact --data-urlencode 'phone=+33600000001' \
-H "Authorization: Bearer $ASKMYWA_HTTP_TOKEN"
curl -s http://askmywa.internal:8080/v1/send -H "Authorization: Bearer $ASKMYWA_HTTP_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"to":"+33600000001","text":"I will be there at 7.","idempotency_key":"draft-0001"}'
```
Encode the `+` in the query (`%2B`, or `curl -G --data-urlencode`): a bare `+`
reads as a space and the number is refused.
- **No preview at the door.** `POST /v1/send` sends at once. The preview and
the approval belong to the app that calls it: it shows you the recipient and
the exact text, and calls the door only after your click.
- **The same key is never sent twice**, even after a failed or cut-off send:
WhatsApp may have taken it, so the outcome is unknown and the door answers
409 instead of retrying. Keys and counters live in memory for 24 hours; a
restart forgets them.
- **Caps.** At most `ASKMYWA_HTTP_SENDS_PER_MINUTE` (default 5) and
`ASKMYWA_HTTP_SENDS_PER_DAY` (default 40) sends; past them the door answers
429 and sends nothing. Not connected: 503, nothing sent. WhatsApp did not
confirm: 502, and the key is spent.
- **Private network only.** The door has no TLS and does not decide who can
reach it: give the service **no public domain** and reach it on a private
network only. Without `--send-only` it warns that this server also keeps
the message archive.
**Webhooks.** `--webhook-url URL` (or `ASKMYWA_WEBHOOK_URL`) posts each
*live* message (not the history sync), including the ones you send from your
phone, to another app as JSON: `type` (`"message"`), `id`, `timestamp`,
`from_me`, `chat` (`jid`, `name`, `is_group`), `sender` (`phone`, `lid`,
`name`, `name_source`), `text` and, for an attachment, its `media` type, file
name and MIME type (never its content). The secret comes from
`ASKMYWA_WEBHOOK_SECRET` only (32+ characters); the URL must be http(s)
without credentials. Each request carries `X-Askmywa-Event-Id`,
`X-Askmywa-Timestamp` (Unix seconds) and
`X-Askmywa-Signature: sha256=hex(HMAC-SHA256(secret, timestamp + "." + body))`.
Verify it over the raw body:
```python
import hashlib, hmac, time
def verify(secret: str, headers: dict, body: bytes) -> bool:
ts = headers.get("X-Askmywa-Timestamp", "")
sig = headers.get("X-Askmywa-Signature", "")
if not ts.isdigit() or abs(time.time() - int(ts)) > 300:
return False # older than five minutes: refuse
mac = hmac.new(secret.encode(), ts.encode() + b"." + body, hashlib.sha256)
return hmac.compare_digest(sig, "sha256=" + mac.hexdigest())
```
Then ignore an event id you already have. Events are delivered in order and
retried with backoff (1 second, doubling up to about 4 minutes) until a 2xx;
a 4xx other than 408/429 drops the event. The queue lives in memory
(2 000 events, the oldest dropped past that): a restart loses what was not
delivered yet. Works with `--send-only`: the message reaches the webhook and
askmywa keeps nothing.
**Docker.** `whatsapp-go/Dockerfile` builds the send-only server: data on the
`/data` volume, door on `[::]:8080`, and an entrypoint that gives the volume
to an unprivileged `askmywa` user, then drops root. Set `ASKMYWA_HTTP_TOKEN`
(and the webhook variables if you want them) on the service. Pair it once
from a shell in the container with `askmywa link --phone <your number>`, then
type the code in WhatsApp.
> **Ban risk.** A linked device on a datacenter address is not what WhatsApp
> expects, and WhatsApp's terms do not allow unofficial clients. Keep the
> volume low and the caps tight. Unlinking the device from your phone
> (Linked devices) cuts it off at once.
## Tools
| Tool | What it does |
|---|---|
| `whatsapp_status` | Whether WhatsApp is set up and connected, and what to do next |
| `connect_whatsapp` | Start the background service and link this computer with a pairing code |
| `disconnect_whatsapp` | Unlink this computer, stop the service and optionally delete the archive, after a preview |
| `search_contacts` | Find people by name or number |
| `list_chats` | Chats, most recent first or by name |
| `list_messages` | Messages filtered by chat, sender, dates and full-text query, with optional surrounding context |
| `get_chat`, `get_direct_chat_by_contact`, `get_contact_chats` | One chat, the direct chat with someone, every chat they appear in |
| `get_last_interaction`, `get_message_context` | Latest exchange with someone, messages around a given one |
| `download_media` | Save an image, video, audio, document or sticker and return its path |
| `send_message`, `send_file`, `send_audio_message` | Preview by default, send with `confirm=true` |
Contacts can be given as a phone number, a JID or a name.
## More
[`whatsapp-go/README.md`](whatsapp-go/README.md) covers the data layout, migration from the original project, service management, configuration and development.
## Credits
Started as a fork of [lharries/whatsapp-mcp](https://github.com/lharries/whatsapp-mcp) by Luke Harries, MIT licensed. The voice-note encoding and the overall tool set come from that project; its Go bridge and Python server were removed once this binary replaced them, and remain in this repository's git history.
TDQS
Scored across 15 tools
Most tools have clearly distinct purposes: sending, reading, searching, media, and account management are well separated. There is some potential overlap among get_chat, get_direct_chat_by_contact, get_contact_chats, list_chats, and get_last_interaction, but the descriptions make the distinctions reasonably clear.
Nearly all tools use consistent snake_case verb_noun naming such as list_messages, send_message, and search_contacts. The main minor deviation is whatsapp_status, which is noun_status rather than a verb-led action name, but the overall convention remains readable and predictable.
Fifteen tools is at the upper end of the recommended range but still well scoped for a WhatsApp integration. Each tool covers a distinct read, send, media, search, or account-management operation without obvious filler.
The surface covers core WhatsApp workflows well: setup/status, chats, messages, contacts, context, media download, and text/file/audio sending. Minor gaps remain around message management operations such as editing, deleting, reacting, or group administration, but agents can handle the main workflows.