Back/Personal/Claude
AdvancedPersonalClaude

How to Connect WhatsApp to Claude AI Using a Model Context Protocol (MCP)

Create a powerful personal AI assistant by securely connecting your WhatsApp messages to a large language model like Claude. This workflow uses an open-source Model Context Protocol (MCP) to allow your AI to read your recent messages, summarize conversations, and even send messages for you.

From How I AI

How I AI: 3 AI Workflows to Save $140K & Automate Marketing with ElevenLabs' Luke Harries

with Claire Vo

How to Connect WhatsApp to Claude AI Using a Model Context Protocol (MCP)

Tools Used

Claude

Anthropic AI assistant

Step-by-Step Guide

1

Set Up the Local Project

Clone or download the open-source 'whatsapp-mcp' project from Luke Harries' GitHub. Run the provided script locally in your terminal. This script uses the 'whatsmeow' library to simulate a WhatsApp Web client.

2

Connect and Sync Your Messages

Scan the QR code generated in your terminal with your phone's WhatsApp app, just as you would for WhatsApp Web. The script will perform a one-time sync of your message history and then listen for new messages, storing everything in a secure, local SQLite database on your machine.

3

Run the Local MCP Server

The script also runs a local MCP server. This server exposes specific functions to an AI model, such as getRecentMessages or sendMessage, creating a secure bridge between the AI and your local WhatsApp data.

4

Connect to Claude

Connect your local MCP server to an AI model like Claude. This allows Claude to use the functions exposed by the server as tools.

5

Query Your WhatsApp Data

You can now interact with your WhatsApp data using natural language prompts directly in Claude. Ask it to summarize recent chats, find specific information, or even send messages on your behalf.

Prompt:
What are some recent messages I've received on WhatsApp?
Pro Tip: Use this to stay on top of busy group chats by asking the AI to summarize key topics. For example: `summarize the thoughts on [Your Company] from my messages over the last week.`

Become a 10x PM.
For just $5 / month.

We've made ChatPRD affordable so everyone from engineers to founders to Chief Product Officers can benefit from an AI PM.