DEV Community

Local-MCP for Local-MCP

Posted on AI-assisted

Letting your agent read your WhatsApp, and what to watch out for

WhatsApp is where a lot of real coordination happens, and there's no official API for personal accounts. So when people ask "can my agent just summarize the family group?", the honest answer has two parts: yes, and here's the catch.

I work on LMCP, a free MCP server for Mac, and this is how its WhatsApp tools work.

The catch first

LMCP talks to WhatsApp through wacli, an open-source unofficial client that links to your account as a device, the same way WhatsApp Web does. Every WhatsApp tool in LMCP carries the same warning in its description: it uses an unofficial client, and accounts may be restricted for violating WhatsApp's terms. That's a real risk, not a formality, so decide with it in mind.

Linking

Ask your agent to run whatsapp_connect. It shows a QR code right in the chat (an image in desktop apps, text in a terminal). On your phone, go to Settings → Linked Devices → Link a Device and scan it. The code expires in about a minute; if you miss it, just ask again.

The messages are stored locally on your Mac, and LMCP treats that store like credentials: its own file tools refuse to read it.

Reading and summarizing

The flow the agent follows:

  • whatsapp_list_chats to find the chat and its id (groups included)
  • whatsapp_read_messages with that id, 50 messages by default
  • whatsapp_search_messages to search across chats, offline, over what's stored on the Mac

So "summarize what the family group decided about Sunday" becomes: find the group, read the recent messages, summarize. There are no date filters on reads, so for "since yesterday" the agent reads enough recent messages and filters them itself.

The part that surprises people: history is partial

WhatsApp history reaches the Mac gradually, and LMCP is upfront about it:

  • Reads trigger a short background sync, at most once every ten minutes per account. Aggressive automated syncing is the kind of pattern that can get a linked device logged out, so this is deliberate.
  • The first read after new activity can be a bit stale. Reading again a few seconds later picks up what arrived.
  • whatsapp_sync starts a full sync and returns immediately; whatsapp_diagnose tells you when it's done. After linking, the first one can take minutes.
  • If your phone shows more unread messages in a chat than the Mac has, the read result says the list is incomplete instead of pretending it isn't.

Sending

whatsapp_send_message and whatsapp_send_file return a preview first, showing who receives it and the text, and only send when called again with confirm: true. If the chat's name can't be resolved, the preview says so rather than guessing. For an agent that runs unattended, the safer move is not giving it the send tools at all.

Try it

It's free:

curl -fsSL 'https://local-mcp.com/install?ref=devto-t4' | bash
Enter fullscreen mode Exit fullscreen mode

Would you let an agent read your WhatsApp, or is that a line you don't cross?


Top comments (0)