SuperAPI AI Directory

whatsapp-mcp

Manage WhatsApp Business message templates via the Meta Cloud API: create, validate and send all template types, including carousel, catalog and flows.

Open website

About this tool

WhatsApp MCP Server is an MCP (Model Context Protocol) server used to manage WhatsApp Business templates and send messages via the Meta Cloud API. It is aimed at developers and teams who need to operate WhatsApp Business templates from AI clients.

Main capabilities: Provides 8 tools, covering the complete template lifecycle: create → validate → approve → send. Supported template types include marketing templates and utility templates, and it automatically identifies structural variants (such as carousels, catalogs, etc.) and applies the correct validators.

How to use:

  1. Clone and install the project.
  2. Configure credentials: set them via environment variables, suitable for local stdio and hosted remote modes. How to obtain credentials: go to Meta for Developers to create or select an app, then navigate to WhatsApp > API Setup.
  3. Connect an MCP client: the server supports 3 transport modes. For HTTP transport, the host/port can be customized.

Configuration examples for each client:

  • Claude Desktop: add to claude_desktop_config.json.
  • Claude.ai: connect a remote MCP server as a custom connector; connections originate from Anthropic cloud servers. The server must be hosted and have environment variables configured, placed behind HTTPS (using nginx, Caddy, or ngrok, Cloudflare Tunnel). In Claude.ai, go to Customize > Connectors → Add custom connector and enter the server URL. Claude supports unauthenticated or OAuth-based servers; for the simplest setup, leave authentication blank. Note: Claude.ai does not support custom request headers, the server must be preconfigured with Meta credentials via environment variables, and each hosted server serves one WhatsApp Business account.
  • ChatGPT: supports remote MCP servers via the Responses API, supporting Streamable HTTP and SSE transports. Option 1: the server is preconfigured with environment variables; Option 2: pass credentials per request via Bearer token, encode the Meta credentials as base64 JSON and pass them in the authorization field. Note: ChatGPT only supports remote MCP servers (no local stdio), and the server must be publicly accessible via HTTPS.
  • Cursor: add to .cursor/mcp.json in the project.
  • VS Code: add to .vscode/mcp.json.

For programmatic access or custom MCP clients, per-request credentials can be passed instead of relying on server environment variables. Two methods are supported: Method 1 — Bearer token (recommended): base64-encode a JSON object containing Meta credentials. Required fields: access_token, phone_number_id, waba_id. Optional: app_id, api_version. Method 2 — X-Meta- request headers. If neither the Bearer token nor the X-Meta-* request headers are present, the server falls back to environment variables.

Once connected, you can talk directly to the AI assistant:

  • "Create a marketing template named summer_sale, including a header image, body text about a 50% discount, and a Shop Now button"
  • "List all approved templates"
  • "Send the order_confirmation template to +919876543210 with order number ORD-456"
  • "Validate this template before I submit it: ..."
  • "Check the status of template ID 123456789"

Template types: The Meta API has 2 template categories (excluding authentication). Within each category, templates can have different structural variants, and each variant has its own component layout and validation rules. Marketing templates, utility templates. How routing works: when create_template is called, the server inspects the components to automatically detect the structural variant (for example, the presence of cards[] → carousel, CATALOG button → catalog) and applies the correct validator. Just pass category: "MARKETING" or "UTILITY"; the variant is determined by the component structure.

Project structure: the repository contains the relevant folders and files.

Limitations and requirements: requires a Meta WhatsApp Business Account, as well as an account with whatsapp_business_messaging and a System User access token with whatsapp_business_management permission. For planned features, see ROADMAP.md.

License: MIT, see LICENSE.

Built by: Jina Connect — WhatsApp Business CX Platform.