> ## Documentation Index
> Fetch the complete documentation index at: https://docs.watahub.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Usa el endpoint MCP de Watahub desde un agente que hable JSON-RPC.

`POST https://cloud.watahub.dev/mcp` acepta la misma clave API de la cuenta que `/v1`, en `Authorization: Bearer` o `X-API-Key`. Cada herramienta llama a una ruta `/v1`; no es una copia completa de la API HTTP.

```bash theme={null}
claude mcp add --transport http watahub https://cloud.watahub.dev/mcp \
  --header "Authorization: Bearer $WATAHUB_API_KEY"
```

## Herramientas

| Herramienta | `/v1` | Argumentos |
| - | - | - |
| `list_numbers` | `GET /v1/phones` | ninguno |
| `list_messages` | `GET /v1/messages` | ninguno |
| `send_text` | `POST /v1/messages` | `phoneNumberId`, `to`, `text` |
| `create_webhook` | `POST /v1/phones/{id}/webhooks` o `POST /v1/project-webhooks` | `url`, `secret` (32+ caracteres), `events`; opcionales `phoneNumberId` y `active` |
| `create_setup_link` | `POST /v1/setup-links` | `allowedOrigins`; opcionales `customerId`, `successRedirectUrl`, `failureRedirectUrl` |
| `list_templates` | `GET /v1/message-templates` | `wabaId` opcional |
| `send_broadcast` | `POST /v1/broadcasts` y luego `POST /v1/broadcasts/{id}/send` | `name`, `phoneNumberId`, `templateName`, `templateLanguage`, `recipients` |

Sin `phoneNumberId`, `create_webhook` crea un webhook de proyecto. `send_text` envía un mensaje de texto (`kind: "text"`). `send_broadcast` crea un borrador y lo pone en cola de inmediato; `recipients` es un arreglo de 1 a 500 números solo con dígitos, y la plantilla tiene que estar en caché y `APPROVED`.

No pongas la clave en clientes públicos. Consulta [autenticación](https://docs.watahub.dev/es/authentication.md), [webhooks](https://docs.watahub.dev/es/webhooks.md) y [campañas](https://docs.watahub.dev/es/broadcasts.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.