Whatsapp Cloud

Messaging and email

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

Your AI app calls the Whatsapp Cloud MCP server, which does the messaging and email work and sends the result back to the chat.

About Whatsapp Cloud

Whatsapp Cloud is a community MCP server from codespar, filed in our directory under messaging and email. MCP server for WhatsApp Cloud API (Meta), messages, media, and templates via Graph API.

Whatsapp Cloud runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-whatsapp-cloud@0.2.2 and talks to it over standard input and output. It needs WHATSAPP_ACCESS_TOKEN, WHATSAPP_PHONE_NUMBER_ID and WHATSAPP_BUSINESS_ACCOUNT_ID set before Whatsapp Cloud starts.

Whatsapp Cloud is listed in the official MCP registry as io.github.codespar/mcp-whatsapp-cloud, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-whatsapp-cloud
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-whatsapp-cloud

How to set up Whatsapp Cloud

  1. Install Node.js on the machine that runs your AI app, because Whatsapp Cloud starts with npx and downloads its package on first run.
  2. Create WHATSAPP_ACCESS_TOKEN, WHATSAPP_PHONE_NUMBER_ID and WHATSAPP_BUSINESS_ACCOUNT_ID for Whatsapp Cloud in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Whatsapp Cloud to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Whatsapp Cloud tools to confirm the connection.
  5. Run one read-only task with Whatsapp Cloud first, and keep your app asking before each tool call until the results look right.

Whatsapp Cloud compared with similar servers

  • Z API by codespar has fewer GitHub stars than Whatsapp Cloud (278 against 278); both are community servers, and both run locally.
  • Twilio by codespar has fewer GitHub stars than Whatsapp Cloud (278 against 278); both are community servers, and both run locally.
  • Zenvia by codespar has fewer GitHub stars than Whatsapp Cloud (278 against 278); both are community servers, and both run locally.

Before you connect Whatsapp Cloud

  • Give Whatsapp Cloud its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Whatsapp Cloud tool call until you trust what it does with them.
  • Treat text that Whatsapp Cloud fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Whatsapp Cloud on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Whatsapp Cloud

How marketing and sales teams put Whatsapp Cloud to work, by company size. Pick the size closest to yours and start Whatsapp Cloud on one use case.

Small business

  • A small team can have Whatsapp Cloud summarize the inbox or channel each morning, so nothing from a customer waits until the afternoon.
  • Owners can draft replies and follow-ups with Whatsapp Cloud and send them only after a read, keeping the personal tone customers expect.
  • Whatsapp Cloud runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can use Whatsapp Cloud to turn long launch threads into decisions, owners and dates that land in the project tracker.
  • Sales and success teams can connect Whatsapp Cloud so an agent drafts follow-ups after every customer call, ready to edit and send.
  • Start Whatsapp Cloud on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can deploy Whatsapp Cloud with retention and data loss rules intact, so agents summarize conversations without moving data outside policy.
  • Internal comms teams can use Whatsapp Cloud to find what employees ask most across channels and answer it once, in the right place.
  • Whatsapp Cloud is a community server, so have security review the code and pin a version before Whatsapp Cloud touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Whatsapp Cloud README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@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

Server What it is When to pick it
whatsapp-cloud (this) Direct Meta Cloud API Large merchants with approved WABA; lower cost at scale, no intermediary fees
z-api Wrapper on top of Meta Cloud Easy onboarding, instant QR-pair, extra helpers
evolution-api Open-source wrapper Self-hosted, community-driven
take-blip Brazilian BSP wrapper Enterprise Brazil, CCaaS features
zenvia Brazilian BSP wrapper Brazil omnichannel (SMS + WhatsApp)

Tools (22)

Tool Purpose
send_text_message Send a plain text message.
send_template_message Send an approved message template.
send_media_message Send an image, video, document, or audio.
send_interactive_message Send an interactive message (reply buttons or list).
send_interactive_cta_url Send an interactive message with a single CTA URL button.
send_interactive_flow Send a WhatsApp Flow message.
send_location_message Send a location pin with latitude/longitude and optional name/address.
send_contacts_message Send one or more contact cards (vCard-like).
send_reaction_message Send an emoji reaction on a previously received/sent message.
send_typing_indicator Show a typing indicator on a received message.
mark_message_as_read Mark an incoming message as read so the sender sees the blue double-check.
upload_media Upload a media file and get back a media_id reusable in send_media_message.
retrieve_media_url Resolve a media_id to a short-lived downloadable URL.
delete_media Delete an uploaded media asset by id.
list_templates List message templates on the WhatsApp Business Account.
create_template Submit a new template for Meta review.
delete_template Delete a message template from the WABA by name.
get_business_profile Read the WhatsApp business profile (about, description, email, websites, vertical, address) for the configu...
update_business_profile Update the business profile on the configured phone number.
list_phone_numbers List all phone numbers registered under the WhatsApp Business Account, including display name, quality rati...
request_verification_code Request Meta to send a verification code to the configured phone number via SMS or voice.
verify_code Submit the verification code received via SMS/voice after request_verification_code.

Install

npm install @codespar/mcp-whatsapp-cloud

Environment

WHATSAPP_ACCESS_TOKEN="EAAG..."           # required (secret), Meta system-user token
WHATSAPP_PHONE_NUMBER_ID="1234567890"     # required, WABA phone number id
WHATSAPP_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:

{
  "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

# 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

Questions about Whatsapp Cloud

What is the Whatsapp Cloud MCP server?

MCP server for WhatsApp Cloud API (Meta), messages, media, and templates via Graph API. Whatsapp Cloud is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Whatsapp Cloud MCP server?

Add Whatsapp Cloud to your AI app's MCP config with the command npx -y @codespar/mcp-whatsapp-cloud@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-whatsapp-cloud -- npx -y @codespar/mcp-whatsapp-cloud@0.2.2. To run Whatsapp Cloud this way you need Node.js installed.

Does Whatsapp Cloud need an API key?

Yes. Whatsapp Cloud expects WHATSAPP_ACCESS_TOKEN, WHATSAPP_PHONE_NUMBER_ID and WHATSAPP_BUSINESS_ACCOUNT_ID to be set. Create the key for Whatsapp Cloud in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Whatsapp Cloud an official MCP server?

No. Whatsapp Cloud is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Whatsapp Cloud access to company data.

What license is Whatsapp Cloud under?

Whatsapp Cloud is released under the MIT license, according to its GitHub repository. The license covers the code of Whatsapp Cloud; the service it connects to has its own terms.