# MCP server

Let an AI agent send pushes, schedule notifications, manage apps and read analytics with one access token.

MCP server URL: `https://app.nativenotify.com/mcp`

## 1. Create an access token

Open **MCP** in the [dashboard](https://dashboard.nativenotify.com/mcp) header, choose an expiry (30 days, 90 days, 1 year or never) and click **Create access token**. Prefer a finite expiry. The dashboard warns you before it creates a token that never expires.

The window that opens shows the token once. Only a hash is stored, so it can't be shown again: copy it somewhere safe, name it (the default is "Native Notify Access Token") and click **Save**.

Create as many tokens as you like, for example one per agent. The list shows each name and a short prefix such as `nnmcp_1741b5…`. Revoke a token from the same page and it stops working within about a minute. A lost token can't be recovered, so create a new one and revoke the old. Treat a token like a password: anyone holding it can act on your account.

## 2. Connect your client

<!-- tabs -->

#### Claude Code

```bash
claude mcp add --transport http native-notify https://app.nativenotify.com/mcp \
  --header "Authorization: Bearer nnmcp_YOUR_TOKEN"
```

#### Cursor

```json
{
  "mcpServers": {
    "native-notify": {
      "type": "http",
      "url": "https://app.nativenotify.com/mcp",
      "headers": {
        "Authorization": "Bearer nnmcp_YOUR_TOKEN"
      }
    }
  }
}
```

Other clients that read `mcpServers` use the same JSON. Windsurf names the URL field `serverUrl` instead of `url`.

#### URL only

For clients that accept only a server URL, such as a custom connector in Claude Desktop, append the token as a query parameter. The URL contains the token, so keep it secret.

```text
https://app.nativenotify.com/mcp?token=nnmcp_YOUR_TOKEN
```

<!-- /tabs -->

## 3. Check the connection

Ask your agent to run `get_account` or `list_apps`. If it answers with your real account data, you're connected.

## Tools

| Area               | Tools                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Account and apps   | `get_account` (plan, billing state, MAU and every app with its id and token), `list_apps`, `get_app`, `create_app` (creates a classic app), `rename_app`, `set_website_to_app_url`, `update_app_settings` (push credentials), `upload_apns_key` (the Apple `.p8` key, stored encrypted; owner or admin only), `delete_app` (owner or admin only)                                                                                                                                 |
| Send               | `send_notification_to_universal_group` sends one push to every device in a group. See [Groups](/docs/push/groups).                                                                                                                                                                                                                                                                                                                                                               |
| Schedule rules     | `list_schedule_rules`, `list_upcoming_scheduled_sends`, `list_schedule_rule_runs`, `create_schedule_rule`, `update_schedule_rule`, `delete_schedule_rule`, `set_quiet_hours`, `generate_ai_schedule_sample`, `list_segments` (the audience ids a rule can target). Daily and weekly rules for every app, one-offs for Agent Notify projects, with fixed or AI-written copy. See [Scheduling](/docs/push/scheduling) and [AI-written notifications](/docs/push/ai-notifications). |
| Inbox and audience | `list_universal_inbox`, `delete_universal_inbox_send`, `get_universal_audience`, `lookup_universal_audience`, `get_universal_token_health`. Agent Notify projects only.                                                                                                                                                                                                                                                                                                          |
| Team members       | `list_team_members`, `invite_team_member`, `update_team_member_role`, `remove_team_member`, `list_team_invites`, `cancel_team_invite`. Owner only. See [Team members](/docs/team-members).                                                                                                                                                                                                                                                                                       |
| Groups             | `list_universal_groups`, `get_universal_group`, `list_universal_group_members`, `subscribe_to_universal_group`, `unsubscribe_from_universal_group`. The first subscribe creates a group, unless you pass `create: false`. See [Groups](/docs/push/groups).                                                                                                                                                                                                                       |
| Web push           | `get_web_push_keys` returns the app's VAPID public key and registration details. See [Web push](/docs/push/web-push).                                                                                                                                                                                                                                                                                                                                                            |
| App keys           | `get_app_web_key` (the publishable web key), `rotate_app_web_key`, `get_app_token_status`, `rotate_app_token` (a new token, with a grace window for the old one), `retire_previous_app_token`. See [App keys](/docs/push/app-keys).                                                                                                                                                                                                                                              |
| Analytics          | `get_analytics_summary`, `get_active_users`, `get_views`, `get_screen_usage`, `get_retention`, `get_best_send_times`, `get_notification_delivery_stats`, `get_notification_failures`, `export_analytics_csv`. See [Analytics](/docs/analytics).                                                                                                                                                                                                                                  |
| Docs               | `search_docs` and `read_doc` serve these pages live, so an agent reads the current API.                                                                                                                                                                                                                                                                                                                                                                                          |

## Notes

- **Apps.** App-scoped tools take an app id or name. `list_apps` and `get_account` return both, plus each app's `source` (`classic` or `agent_notify`) and `pipeline` (`classic` or `universal`).
- **Classic apps.** The server runs the push API only. Apps on Expo Push (Classic) aren't operated through MCP. The agent points you to the [classic docs](/docs/setup/installation).
- **Live actions.** Sends can't be recalled. A schedule rule created or turned on with `enabled: true` sends real pushes from its next occurrence, with no confirmation step over MCP. Agents are told to confirm the copy, audience and timing with you first, and `create_schedule_rule` requires `enabled`.
- **Billing state.** `get_account` returns it, so an agent can explain a refused send. See [Billing state for agents](/docs/billing#billing-state-for-agents).
- **Scope.** A token acts like your dashboard session, including apps shared with you through a team. It can't read or change MCP tokens.
- **Dead tokens.** An expired or revoked token gets a `401` that points to the dashboard's MCP page.
