# Management MCP

HTML: https://www.app2email.com/docs/api/agents · Index: https://www.app2email.com/docs/api/llms.txt

An agent starts the account; the person confirms it, connects WhatsApp and chooses a plan.

Endpoint: `https://api.app2email.com/mcp/manage` (Streamable HTTP; protocol 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05)

Auth: none for create_sandbox, create_account, list_plans and estimate_cost; Authorization: Bearer <management_key> for the rest

REST: `https://api.app2email.com/v1/account/…`, same tools, same auth.

## Flow

1. `create_account {"contact_email": "owner@example.com"}` → `signup_id`, `management_key` (shown once), `onboarding_link`, `message`. No key needed.
2. The person opens `onboarding_link`: confirms the e-mail, connects their WhatsApp number, chooses a plan. Nothing can be sent before that.
3. `get_account_status` → `pending_email` · `pending_whatsapp` · `pending_payment` · `live`. Send `Authorization: Bearer <management_key>` from here on.
4. `create_number_key {"number": "4976659348270", "scopes": ["messages:send", "messages:read"], "sandbox": true}` → a key for the messaging MCP (`https://api.app2email.com/mcp`, https://www.app2email.com/docs/api/mcp.md) and the REST API.

## Install

`create_account` and `list_plans` work without the header; add it once you have the key.

### Claude Code

https://code.claude.com/docs/en/mcp

```shell
claude mcp add --transport http app2email-manage https://api.app2email.com/mcp/manage --header "Authorization: Bearer YOUR_MANAGEMENT_KEY"
```

### .mcp.json

https://code.claude.com/docs/en/mcp

```json
{
  "mcpServers": {
    "app2email-manage": {
      "type": "http",
      "url": "https://api.app2email.com/mcp/manage",
      "headers": {
        "Authorization": "Bearer ${APP2EMAIL_MANAGEMENT_KEY}"
      }
    }
  }
}
```

### claude.ai

Customize → Connectors → + Add → Add custom connector. (https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)

```text
URL:             https://api.app2email.com/mcp/manage
Authentication:  No sign in
Request header:  Authorization: Bearer YOUR_MANAGEMENT_KEY
```

### Cursor

~/.cursor/mcp.json (https://cursor.com/docs/context/mcp)

```json
{
  "mcpServers": {
    "app2email-manage": {
      "url": "https://api.app2email.com/mcp/manage",
      "headers": {
        "Authorization": "Bearer ${env:APP2EMAIL_MANAGEMENT_KEY}"
      }
    }
  }
}
```

### VS Code

.vscode/mcp.json (https://code.visualstudio.com/docs/agents/reference/mcp-configuration)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "app2email-manage-key",
      "description": "app2email management key",
      "password": true
    }
  ],
  "servers": {
    "app2email-manage": {
      "type": "http",
      "url": "https://api.app2email.com/mcp/manage",
      "headers": {
        "Authorization": "Bearer ${input:app2email-manage-key}"
      }
    }
  }
}
```

### Codex

~/.codex/config.toml, with APP2EMAIL_MANAGEMENT_KEY set in the environment. (https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

```toml
[mcp_servers.app2email-manage]
url = "https://api.app2email.com/mcp/manage"
bearer_token_env_var = "APP2EMAIL_MANAGEMENT_KEY"
```

### ChatGPT

Needs OAuth: not yet.

## Tools

| Tool | What | Kind |
| --- | --- | --- |
| `create_sandbox` | Try the API now, with no account and no person: an instant sandbox key (shown once, valid 7 days) for app2email's demo number, its pretend customers and the fi… | changes |
| `create_account` | Start an app2email account for a person. | changes |
| `get_account_status` | What the account still needs: pending_email, pending_whatsapp, pending_payment or live, with its numbers and next steps. | read-only |
| `list_plans` | The plans that can be bought, with prices (US$) and whether they include the API. | read-only |
| `estimate_cost` | What app2email costs for a number of messages a month: the plan that fits and its exact price (US$). | read-only |
| `list_numbers` | The account's WhatsApp numbers with their status and plan. | read-only |
| `get_payment_link` | A Stripe Checkout link for a plan of one number. | changes |
| `create_number_key` | A key for one live number, for the messaging MCP server and the REST API. | changes |
| `list_number_keys` | The keys of one number (never the keys themselves). | read-only |
| `revoke_number_key` | Revoke one key of a number. | destructive |
| `get_usage` | Messages sent this billing month and the plan limit, for every number or one. | read-only |

## REST twins

- [Instant sandbox: try the API with no account](https://www.app2email.com/docs/api/account-management/create-sandbox.md): `POST /v1/account/sandbox` (`create_sandbox`)
- [Start an account for a person (agent sign-up)](https://www.app2email.com/docs/api/account-management/create-account.md): `POST /v1/account/signup` (`create_account`)
- [Account status and what is still needed](https://www.app2email.com/docs/api/account-management/get-account.md): `GET /v1/account` (`get_account_status`)
- [Plans that can be bought](https://www.app2email.com/docs/api/account-management/list-account-plans.md): `GET /v1/account/plans` (`list_plans`)
- [Cost estimate for a number of messages a month](https://www.app2email.com/docs/api/account-management/estimate-cost.md): `GET /v1/account/estimate` (`estimate_cost`)
- [The account's WhatsApp numbers](https://www.app2email.com/docs/api/account-management/list-account-numbers.md): `GET /v1/account/numbers` (`list_numbers`)
- [One number of the account](https://www.app2email.com/docs/api/account-management/get-account-number.md): `GET /v1/account/numbers/{number}`
- [The keys of a number](https://www.app2email.com/docs/api/account-management/list-number-keys.md): `GET /v1/account/numbers/{number}/keys` (`list_number_keys`)
- [Create a key for a number](https://www.app2email.com/docs/api/account-management/create-number-key.md): `POST /v1/account/numbers/{number}/keys` (`create_number_key`)
- [Revoke a key of a number](https://www.app2email.com/docs/api/account-management/revoke-number-key.md): `DELETE /v1/account/numbers/{number}/keys/{key_id}` (`revoke_number_key`)
- [Payment link for a plan of a number](https://www.app2email.com/docs/api/account-management/create-number-checkout.md): `POST /v1/account/numbers/{number}/checkout` (`get_payment_link`)
- [Messages used this billing month, per number](https://www.app2email.com/docs/api/account-management/get-account-usage.md): `GET /v1/account/usage` (`get_usage`)
- [Account keys](https://www.app2email.com/docs/api/account-management/list-account-keys.md): `GET /v1/account/keys`
- [Create an account key](https://www.app2email.com/docs/api/account-management/create-account-key.md): `POST /v1/account/keys`
- [Revoke an account key](https://www.app2email.com/docs/api/account-management/revoke-account-key.md): `DELETE /v1/account/keys/{key_id}`
- [Account webhooks](https://www.app2email.com/docs/api/account-management/list-account-webhooks.md): `GET /v1/account/webhooks`
- [Add an account webhook](https://www.app2email.com/docs/api/account-management/create-account-webhook.md): `POST /v1/account/webhooks`
- [Change an account webhook](https://www.app2email.com/docs/api/account-management/update-account-webhook.md): `PATCH /v1/account/webhooks/{id}`
- [Delete an account webhook](https://www.app2email.com/docs/api/account-management/delete-account-webhook.md): `DELETE /v1/account/webhooks/{id}`
- [Send a test event to an account webhook](https://www.app2email.com/docs/api/account-management/test-account-webhook.md): `POST /v1/account/webhooks/{id}/test`
- [New signing secret for an account webhook](https://www.app2email.com/docs/api/account-management/rotate-account-webhook-secret.md): `POST /v1/account/webhooks/{id}/rotate-secret`
- [Deliveries of an account webhook](https://www.app2email.com/docs/api/account-management/list-account-webhook-deliveries.md): `GET /v1/account/webhooks/{id}/deliveries`
- [One delivery of an account webhook](https://www.app2email.com/docs/api/account-management/get-account-webhook-delivery.md): `GET /v1/account/webhooks/{id}/deliveries/{event_id}`
- [Send a stored event again to an account webhook](https://www.app2email.com/docs/api/account-management/redeliver-account-webhook-event.md): `POST /v1/account/webhooks/{id}/deliveries/{event_id}/redeliver`
