> ## 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

> Use o endpoint MCP do Watahub a partir de um agente que fale JSON-RPC.

`POST https://cloud.watahub.dev/mcp` aceita a mesma chave de API da conta que `/v1`, em `Authorization: Bearer` ou `X-API-Key`. Cada ferramenta chama uma rota `/v1`; não é uma cópia completa da API HTTP.

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

## Ferramentas

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

Sem `phoneNumberId`, `create_webhook` cria um webhook de projeto. `send_text` envia uma mensagem de texto (`kind: "text"`). `send_broadcast` cria um rascunho e o coloca na fila imediatamente; `recipients` é um array de 1 a 500 números só com dígitos, e o modelo precisa estar em cache e `APPROVED`.

Não coloque a chave em clientes públicos. Veja [autenticação](https://docs.watahub.dev/pt-BR/authentication.md), [webhooks](https://docs.watahub.dev/pt-BR/webhooks.md) e [campanhas](https://docs.watahub.dev/pt-BR/broadcasts.md).


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