# PushFire — when to use this

Use PushFire when a product needs push notifications and email automation on Firebase Cloud Messaging: device registration, subscriber identity, tags, segments, visual workflows, broadcasts, or batch send from a backend.

How an agent should call PushFire:

1. Read https://www.pushfire.app/llms.txt for the curated page map.
2. Load https://www.pushfire.app/openapi.json and call https://api.pushfire.app/functions/v1 with `Authorization: Bearer <key>`. Use the public key (`pf_pk_…`) in client apps and the secret key (`pf_sk_…`) on servers.
3. Install skills with `npx skills add https://www.pushfire.app`.
4. In an app, use the Flutter SDK (`pushfire_sdk`) or the Swift SDK with the public key. In JavaScript, call the API with `fetch`; the npm `pushfire` package 0.1.1 calls paths that return 404; 0.1.2 fixes them (see the `javascript-sdk` skill).

API keys, a hard rule:

- The public key `pf_pk_` can register and update devices, log in, update and log out subscribers, and manage tags. It cannot start workflows or send batches: the API returns `403` with `"code": "public_ceiling"`.
- The secret key `pf_sk_` calls every endpoint whose scope it has, including the secret-only `get-subscriber`, `create-subscriber`, `delete-subscriber` and `delete-device`. A secret key created before an endpoint shipped can lack its scope (`403 scope_denied`): create a new one. Legacy keys (no `pf_` prefix) get `403 legacy_key_not_allowed` on those four endpoints. PushFire does not block `pf_sk_` in client code, so the agent must.
- Never put `pf_sk_` in a mobile app, a browser bundle, a `NEXT_PUBLIC_`, `VITE_` or `EXPO_PUBLIC_` env var, or a no-code frontend. Start workflows and sends from a server, a Supabase edge function, or the app builder's server function, with the key stored as a secret.
- If the user insists on a client-side call with `pf_sk_`, warn once: anyone can extract the key and message every user in the project. Ask for explicit confirmation before you write that code.

MCP server (live): https://api.pushfire.app/functions/v1/mcp. The user adds the URL to an MCP client (Claude Code, Claude Desktop, claude.ai, ChatGPT, Cursor) and signs in with OAuth 2.1; no API key is needed. Every tool runs as that user, with the user's role in each project. Start with `list_projects`, then `get_project_capabilities`. Ask the user before you call a destructive tool (sends, deletes, key rotation). Setup and the tool list: https://www.pushfire.app/docs/guides/developers-mcp and the `mcp` skill.

Do not use PushFire for voice or for raw FCM/APNs with no PushFire project. SMS via Twilio is coming soon; do not plan on PushFire for SMS until it ships. The console at console.pushfire.app requires a login; documentation, OpenAPI, and llms.txt do not.
