AutomataGet Started Free

How to connect WhatsApp to Claude

Connect Claude.ai, Claude Desktop, and Claude Code to WhatsApp with a free, open-source MCP server. Pair your account, choose the chats Claude can see, and add the connector in five steps.

7 min read

Claude cannot read WhatsApp on its own. To let it summarize a client thread, find an address someone sent you, or draft a reply, you connect it to your account through an MCP server. MCP (the Model Context Protocol) is the open standard Claude uses to talk to outside tools.

This guide uses Automata, a free, open-source WhatsApp MCP server. It pairs your WhatsApp account the same way WhatsApp Web does, then lets you decide chat by chat what Claude may read or send. By the end, Claude will be able to work with the chats you approve and nothing else.

What you need

  • A WhatsApp account. Use a spare number while testing, because unofficial clients carry some risk of rate limits or bans.
  • A Claude account on a plan that supports custom connectors. Anthropic changes plan availability over time, so check their current details.
  • Somewhere to run Automata. The quickest option is the one-click Railway template; you can also self-host with Docker.
  • About ten minutes.

How the connection works

Three pieces are involved, and only the middle one is new:

  1. Claude is the MCP client. It sends requests to a URL.
  2. Automata is the MCP server. It checks the connector token on every request, enforces which chats are allowed, and exposes five WhatsApp tools.
  3. WhatsApp is paired to Automata as a linked device, so Claude never touches your phone or your account credentials.

Because the permission check happens in Automata and not in the prompt, Claude cannot talk its way into a chat you did not allow. Read more about how Automata enforces permissions.

Step 1: Deploy Automata

Deploy Automata somewhere Claude can reach. If you plan to use Claude.ai or Claude Desktop, the server needs a public HTTPS URL, because those apps connect from Anthropic's servers and cannot see localhost.

The fastest path is the Railway template, which provisions Automata, PostgreSQL, Redis, and the Evolution API service that handles WhatsApp. To run it yourself, follow the getting started guide.

Step 2: Pair WhatsApp

Open your Automata dashboard, create a WhatsApp account connection, and continue to the QR code. On your phone, go to WhatsApp → Settings → Linked devices → Link a device and scan it.

Wait until the dashboard shows the connection as open before you move on. Automata refuses to send while the account is disconnected, since it cannot verify the recipient.

Step 3: Choose the chats

Create a connector token for this connection. This is where Automata differs from most WhatsApp MCP servers: instead of exposing every conversation, you set each chat to one of three levels.

LevelWhat Claude can do
ReadList the chat, read its history, and search inside it
WriteEverything in read, plus send messages to it
No accessThe chat does not exist as far as Claude can tell

Start narrow. Give Claude read access to one or two chats, add write access only where you want it to reply, and leave everything else off. Only the tools you enable are registered, so a read-only token cannot send anything.

Step 4: Add it to Claude

Copy the connector URL from the dashboard. The endpoint looks like this:

https://your-automata.example.com/mcp/<connector-token>

Claude.ai and Claude Desktop

  1. Open Settings → Connectors.
  2. Choose Add custom connector.
  3. Enter a name such as WhatsApp and paste the connector URL.
  4. Save, then enable the connector in a new chat.

Claude Code

Run one command, replacing the URL with your own:

claude mcp add --transport http automata \
  https://your-automata.example.com/mcp/<connector-token>

If you run several Automata connections, give each a distinct name such as support-whatsapp. If your client supports custom headers, you can use the plain /mcp endpoint with an Authorization: Bearer header instead, which keeps the token out of URLs. The MCP clients docs cover both formats.

Step 5: Test it

Start with the safest possible request and confirm the connection works before asking for anything real. In a new chat with the connector enabled, ask:

Check the WhatsApp connection status.

Claude calls get-connection-status and should report the account as connected. Then try prompts that match the chats you allowed:

  • Summarize what Client A asked for in WhatsApp this week.
  • Find the address Maria sent in the Suppliers group.
  • List every open question in the Acme project chat since Monday.
  • Draft a reply in the Design team group confirming the new deadline.

Ask Claude about a chat you did not allow and it will find nothing. That is the permission layer working as intended.

Keep it safe

  • Treat the connector URL like a password. Anyone with the token can use the chats it allows. If it leaks, revoke that one token and create a new one; your other clients keep working.
  • Prefer header authentication when your client supports it, since URLs often end up in logs.
  • Grant write access sparingly. Reading is low risk; sending messages on your behalf is not.
  • Keep a spare number for experiments and avoid bulk or unsolicited messaging.

Troubleshooting

SymptomLikely cause and fix
Claude shows a 401 errorThe token is missing, invalid, expired, or revoked. Create a new connector token and update the URL.
Claude.ai cannot connectThe URL is not public. Claude.ai connects from Anthropic's servers, so use a deployed HTTPS URL, not localhost.
A chat is missing from the listIt is not allowed on this token, or it has no stored messages yet. Check the chat permissions and your history sync.
Read tools return a missing-prerequisite responseThe Evolution database URL is not configured. See the WhatsApp setup notes.
Sending is refusedThe WhatsApp account is disconnected, or the chat does not have write access. Re-pair the account or raise the permission.

More fixes are in the troubleshooting guide.

Next steps