home / mcp / whatsapp mcp server

WhatsApp MCP Server

Provides a WhatsApp MCP server to read, search, profile, and message in groups through Claude Code and MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kotevcode-whatsapp-mcp": {
      "command": "npx",
      "args": [
        "tsx",
        "/path/to/whatsapp-mcp/src/index.ts"
      ]
    }
  }
}

You can connect Claude to WhatsApp using this MCP server, enabling you to read group messages, search conversations, fetch group and member statistics, and send messages to WhatsApp groups. It’s built on Baileys and the MCP SDK, stores history to disk, and keeps data across restarts for reliable interactions through Claude Code or any MCP client.

How to use

You interact with the WhatsApp MCP server through an MCP client. Start by pairing WhatsApp once, then let Claude Code automatically start the server when you request WhatsApp tools. Use the available tools to list groups, fetch messages, search across conversations, view group and member statistics, and send messages to groups.

How to install

Prerequisites you need before installation: Node.js installed on your system. A capable terminal or command prompt. A project environment where Claude Code MCP can run.

1) Install dependencies for the MCP server package.

npm install

2) Pair WhatsApp for the first time. Start the server and scan the QR code that appears in your terminal. This authorizes the session and saves authentication state to disk so you only need to pair once.

npm run dev

3) Configure the MCP server in your Claude Code project. Create or update your MCP configuration to include the WhatsApp MCP server as a stdio backend.

{
  "mcpServers": {
    "whatsapp": {
      "type": "stdio",
      "command": "npx",
      "args": ["tsx", "/path/to/whatsapp-mcp/src/index.ts"]
    }
  }
}

Additional setup notes

Claude Code will start the WhatsApp MCP server automatically when you request WhatsApp tools, so you do not need to run the server separately.

Available tools

connection_status

Check WhatsApp connection state, store size, group count

list_groups

List all groups with name, JID, participant count, message count

get_group_info

Group details: members, admins, description, creation date

fetch_messages

Get messages from a group with time range filtering

search_messages

Full-text search across messages, optionally scoped to a group

get_group_stats

Activity stats: message counts, top contributors, hourly/daily patterns

get_member_stats

Per-member breakdown: messages, media, active hours

request_history

Request older messages from WhatsApp servers (async)

send_message

Send a text message to a group