WhatsApp Messaging API logo

WhatsApp Messaging API

Send WhatsApp texts, images, and files through MCP after linking a WhatsApp session with a QR code or pairing code.

Install WhatsApp Messaging API

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "whatsapp-messaging-api": {
      "command": "npx",
      "args": [
        "-y",
        "whatsapp-messaging-api-mcp"
      ],
      "env": {
        "WHATSAPP_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

WhatsApp Messaging API MCP server connects MCP clients to Retention Stack’s WhatsApp Messaging API for session management and message delivery. It supports text, image, and file messages to contacts, groups, and channels, with contact checks available before sending. Authenticate a session by scanning a QR code or requesting an 8-digit pairing code, then use its status to confirm the session is ready. It fits developers who want WhatsApp messaging from Claude, Cursor, or another MCP client without a Meta Business approval or WhatsApp Business account.

Use cases

  • Send WhatsApp text messages from an MCP client
  • Deliver images or documents to WhatsApp recipients
  • Check phone-number registration before sending
  • Manage and authenticate multiple WhatsApp sessions
  • Link a WhatsApp account with a QR code or pairing code

Key features

  • Create and list WhatsApp sessions
  • Authenticate with QR codes or 8-digit pairing codes
  • Check contact registration status
  • Send text messages to contacts, groups, and channels
  • Send images and files from public URLs
  • Track session readiness and failure states

Tools9

What WhatsApp Messaging API lets your agent do. Expand a tool for its parameters.

Verified live~801 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 78d

What it can do

From the 9 tools this server returned when we ran it.

Handles credentials · 1Makes network requests · 3Read-only tools · 9
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age62 days
Maintainers1

Observed 2026-11-06 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9h ago via OSV.dev · whatsapp-messaging-api-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads539Package downloads in the last 30 days.
Last commit13d agoMost recent push to the default branch.
Tools exposed9Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How WhatsApp Messaging API works

What WhatsApp Messaging API does

WhatsApp Messaging API exposes WhatsApp account and messaging operations as MCP tools. It connects to the WhatsApp Messaging API operated by Retention Stack and lets an MCP client create or inspect sessions, complete authentication, check phone-number registration, and send media or text.

Messages can target individual contacts, groups, or channels. Supported outbound content includes plain text, images referenced by public URL, and files such as PDFs or other documents referenced by public URL.

How it works

The normal setup flow is to create a session, obtain its QR code, scan that code in WhatsApp under Settings > Linked Devices, and poll the session until its status is WORKING. Pairing-code authentication is available as an alternative to scanning: request_pairing_code returns an 8-digit code.

A session can report states including STARTING, SCAN_QR_CODE, WORKING, FAILED, and STOPPED. Some linking flows may require PASSKEY_REQUIRED or PASSKEY_CONFIRMATION_REQUIRED; those steps are completed in the Retention Stack console because an MCP client cannot sign in to the passkey through a browser.

Once authenticated, sessions remain linked between runs, so the QR or pairing step is generally needed only once per number. Before sending, call check_contact_exists when you need to verify that a phone number is registered on WhatsApp.

Setup and configuration

Create an account at the Retention Stack WhatsApp Messaging API console and copy a key. A session token beginning with ch_live_ is associated with one number and lets the tools operate without a session name. An account key beginning with ak_live_ covers the numbers on an account, is required for create_session, and requires the relevant session to be passed to the other tools.

Run the package through npx in the MCP client configuration:

config.json
{
  "mcpServers": {
    "whatsapp": {
      "command": "npx",
      "args": ["-y", "whatsapp-messaging-api-mcp"],
      "env": {
        "WHATSAPP_API_KEY": "ch_live_your_session_token"
      }
    }
  }
}

Restart the client after adding the entry. WHATSAPP_API_KEY is required; the server exits at startup if it is absent. The key is read from the environment, sent to the API host, and not logged.

Tools and capabilities

  • list_sessions returns sessions associated with the API key.
  • create_session starts a session and returns its name and initial status.
  • get_session_status reports the state of a session.
  • get_qr_code retrieves the authentication QR code.
  • request_pairing_code provides an alternative 8-digit linking code.
  • check_contact_exists checks whether a number is registered on WhatsApp.
  • send_text_message sends text to a contact, group, or channel.
  • send_image sends an image from a public URL.
  • send_file sends a file from a public URL.

Limitations and notes

An account key is needed to create sessions, while a session token is intended for one number. Public URLs are required for image and file delivery. Older RapidAPI keys from 1.x configurations no longer work; use a session token or account key from the console instead.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about WhatsApp Messaging API

WhatsApp Messaging API is an MCP server that connects MCP clients to Retention Stack’s WhatsApp Messaging API. Its main tools create and monitor sessions, retrieve QR codes or pairing codes, check contact registration, and send text, image, and file messages to contacts, groups, and channels.

Install it through an MCP client configuration that runs `npx -y whatsapp-messaging-api-mcp`. Set the required `WHATSAPP_API_KEY` environment variable, restart the client, and authenticate a WhatsApp session with the QR code or pairing-code flow.

Authenticate it by calling `get_qr_code` and scanning the result in WhatsApp under Settings > Linked Devices, or request an 8-digit code with `request_pairing_code`. Check `get_session_status` until the session reports `WORKING`.

Yes. Use `send_image` for an image or `send_file` for a PDF or other document, providing a public URL. Both tools can deliver content to a contact, group, or channel.

Yes. The server can be configured in Cursor as an MCP server, using the package command and `WHATSAPP_API_KEY` environment variable. It also works with Claude and other MCP clients.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewWhatsApp Messaging API AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/whatsapp-messaging-api?style=directory)](https://allmcps.com/mcp/whatsapp-messaging-api)
HTML Embed
<a href="https://allmcps.com/mcp/whatsapp-messaging-api"><img src="https://allmcps.com/api/badge/whatsapp-messaging-api?style=directory" alt="WhatsApp Messaging API on AllMCPs" /></a>