> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pushnotif.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Let Claude, Cursor or any MCP client read your notification data and write flows.

PushNotifAI runs a [Model Context Protocol](https://modelcontextprotocol.io)
server, so your own AI tools can answer questions like *"why didn't user 4821
get the streak reminder?"* without opening the dashboard. With permission, they
can also write flows from a plain-language description.

## Connect

**1. Issue a token**

Open the app's **MCP** page and issue a token. The page shows the server
URL to use. Turn on **edit flows** only if this client should be able to
create and change flows.

A token acts as **you**, limited to **this one app**. It can never see
more than you can, and it stops working if you leave the workspace.

**2. Add it to your client**

The server speaks Streamable HTTP, with the token as a bearer token. For
Claude Code:

```bash theme={null}
claude mcp add --transport http pushnotifai https://api.pushnotif.ai/mcp \
  --header "Authorization: Bearer pnm_..."
```

Most other clients take the same URL and header in their MCP settings.

## Read tools

Available on every token.

| Tool | Answers |
| - | - |
| `explain_user` | Why a user got a push or didn't: holdout status, devices, flows they're part-way through, every decision with its reason, every send with its exact copy, custom data and badge, and the lookups behind each send |
| `describe_app` | What this app is, and its context for the Composer |
| `list_events` | Every event name recorded, with its properties and their types |
| `list_flows`, `get_flow` | Your flows, their definitions, and how each message variant is performing |
| `list_sends` | Recent notifications, with their copy, custom data and badge, and what happened to them |
| `decision_summary` | Sends and suppressions, counted by reason |
| `list_lookups` | Your [lookups](https://docs.pushnotif.ai/strategy/lookups.md) and their versions |
| `list_proposals` | Open [Composer](https://docs.pushnotif.ai/strategy/composer.md) proposals |

## Write tools

Only on a token issued with **edit flows**, and only if you're an owner or
admin.

| Tool | Does |
| - | - |
| `create_flows` | Creates several flows at once, all or none. `dryRun` checks them without saving. |
| `update_flow` | Replaces a flow's definition |
| `set_flow_status` | Activates, pauses or retires a flow |

Describe a campaign in plain language and let your agent write it as flows.
Every flow goes through the same checks as one built in the dashboard, plus
one more: every event it names must already have been recorded for your app,
so an agent can't invent an event name that never fires.

## What it never exposes

Ingest keys, your APNs key, raw device tokens and your database credentials
are never returned by any tool. Your ingest key (`pna_...`) does not work here,
and only an MCP token (`pnm_...`) does.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.