WWhatsApp-Use

mcp reference

WhatsApp-Use MCP.

One MCP server. Add it to Claude Desktop, Cursor, Cline, or any MCP-aware client. Pair a WhatsApp account, then read, write, send, search, and receive notifications — all as tools your agent can call.

introduction

Introduction

WhatsApp-Use exposes a single MCP server. Your agent connects with an API key, pairs one or more WhatsApp accounts, and then has every tool below available — sending and reading messages, managing chats and groups, searching history, and receiving live notifications.

MCP server@whatsapp-use/mcp
Remote URLhttps://mcp.whatsapp-use.dev
AuthAPI key in env
Transportstdio · SSE · HTTP

quickstart

Quickstart

Pick your MCP client, drop the snippet into the config file, restart the client. The configuration is identical across clients — only the file location changes.

Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["-y", "@whatsapp-use/mcp"],
      "env": {
        "WUSE_API_KEY": "wuse_live_..."
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["-y", "@whatsapp-use/mcp"],
      "env": {
        "WUSE_API_KEY": "wuse_live_..."
      }
    }
  }
}
Cline (VS Code)Settings → MCP Servers
{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["-y", "@whatsapp-use/mcp"],
      "env": {
        "WUSE_API_KEY": "wuse_live_..."
      }
    }
  }
}

auth

Authentication

The MCP server reads WUSE_API_KEY from its environment. Generate keys in the dashboard. Live keys are prefixed wuse_live_…; test keys are prefixed wuse_test_….

# Generate a key
open https://dashboard.whatsapp-use.dev/keys

# Pass it via env in your MCP config
"env": { "WUSE_API_KEY": "wuse_live_..." }

conventions

Conventions

A few patterns apply across every tool. Read these once and the rest of the reference becomes a lot shorter.

IDs

Every resource has a stable string ID with a typed prefix: acc_, chat_, msg_, med_, grp_.

Pagination

list_chats and list_messages return up to 100 items by default. Pass limit (max 200) and the next_cursor from a previous response to page forward, or before (a message ID or timestamp) to walk backward into history.

Phone numbers

Always use E.164 format with a leading +, e.g. +14155550198.

Timestamps

ISO 8601 in UTC. Notifications include occurred_at (when WhatsApp says it happened) and received_at (when our server saw it).

Idempotency

Tools that create or mutate accept an optional idempotency_key argument. Same key returns the same result for 24 hours.

accounts

Account & pairing tools

Every connected WhatsApp number is an account. Pair via QR code or phone sync, watch its status, and reconnect or unpair at any time.

pair_account

Start a pairing session and return a QR code or phone-sync code plus a status stream.

list_accounts

List every account connected under your API key.

get_account

Get an account's metadata: phone number, display name, paired_at, last seen.

get_account_status

Get the connection status: pairing | connected | disconnected | expired | logged_out.

reconnect_account

Force a reconnect attempt for a disconnected account.

logout_account

Log out from WhatsApp Web. The owner can re-pair the same number later.

delete_account

Unpair and delete the account. Stored data is purged within 30 days.

messages

Message tools

Send text, media, voice notes, locations, and contact cards. Edit within WhatsApp's 15-minute window. Delete, react, star, and forward.

send_message

Send a message to a chat. Supports text, image, document, audio, video, location, and contact types.

get_message

Get a single message by ID.

edit_message

Edit a message. WhatsApp permits edits within 15 minutes of sending.

delete_message

Delete a message. Pass scope='me' or scope='everyone'.

add_reaction

Add a reaction emoji to a message.

remove_reaction

Remove your reaction from a message.

star_message

Star a message.

unstar_message

Unstar a message.

forward_message

Forward a message to one or more chats.

chats

Chat & inbox tools

Every conversation — 1:1 or group — is a chat. List the inbox, page older history backward, fetch newer messages forward, mark read, archive, mute, pin.

list_chats

List chats in the inbox. Supports filter (unread, archived, pinned, label), limit, and cursor.

get_chat

Get a chat's metadata: type, name, participants, settings, last message.

list_messages

Fetch messages in a chat. Page backward with `before` (older), forward with `after` (newer).

open_chat

Open or create a 1:1 chat with a phone number.

mark_chat_read

Mark a chat read up to the latest message.

mark_chat_unread

Mark a chat unread.

archive_chat

Archive a chat.

unarchive_chat

Move an archived chat back to the inbox.

mute_chat

Mute notifications for a chat.

unmute_chat

Unmute notifications.

pin_chat

Pin a chat to the top of the inbox.

unpin_chat

Unpin a chat.

delete_chat

Delete the chat locally. Future inbound messages will reopen the conversation.

groups

Group tools

Groups are chats with multiple participants and admin controls. Create, manage participants, rotate invite links, and update metadata.

create_group

Create a group with a name and initial participants.

get_group

Get group metadata: name, description, picture, admins, settings.

update_group

Update group name, description, or picture.

list_group_participants

List participants with their admin status.

add_group_participants

Add participants by phone number.

remove_group_participant

Remove a participant from a group.

promote_group_participant

Promote a participant to admin.

demote_group_participant

Demote an admin to a regular participant.

group_invite_link

Generate or rotate the group's invite link.

leave_group

Leave the group from the connected account.

contacts

Contact tools

Contacts are phone numbers the connected account knows. Check WhatsApp availability before sending, read profile metadata.

list_contacts

List contacts the account has interacted with.

get_contact

Get a contact's profile: display name, status, picture URL.

check_whatsapp

Check whether one or more phone numbers are reachable on WhatsApp.

get_contact_picture

Get a contact's profile picture URL when visible to the account.

get_contact_status

Get a contact's 'about' text.

media

Media tools

Upload images, audio, video, and documents to attach to messages. Download received media. Each media object has metadata and a signed URL good for 24 hours.

upload_media

Upload a media file. Returns a media ID for use with send_message.

download_media

Download media as binary, or return a signed URL.

get_media_metadata

Get media metadata: mime type, size, duration, dimensions.

presence

Presence & typing tools

Signal presence (online, typing, recording) and read a contact's last-seen status when they've made it visible.

set_presence

Set presence in a chat: online, typing, recording, paused.

get_contact_presence

Get a contact's presence (last seen, online status) when shared.

profile

Account profile tools

Read and update the connected WhatsApp account's profile — display name, 'about' text, and picture.

get_profile

Get the connected account's profile.

update_profile

Update display name or 'about' text.

set_profile_picture

Set or replace the profile picture from a media ID.

notifications

Notifications

The MCP server pushes notifications to your agent as MCP notifications messages (no polling, no webhook setup). Subscribe to the events your agent cares about and the server streams them on the open connection.

message.receivedAn inbound message arrived in the inbox.
message.sentAn outbound message was delivered to WhatsApp.
message.editedA message was edited (yours or a counterparty's).
message.deletedA message was deleted.
message.readA message was read by the recipient (when read receipts are on).
message.reaction.addedA reaction was added to a message.
message.reaction.removedA reaction was removed from a message.
account.pairedAn account finished pairing successfully.
account.connectedAn account reconnected after a transient disconnect.
account.disconnectedAn account lost connection. Our service will retry automatically.
account.unpairedThe user logged out of WhatsApp Web or the account was removed.
group.createdA new group was created with the account as a participant.
group.updatedGroup name, description, or picture changed.
group.participant_addedA participant joined or was added to a group.
group.participant_removedA participant left or was removed from a group.
typing.startedA counterparty started typing in a chat.
typing.stoppedA counterparty stopped typing.
presence.changedA contact's presence changed (online/offline) when shared.

errors

Errors

Tool errors return a JSON body with a code, a human-readable message, and optional fields for validation issues. HTTP-style status codes are surfaced for parity.

401unauthorizedMissing or invalid API key.
403forbiddenThe key does not have permission for this account or tool.
404not_foundThe resource does not exist.
409account_not_pairedThe target account is not paired or has been disconnected.
409edit_window_expiredMessages can only be edited within 15 minutes of sending.
400invalid_requestMalformed tool arguments or missing required fields.
413media_too_largeThe uploaded media exceeds the 100MB size limit.
429rate_limitedToo many tool calls. Back off and retry with exponential delay.
500server_errorUnexpected server error. Safe to retry after backoff.