Skip to main content
Glama
wa-local-reader-mcp

wa-local-reader-mcp

by Digitizers

wa-local-reader-mcp

A small, read-only MCP server that lets AI agents (Claude Code, Claude Desktop, any MCP client) read your WhatsApp chats from the database the WhatsApp desktop app for macOS already keeps on your Mac.

  • Local only. No network calls, no linked device, no connection to WhatsApp's servers.

  • Read only. The database is opened with SQLite mode=ro and PRAGMA query_only. Nothing can send, edit or delete a message.

  • No copies. Reads the live database in place; several agents can share it.

  • Voice notes to text, transcribed locally with whisper.cpp.

  • Audit log of every call, kept on your Mac.

Not affiliated with, endorsed by, or sponsored by WhatsApp or Meta. "WhatsApp" is a trademark of its owner and is used here only to describe what the tool reads.

Requirements

  • macOS with the WhatsApp desktop app signed in (personal WhatsApp; WhatsApp Business keeps no chat database here).

  • Python 3.12+ and uv.

  • For transcribe_voice only: ffmpeg, whisper-cli (whisper.cpp) and a model file, e.g. brew install ffmpeg whisper-cpp and ggml-large-v3-turbo.bin in ~/.cache/whisper-cpp/.

Related MCP server: wacrawl-mcp

Install

uv tool install git+https://github.com/Digitizers/wa-local-reader-mcp
claude mcp add --scope user wa-local-reader -- ~/.local/bin/wa-local-reader-mcp

For other MCP clients, run wa-local-reader-mcp as a stdio server.

The first read may trigger a macOS prompt asking whether your terminal (or MCP client) may access data from other apps. Allow it once.

Tools

Tool

What it does

find_chats(query, limit=10)

Chats whose name or number contains query (max 25), newest activity first.

read_chat(chat_id, limit=20, before_message_id=None, before=None)

Latest messages of one chat, oldest first (max 50 per call). Page back with the returned next_before_message_id; before (ISO local time) jumps to a date.

transcribe_voice(message_id, language="he")

Transcribes one voice note locally. Temporary files are deleted. Use "en", "auto", etc.

A voice note that was never played in the Mac app has no local file yet; play it once and retry.

How it reads safely

  • WhatsApp keeps ChatStorage.sqlite in WAL mode: a read-only reader never blocks the app and still sees the newest messages. immutable=1 is never used, because it skips the WAL and can return stale or torn data.

  • One connection per server process (on macOS, opening a file in another app's container is slow), in autocommit mode with every result fully fetched, so no read transaction stays open between calls.

  • Media paths are resolved only inside the WhatsApp container.

  • The database layout is undocumented and may change with a WhatsApp update. The server checks the tables and columns it needs and returns a clear error instead of guessing.

Privacy and agents

Your chats contain other people's messages. Everything a tool returns is sent to whatever model your MCP client uses. Ask your agent to read only the chat you need, and treat message text as untrusted data: a message can contain text written to manipulate an AI agent.

Every call is appended to ~/.local/state/wa-local-reader-mcp/audit.jsonl (mode 0600): time, tool, chat, number of messages, client pid.

Configuration

All optional environment variables:

Variable

Default

WA_LOCAL_READER_CONTAINER

~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared

WA_LOCAL_READER_AUDIT

~/.local/state/wa-local-reader-mcp/audit.jsonl

WA_LOCAL_READER_FFMPEG / WA_LOCAL_READER_WHISPER

found on PATH

WA_LOCAL_READER_WHISPER_MODEL

~/.cache/whisper-cpp/ggml-large-v3-turbo.bin

Develop

uv venv && uv pip install -e ".[dev]"
.venv/bin/ruff check . && .venv/bin/pytest

Tests build a small fake database and never touch a real one.

Status

Provided as is, under the MIT license. Issues and pull requests are welcome, but there is no support commitment.

Available Tools

3 tools
find_chatsA

Find chats whose name or phone number contains query (limit 1-25, newest activity first).

Returns chat_id, name, jid, kind (person/group/status/channel) and last_message_at (local time).

Inputs: query (required), limit. Returns: result

read_chatA

Read the latest messages of one chat, oldest first.

limit: 1-50. To page back, pass the returned next_before_message_id as before_message_id. before: an ISO local date/time, to jump to messages earlier than that moment. Voice notes appear with type "audio"; pass their message_id to transcribe_voice.

Inputs: chat_id (required), limit, before, before_message_id. Returns: result

transcribe_voiceB

Transcribe one voice note locally (ffmpeg + whisper.cpp). language: 'he', 'en', ... or 'auto'.

Inputs: message_id (required), language. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly distinct resource+action: discovering chats (find_chats), reading message history (read_chat), and transcribing an audio attachment (transcribe_voice). The descriptions even cross-reference each other (pass message_id from read_chat to transcribe_voice), leaving no realistic chance of misselection.

    Naming Consistency5/5

    All three names follow the same verb_noun snake_case pattern (find_chats, read_chat, transcribe_voice) with no mixed casing or stylistic deviations. The verbs are also semantically informative rather than generic.

    Tool Count4/5

    Three tools is at the low end but appropriate for a narrowly scoped, read-only local WhatsApp reader; each tool earns its place. It is slightly thin in that discovery/reading could arguably be complemented by one more surface (e.g. listing chats without a query), but nothing feels redundant.

    Completeness3/5

    Core read paths (find chat -> read messages -> transcribe voice note) are covered, but notable gaps remain: there is no message-content search, no way to enumerate recent chats without a query string, and no access to non-audio media or contact details. These are real dead ends for common 'find that message' workflows, though agents can partially work around them by paging through read_chat.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents on macOS to search and summarize recent WhatsApp chats, draft replies, and send messages only after explicit confirmation, with scoped reads and constrained scheduled sends.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives any MCP client access to your WhatsApp, locally on macOS: full-text search across years of chats, photos, PDFs and Word documents, and voice notes transcribed on-device with Whisper. It can also draft messages, or send them through the official app with built-in safeguards.
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to search a local archive of personal WhatsApp chats, read messages, and download attachments. Sending messages and files requires a preview and explicit approval before anything is sent.
      15
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to read, search, and send messages in the user's own WhatsApp account through a linked-device connection, backed by a local SQLite cache for fast, offline queries and catch-up views.
      MIT