# PushAlert — how to use (mcp.ai)

Connect your PushAlert account and use 9 tools for notifications straight from your AI agent. Connect with your own API key. Send and manage Web Push notifications, subscriber segments, attributes, and automation for a PushAlert website project.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_push_alert?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `push_alert_add_subscribers_to_segment`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/push_alert`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/push_alert/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/push_alert/add/subscribers/to/segment` — Add one or more Web Push subscribers to an existing segment.
  - body: { segment_id: integer, subscriber_ids: string[] }
- `POST https://api.mcp.ai/api/push_alert/create/segment` — Create a Web Push subscriber segment with a letters-and-digits name.
  - body: { name: string }
- `POST https://api.mcp.ai/api/push_alert/delete/segment` — Permanently delete a Web Push subscriber segment by ID.
  - body: { segment_id: integer }
- `POST https://api.mcp.ai/api/push_alert/get/notification/stats` — Get attempted, delivered, clicked, and click-through-rate statistics for a Web Push notification.
  - body: { notification_id: integer }
- `POST https://api.mcp.ai/api/push_alert/get/subscriber/attributes` — Get custom attributes for a Web Push subscriber.
  - body: { subscriber_id: string }
- `POST https://api.mcp.ai/api/push_alert/list/segments` — List all Web Push subscriber segments and their subscriber counts.
- `POST https://api.mcp.ai/api/push_alert/remove/subscribers/from/segment` — Remove one or more Web Push subscribers from an existing segment.
  - body: { segment_id: integer, subscriber_ids: string[] }
- `POST https://api.mcp.ai/api/push_alert/send/web/push/notification` — Send an irreversible Web Push notification to a saved segment, explicit subscriber IDs, or attribute-matched subscribers. If no targeting field is supplied, sends to every subscriber. Excludes paid ri
  - body: { url: string, icon?: string, title: string, message: string, attributes?: object, segment_id?: integer, subscriber?: string, expire_time?: integer, subscribers?: string[] }
- `POST https://api.mcp.ai/api/push_alert/set/subscriber/attributes` — Add or update custom attributes for a Web Push subscriber.
  - body: { attributes: object, subscriber_id: string }

## Example prompts
- "What can I do in PushAlert?"
- "Show me a summary of my PushAlert account"

## More
- Page: https://mcp.ai/push_alert
- Agent spec (llms.txt): https://mcp.ai/push_alert/llms.txt
- Postman collection: https://mcp.ai/push_alert/postman.json
