> ## 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 AI agents operate HookMyApp directly.

Endpoint:

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

## Authentication

Choose the auth option your MCP client supports:

* Sign in from your MCP client: add the server by URL and sign in when prompted (for example `/mcp` in Claude Code). No API key needed.
* HookMyApp CLI (Claude Code): `hookmyapp login` configures the MCP server automatically, with no extra setup.
* API key: create an API key in HookMyApp and pass it as a header.

Accepted API key headers:

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

```http theme={null}
X-API-Key: hmok_...
```

Use `Authorization: Bearer` for bearer-token clients. Use `X-API-Key` when your MCP client lets you configure custom headers.

## Connect

### Sign in from your client

```bash theme={null}
claude mcp add --transport http hookmyapp https://api.hookmyapp.com/mcp
```

Run `/mcp`, pick `hookmyapp`, and approve the sign-in in your browser.

### HookMyApp CLI (Claude Code)

If you use the HookMyApp CLI, MCP is already configured. `hookmyapp login` sets it up. To repair or re-run it:

```bash theme={null}
hookmyapp mcp install --agent claude
hookmyapp doctor
```

MCP tools load when a session starts, so restart Claude Code after installing. Until then, every operation works through the `hookmyapp` CLI.

### API key

Set your HookMyApp API key:

```bash theme={null}
export HOOKMYAPP_API_KEY="hmok_..."
```

<CodeGroup>
  ```bash Codex theme={null}
  codex mcp add hookmyapp --url https://api.hookmyapp.com/mcp --bearer-token-env-var HOOKMYAPP_API_KEY
  ```

  ```bash Claude Code theme={null}
  claude mcp add --transport http hookmyapp https://api.hookmyapp.com/mcp \
    --header "Authorization: Bearer $HOOKMYAPP_API_KEY"
  ```

  ```json Cursor theme={null}
  {
    "mcpServers": {
      "hookmyapp": {
        "url": "https://api.hookmyapp.com/mcp",
        "headers": {
          "Authorization": "Bearer ${env:HOOKMYAPP_API_KEY}"
        }
      }
    }
  }
  ```
</CodeGroup>

### Use X-API-Key instead

Codex CLI has no `--header` flag, so `X-API-Key` goes in `~/.codex/config.toml`. For Cursor and Claude Code, swap the header.

<CodeGroup>
  ```toml Codex theme={null}
  [mcp_servers.hookmyapp]
  url = "https://api.hookmyapp.com/mcp"
  env_http_headers = { "X-API-Key" = "HOOKMYAPP_API_KEY" }
  ```

  ```bash Claude Code theme={null}
  claude mcp add --transport http hookmyapp https://api.hookmyapp.com/mcp \
    --header "X-API-Key: $HOOKMYAPP_API_KEY"
  ```

  ```json Cursor theme={null}
  {
    "mcpServers": {
      "hookmyapp": {
        "url": "https://api.hookmyapp.com/mcp",
        "headers": {
          "X-API-Key": "${env:HOOKMYAPP_API_KEY}"
        }
      }
    }
  }
  ```
</CodeGroup>

## Tools

| Tool                                | Use it for                                                                                                                                                                                                                                                          |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status`                            | Check auth, organization, scopes, and 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_channels`                     | List WhatsApp channels in a workspace                                                                                                                                                                                                                               |
| `get_channel`                       | Read channel details                                                                                                                                                                                                                                                |
| `send_message`                      | Send a WhatsApp message                                                                                                                                                                                                                                             |
| `get_webhook_config`                | Read a channel webhook destination                                                                                                                                                                                                                                  |
| `get_hmac_secret`                   | Read a channel's current webhook signing secret without rotating it                                                                                                                                                                                                 |
| `set_webhook_destination`           | Set a channel webhook destination                                                                                                                                                                                                                                   |
| `clear_webhook_destination`         | Clear a channel webhook destination                                                                                                                                                                                                                                 |
| `rotate_hmac`                       | Rotate a channel webhook signing secret                                                                                                                                                                                                                             |
| `set_forwarding`                    | Enable or disable forwarding                                                                                                                                                                                                                                        |
| `list_deliveries`                   | List delivery logs for a 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                                                                                                                                                                                                                                             |
| `list_onboarding_links`             | List customer onboarding links                                                                                                                                                                                                                                      |
| `create_onboarding_link`            | Create a customer onboarding link                                                                                                                                                                                                                                   |
| `revoke_onboarding_link`            | Revoke a customer onboarding link so it can no longer be used                                                                                                                                                                                                       |
| `set_org_destination`               | Set the default destination for customer channels                                                                                                                                                                                                                   |
| `apply_org_destination_to_channels` | Apply or clear the organization destination in bulk                                                                                                                                                                                                                 |

## Examples

Ask your agent to check setup:

```text theme={null}
Use HookMyApp MCP to check my organization status and tell me the next action.
```

Ask your agent to inspect channels:

```text theme={null}
Use HookMyApp MCP to list my workspaces, then list the WhatsApp channels in the active workspace.
```

Ask your agent to send a message:

```text theme={null}
Use HookMyApp MCP to send "Hello from HookMyApp" from channel ch_xxxxxxxx.
```

## Project MCP vs docs MCP

| Server      | Endpoint                        | Use it for                                                           |
| ----------- | ------------------------------- | -------------------------------------------------------------------- |
| Project MCP | `https://api.hookmyapp.com/mcp` | Operating HookMyApp with the CLI-configured credential or an API key |
| Docs MCP    | Not published yet               | Documentation lookup only                                            |

Use the [CLI](/whatsapp/cli) when your agent has terminal access. Use MCP when your agent supports MCP and should operate HookMyApp directly.
