Skip to main content
WC

WhatsApp Cloud

@codespar/mcp-whatsapp-cloud Β· v0.2.2

🌐 GlobalMessagingAuth · API Keybeta22 tools4 env vars

Meta-direct WhatsApp Cloud API. Distinct from our Z-API/Evolution/Take Blip/Zenvia wrappers β€” this is the official Graph API integration (no middleman fees, requires approved WABA). 11 tools across messages, media, templates.

Get started Β· freeView docs

MIT Β· runs locally with your own credentials

Limitations

  • Hosted calls with a test key are not available: the runtime has not recorded this provider's test behaviour (test venue unclassified).
Package
@codespar/mcp-whatsapp-cloud
Version
0.2.2
npm dist-tag
latest
Category
Messaging
Auth
API Key
Country
🌐 Global
License
MIT
Transport
stdio Β· streamable-http

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, with your own credentials.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables4 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 22 tools. Try send_text_message first.
terminal
# Claude Code claude mcp add whatsapp-cloud -e WHATSAPP_ACCESS_TOKEN=… -e WHATSAPP_BUSINESS_ACCOUNT_ID=… -e WHATSAPP_GRAPH_VERSION=… -e WHATSAPP_PHONE_NUMBER_ID=… -- npx -y @codespar/mcp-whatsapp-cloud@0.2.2 # then: /mcp to confirm the server is connected
Environment variables4 variables
WHATSAPP_ACCESS_TOKENMeta system-user access token (permanent). Used as Bearer token for Graph API.requiredsecret
WHATSAPP_BUSINESS_ACCOUNT_IDWhatsApp Business Account (WABA) ID. Used for template management.required
WHATSAPP_GRAPH_VERSIONGraph API version. Defaults to v21.0. Meta bumps quarterly.optional
WHATSAPP_PHONE_NUMBER_IDWhatsApp Business phone number ID registered with Meta.required

Names read from the package code (@codespar/mcp-whatsapp-cloud@0.2.2). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials.

First call demosend_text_message

"Send a plain text message. For business-initiated conversations outside the 24h customer-service window, use send_template_message instead"

tools/callsend_text_messageresult returned

Tools

What your agent can call.

22 tools, as the package's tools/list returns them.

send_text_message

Send a plain text message. For business-initiated conversations outside the 24h customer-service window, use send_template_message instead.

send_template_message

Send an approved message template. Required for business-initiated conversations. Templates must be pre-approved by Meta via create_template.

send_media_message

Send an image, video, document, or audio. Supply either `link` (public URL) or `id` (media_id from upload_media).

send_interactive_message

Send an interactive message (reply buttons or list). Supply a fully-formed `interactive` object per Cloud API spec.

send_interactive_cta_url

Send an interactive message with a single CTA URL button. Opens the URL when the recipient taps it. Available without template approval inside the 24h window.

send_interactive_flow

Send a WhatsApp Flow message. Flows are Meta's structured UI experiences (forms, appointment booking, etc.) rendered inside WhatsApp.

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). Each contact includes name and at least one of phones, emails, addresses, urls, or org.

send_reaction_message

Send an emoji reaction on a previously received/sent message. Pass empty string for `emoji` to clear a reaction.

send_typing_indicator

Show a typing indicator on a received message. Also marks the message as read. Indicator auto-clears after ~25s or when you reply.

mark_message_as_read

Mark an incoming message as read so the sender sees the blue double-check. Uses the wamid from the inbound webhook.

upload_media

Upload a media file and get back a media_id reusable in send_media_message. Multipart POST to /{phone_number_id}/media.

Names and descriptions come from the package's tools/list (@codespar/mcp-whatsapp-cloud@0.2.2). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

codespar_discover lists this server's tools, but a project with a test key cannot call them yet: the runtime has not recorded what this provider does in test mode, and refuses rather than guess.

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the WhatsApp Cloud MCP server?

Run npx -y @codespar/mcp-whatsapp-cloud@0.2.2 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required.

What can my agent do with WhatsApp Cloud?

WhatsApp Cloud exposes 22 tools for messaging. Your agent calls them directly; the full list is above.

How does WhatsApp Cloud authenticate, and how are credentials stored?

WhatsApp Cloud uses API Key. Self-hosted, you hold the credentials: the server reads them from its environment variables.

How does WhatsApp Cloud handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.2.2, the version whose tools are listed here; your agent keeps running it until you change the version.

Is WhatsApp Cloud open source? How do I report a bug?

Yes. WhatsApp Cloud is MIT-licensed and published on npm as @codespar/mcp-whatsapp-cloud, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Start in seconds.

Add the config above, set the variables, and your agent calls the tools.

Start in seconds demo
Add the server to your client with the config above.
Set the environment variables listed above.
Ask your agent for the first call.
WhatsApp Cloud β€” MCP server Β· 22 tools | CodeSpar