Mcp Whatsapp Cloud

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for WhatsApp Cloud API (Meta) — messages, media, and templates via Graph API

Overview

AI-generated overview

A local MCP server for Meta's WhatsApp Cloud API that lets an assistant send WhatsApp messages, media and templates and manage a business account.

What you can do
Send text, template, media, interactive, flow, location, contact and reaction messages, plus typing indicators and read receipts to WhatsApp numbers through the Cloud API. Upload, resolve and delete media assets, reusing uploaded media IDs across sends. List, create and delete message templates on the WhatsApp Business Account. Read and update the business profile and list registered phone numbers. Request and submit phone number verification codes.
When to use it
Useful when a business already has an approved WhatsApp Business Account and wants an assistant to handle customer messaging, template management or account administration directly through Meta without an intermediary provider.
Requirements
Runs locally via npx from the npm package @codespar/mcp-whatsapp-cloud (Node.js). Requires a Meta system-user access token in WHATSAPP_ACCESS_TOKEN, a phone number ID in WHATSAPP_PHONE_NUMBER_ID and a WhatsApp Business Account ID in WHATSAPP_BUSINESS_ACCOUNT_ID; WHATSAPP_GRAPH_VERSION is optional and defaults to v21.0. Network access to the Meta Graph API is needed.
Before you install
The access token in WHATSAPP_ACCESS_TOKEN is a permanent credential granting control of the business account; keep it secret. The server sends real messages to real customers, which may incur Meta conversation charges, and can create, delete or update templates, media and the business profile. Outside the 24-hour customer-service window only approved templates may be sent.

Installation

In SourceWeft

  1. Open Mcp Whatsapp Cloud in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-whatsapp-cloud

MCP server for the WhatsApp Cloud API — Meta's official WhatsApp Business API, self-hosted on Meta infrastructure.

Direct Meta integration. No middleman, no provider markup. For merchants with an approved WhatsApp Business Account (WABA) who want Meta-direct pricing and full control over conversation, pricing category, and template lifecycle.

WhatsApp servers in this catalog

ServerWhat it isWhen to pick it
whatsapp-cloud (this)Direct Meta Cloud APILarge merchants with approved WABA; lower cost at scale, no intermediary fees
z-apiWrapper on top of Meta CloudEasy onboarding, instant QR-pair, extra helpers
evolution-apiOpen-source wrapperSelf-hosted, community-driven
take-blipBrazilian BSP wrapperEnterprise Brazil, CCaaS features
zenviaBrazilian BSP wrapperBrazil omnichannel (SMS + WhatsApp)

Tools (22)

ToolPurpose
send_text_messageSend a plain text message.
send_template_messageSend an approved message template.
send_media_messageSend an image, video, document, or audio.
send_interactive_messageSend an interactive message (reply buttons or list).
send_interactive_cta_urlSend an interactive message with a single CTA URL button.
send_interactive_flowSend a WhatsApp Flow message.
send_location_messageSend a location pin with latitude/longitude and optional name/address.
send_contacts_messageSend one or more contact cards (vCard-like).
send_reaction_messageSend an emoji reaction on a previously received/sent message.
send_typing_indicatorShow a typing indicator on a received message.
mark_message_as_readMark an incoming message as read so the sender sees the blue double-check.
upload_mediaUpload a media file and get back a media_id reusable in send_media_message.
retrieve_media_urlResolve a media_id to a short-lived downloadable URL.
delete_mediaDelete an uploaded media asset by id.
list_templatesList message templates on the WhatsApp Business Account.
create_templateSubmit a new template for Meta review.
delete_templateDelete a message template from the WABA by name.
get_business_profileRead the WhatsApp business profile (about, description, email, websites, vertical, address) for the configu...
update_business_profileUpdate the business profile on the configured phone number.
list_phone_numbersList all phone numbers registered under the WhatsApp Business Account, including display name, quality rati...
request_verification_codeRequest Meta to send a verification code to the configured phone number via SMS or voice.
verify_codeSubmit the verification code received via SMS/voice after request_verification_code.

Install

bash
npm install @codespar/mcp-whatsapp-cloud

Environment

bash
WHATSAPP_ACCESS_TOKEN="EAAG..."           # required (secret) — Meta system-user tokenWHATSAPP_PHONE_NUMBER_ID="1234567890"     # required — WABA phone number idWHATSAPP_BUSINESS_ACCOUNT_ID="9876543210" # required — WABA id (for templates)WHATSAPP_GRAPH_VERSION="v21.0"            # optional — Meta bumps quarterly

Authentication

Bearer token against the Graph API. Use a permanent system-user token from Meta Business Manager — user access tokens expire and will break production.

Authorization: Bearer <WHATSAPP_ACCESS_TOKEN>

Messaging rules (important)

  • Customer-service window — You can freely send any message type for 24h after the user last messaged you.
  • Business-initiated — Outside that window you must send an approved template. Use send_template_message with a name + language + components.
  • Templates — Create with create_template, wait for Meta approval (minutes to hours), then use.
  • Phone numbers are E.164 without the leading + (e.g. 5511999999999).

Media

Two paths:

  1. Public URL — pass link to send_media_message. Fastest, but Meta fetches on every send.
  2. Uploaded media_id — call upload_media once, reuse id on subsequent sends. Recommended for catalog assets.

Uploaded media expires after ~30 days.

Interactive messages

send_interactive_message expects a fully-formed interactive object. Example button payload:

json
{  "type": "button",  "body": { "text": "Confirma seu pedido?" },  "action": {    "buttons": [      { "type": "reply", "reply": { "id": "confirm", "title": "Confirmar" } },      { "type": "reply", "reply": { "id": "cancel", "title": "Cancelar" } }    ]  }}

See the Cloud API interactive reference for list payloads.

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-whatsapp-cloud
# HTTP (for server-to-server)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-whatsapp-cloud

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Source: packages/communication/whatsapp-cloud/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts