Skip to main content
WH

WhatsApp Cloud

v0.2.1API Key

WhatsApp Cloud API directo de Meta. Distinto de nuestros wrappers Z-API/Evolution/Take Blip/Zenvia — esta es la integración oficial con la Graph API (sin comisiones de intermediario, requiere WABA aprobada). 11 herramientas entre mensajes, media y templates.

22 herramientas4 env vars🌐 GLOBALestable en npm

Qué puede hacer tu agente

WhatsApp Cloud le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • send_text_messageSend a plain text message. For business-initiated conversations outside the 24h customer-service window, use send_template_message instead.
  • send_template_messageSend an approved message template. Required for business-initiated conversations. Templates must be pre-approved by Meta via create_template.
  • send_media_messageSend an image, video, document, or audio. Supply either `link` (public URL) or `id` (media_id from upload_media).
Ejemplo de llamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("send_text_message", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-whatsapp-cloud

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "whatsapp-cloud": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-whatsapp-cloud"
      ],
      "env": {
        "WHATSAPP_ACCESS_TOKEN": "<your_whatsapp_access_token>",
        "WHATSAPP_PHONE_NUMBER_ID": "<your_whatsapp_phone_number_id>",
        "WHATSAPP_BUSINESS_ACCOUNT_ID": "<your_whatsapp_business_account_id>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá send_text_message primero.

Variables de entorno · 4

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

WHATSAPP_ACCESS_TOKEN
obligatoriosecret

Meta system-user access token (permanent). Used as Bearer token for Graph API.

WHATSAPP_PHONE_NUMBER_ID
obligatorio

WhatsApp Business phone number ID registered with Meta.

WHATSAPP_BUSINESS_ACCOUNT_ID
obligatorio

WhatsApp Business Account (WABA) ID. Used for template management.

WHATSAPP_GRAPH_VERSION
opcional

Graph API version. Defaults to v21.0. Meta bumps quarterly.

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEsend_text_message
Send a plain text message. For business-initiated conversations outside the 24h customer-service window, use send_template_message instead.
WRITEsend_template_message
Send an approved message template. Required for business-initiated conversations. Templates must be pre-approved by Meta via create_template.
WRITEsend_media_message
Send an image, video, document, or audio. Supply either `link` (public URL) or `id` (media_id from upload_media).
WRITEsend_interactive_message
Send an interactive message (reply buttons or list). Supply a fully-formed `interactive` object per Cloud API spec.
WRITEsend_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.
WRITEsend_interactive_flow
Send a WhatsApp Flow message. Flows are Meta's structured UI experiences (forms, appointment booking, etc.) rendered inside WhatsApp.
WRITEsend_location_message
Send a location pin with latitude/longitude and optional name/address.
WRITEsend_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.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-whatsapp-cloud` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
WhatsApp Cloud — MCP server · 22 tools | CodeSpar