Skip to main content
Glama
Gonzalez8

whatsapp-business-mcp

by Gonzalez8

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoHTTP transport bind address.0.0.0.0
PORTNoHTTP transport port.3000
MCP_HTTP_PATHNoHTTP transport endpoint path./mcp
MCP_TRANSPORTNoTransport mode: stdio or http.stdio
WHATSAPP_TOKENYesMeta Graph API access token (system user token recommended).
MCP_BEARER_TOKENNoIf set, HTTP requests must send Authorization: Bearer <token>.
WHATSAPP_API_VERSIONNoGraph API version.v23.0

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
wa_get_business_accountsA

DISCOVERY — START HERE.

List all WhatsApp Business Accounts (WABAs) owned by a Meta Business. This is the entry point for almost every other tool: most calls take a waba_id returned here.

Typical flow:

  1. wa_get_business_accounts (this tool) → pick a waba_id

  2. wa_get_phone_numbers(waba_id) → pick a phone_number_id for sending

  3. wa_get_templates(waba_id) → pick an APPROVED template

  4. wa_send_template(phone_number_id, to, template_name, language_code, ...)

Resources whatsapp://business-accounts/{business_id} provide the same data and can be cached by the host.

wa_get_phone_numbersA

List phone numbers registered to a WhatsApp Business Account (WABA).

Use this to discover the phone_number_id required by wa_send_template. display_phone_number is the human-readable number (e.g. +351 91 234 5678); id is the numeric resource ID you pass as phone_number_id to send.

Also returns quality_rating (GREEN/YELLOW/RED) and messaging status, useful for diagnosing delivery problems.

wa_get_templatesA

List message templates for a WhatsApp Business Account (WABA), with optional filters.

When to use: discovery before sending (wa_send_template requires an APPROVED template), auditing template inventory, or verifying review status after wa_create_template.

Filters are applied server-side (status, name) or client-side (language). Use pagination via after when has_more is true in the response.

Returns: { count, templates[], has_more, next_cursor? } where each template includes name, language, status, category and component definitions.

wa_create_templateA

Create a new message template in a WABA. Templates go through Meta review before they can be sent.

When to use: setting up a new outbound notification, marketing or authentication message type.

Inputs:

  • name: lowercase letters, digits, underscores only.

  • language: locale code matching Meta's list (en, pt_PT, es_ES, ...).

  • category: UTILITY | MARKETING | AUTHENTICATION. Affects pricing and review rules.

  • components_json: JSON array following Meta's component schema. Common types: [{"type":"HEADER","format":"TEXT","text":"Hello"}, {"type":"BODY","text":"Hi {{1}}, your code is {{2}}.","example":{"body_text":[["Alice","123"]]}}, {"type":"FOOTER","text":"Reply STOP to opt out"}]

Returns: the new template's ID. Status starts as PENDING; poll wa_get_templates for review result.

wa_delete_templateA

Delete a message template from a WABA by name. WARNING: deletes ALL languages of that template.

When to use: removing obsolete or rejected templates. Cannot be undone.

Note: deletion is irreversible. Confirm with the user before invoking.

wa_send_templateA

Send a pre-approved template message to a recipient on WhatsApp.

When to use: outbound notifications, marketing or utility messages where the recipient is outside the 24-hour customer service window, or any first-contact message.

Requirements:

  • The template must already exist and be in APPROVED status (use wa_get_templates to verify).

  • phone_number_id is the numeric ID of YOUR sending number (from wa_get_phone_numbers), NOT the destination phone.

  • to must be E.164 (digits only, country code first), e.g. 351912345678.

  • components_json is required when the template has variables ({{1}}, header media, buttons).

Returns: the WhatsApp message ID (wamid) on success, which can be used with wa_get_message_status.

Limitations: templates with header media require uploaded media handles; delivery/read status is delivered asynchronously via webhooks — this tool returns only the accepted message ID.

wa_get_message_statusA

Look up information about a previously sent WhatsApp message by its ID.

Use this after wa_send_template to confirm Graph API received the message. Note that WhatsApp delivery/read status (sent → delivered → read) is pushed asynchronously via webhooks; the Graph API does not expose a polling endpoint for those transitions. This tool retrieves the message resource directly and surfaces whatever Meta returns.

Inputs: the wamid returned by wa_send_template.

wa_api_callA

Escape hatch for WhatsApp Business / Meta Graph endpoints that don't have a dedicated tool yet.

Restricted: only paths matching a curated allowlist of WhatsApp Business resources are accepted (message_templates, phone_numbers, messages, media, business_profile, analytics, subscribed_apps, owned_whatsapp_business_accounts, single-ID reads, wamid lookups). Anything else is rejected.

Prefer the typed tools when one matches — they validate inputs and surface clearer errors.

Inputs:

  • path: starts with /, e.g. /{waba_id}/subscribed_apps

  • query_params: raw query string without leading ? (will be appended)

  • body_json: JSON string of the request body, used with POST/DELETE

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Gonzalez8/whatsapp-business-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server