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

# MCP

> Let an AI agent manage SaaS Mode customers, onboarding links, and customer channels.

## Connect

The MCP endpoint is:

```text theme={null}
https://api.hookmyapp.com/mcp
```

Authenticate with an organization API key (`hmok_...`) passed as a Bearer token:

```http theme={null}
Authorization: Bearer hmok_...
```

For copy-paste client configuration (Codex, Claude Code, Cursor) and authentication options, see [MCP](/whatsapp/mcp-server).

## SaaS Mode flow

Ask your agent to work in this order:

1. List customers.
2. Create or choose a customer.
3. Create an onboarding link for that customer.
4. List the customer's channels after they connect.
5. Send messages or manage webhooks for the customer channel.

## Tools

| Tool                                | Use it for                                                                                                                                                                                                                                                          |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status`                            | Check auth, organization, usage, and suggested next steps. Also returns unacknowledged `notifications[]`                                                                                                                                                            |
| `acknowledge_notification`          | Mark a notification from `status` `notifications[]` as seen, after relaying it to a human. Idempotent                                                                                                                                                               |
| `list_workspaces`                   | List workspaces and customers                                                                                                                                                                                                                                       |
| `create_workspace`                  | Create a workspace                                                                                                                                                                                                                                                  |
| `delete_workspace`                  | Delete a workspace (org admin; team and customer alike). Deletes it outright when it has no channels and no usage history; otherwise deprecates it, disconnecting its channels and keeping history for stats and billing. Refuses the organization's last workspace |
| `list_customers`                    | List customers in the organization                                                                                                                                                                                                                                  |
| `create_customer`                   | Create a customer                                                                                                                                                                                                                                                   |
| `list_onboarding_links`             | List customer connect links                                                                                                                                                                                                                                         |
| `create_onboarding_link`            | Create a WhatsApp connect link for a customer                                                                                                                                                                                                                       |
| `revoke_onboarding_link`            | Revoke a customer connect link so it can no longer be used                                                                                                                                                                                                          |
| `list_channels`                     | List channels for one customer using that customer's `ws_` ID                                                                                                                                                                                                       |
| `get_channel`                       | Read one customer channel                                                                                                                                                                                                                                           |
| `set_forwarding`                    | Pause or resume forwarding on a customer channel                                                                                                                                                                                                                    |
| `send_message`                      | Send a WhatsApp message through a customer channel                                                                                                                                                                                                                  |
| `get_webhook_config`                | Read one customer channel webhook destination                                                                                                                                                                                                                       |
| `get_hmac_secret`                   | Read a customer channel's current webhook signing secret without rotating it                                                                                                                                                                                        |
| `set_webhook_destination`           | Set one customer channel webhook destination                                                                                                                                                                                                                        |
| `clear_webhook_destination`         | Clear one customer channel webhook destination                                                                                                                                                                                                                      |
| `rotate_hmac`                       | Rotate a customer channel webhook signing secret                                                                                                                                                                                                                    |
| `set_org_destination`               | Set the organization default destination for new customer channels                                                                                                                                                                                                  |
| `apply_org_destination_to_channels` | Apply the organization destination to existing customer channels                                                                                                                                                                                                    |
| `list_deliveries`                   | List delivery logs for one customer channel                                                                                                                                                                                                                         |
| `get_delivery`                      | Read one delivery log by channel + its `wd_` ID from `list_deliveries`                                                                                                                                                                                              |
| `get_org_usage`                     | Check organization usage for the current quota period                                                                                                                                                                                                               |
| `get_alert_phone_status`            | Check your alert phone and what it receives                                                                                                                                                                                                                         |
| `set_alert_phone`                   | Set your alert phone. Sends a 6-digit code to confirm it                                                                                                                                                                                                            |
| `verify_alert_phone`                | Confirm your alert phone with the code                                                                                                                                                                                                                              |
| `remove_alert_phone`                | Remove your alert phone                                                                                                                                                                                                                                             |

## Examples

Ask your agent to create a customer connect link:

```text theme={null}
Use HookMyApp MCP to create a WhatsApp onboarding link for Acme Corp.
```

Ask your agent to inspect a customer's channels:

```text theme={null}
Use HookMyApp MCP to list my customers, find Acme Corp, then list Acme's channels.
```

Ask your agent to send a customer-channel message:

```text theme={null}
Use HookMyApp MCP to send "Your order is ready" through Acme's WhatsApp channel.
```

## Customer channels

`list_channels` takes a `workspaceId`. For SaaS Mode, pass the customer's `ws_` ID.

Do not list your own workspace channels when you mean customer channels. First choose the customer, then list channels for that customer's `ws_` ID.

## Related

* [CLI](/saas-mode/cli): run the same customer flow from the terminal.
* [API overview](/saas-mode/api/overview): manage customers and channels from your app.
* [Onboarding links](/saas-mode/onboarding-links): let customers connect their own accounts.
