> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/getting-started/connect-an-ai-agent-mcp.md).

# Connect an AI Agent (MCP)

Point Claude, Cursor or any MCP client at one URL and it can look up who is on call, manage rotations and overrides, and declare incidents - as you, in your workspace.

Pagerly ships a remote **MCP server** (Model Context Protocol). There is nothing to install and no API key to paste: your client signs in with your Pagerly login.

|          |                                                                                          |
| -------- | ---------------------------------------------------------------------------------------- |
| Endpoint | `https://api.pagerly.io/mcp`                                                             |
| Sign-in  | OAuth 2.1 - a browser tab opens, you log in, done                                        |
| Tools    | 41 - on-call, rotations, overrides, incidents, action items, status page, user directory |

## Two-minute setup

**Claude Code**

```bash
claude mcp add --transport http pagerly https://api.pagerly.io/mcp
```

Then type `/mcp` in Claude Code and sign in.

**Claude Desktop / claude.ai** - Settings → Connectors → *Add custom connector* → paste `https://api.pagerly.io/mcp` → sign in when prompted.

**Cursor** - add to `.cursor/mcp.json`:

```json
{ "mcpServers": { "pagerly": { "url": "https://api.pagerly.io/mcp" } } }
```

Any other MCP client: give it the URL. It discovers the sign-in flow on its own.

## Try it

Ask your agent:

* *"Who is on call for Payments right now?"*
* *"Alice is off sick - put Bob on call for Payments until Friday 6pm."*
* *"Declare a P2 incident: checkout error rate above 5%."*
* *"What was our MTTR last month, and which alert source is noisiest?"*

## What the agent is allowed to do

Every call runs as **you**. The same rules apply as in Slack and the dashboard: anyone can read and raise incidents; changing a team that has an access list needs a team admin; creating or deleting teams and editing the on-call directory needs an org admin.

On top of that, the connection itself carries **scopes**. Creating or deleting teams and editing the directory also needs the `mcp:admin` scope, which only an org admin can grant - by ticking **Allow admin actions** on the consent screen. Leave it off unless the agent genuinely needs it; an agent with plain read/write cannot delete a team, whatever your own role.

{% hint style="info" %}
Full reference - every tool with its arguments, the OAuth details and the scope table - lives at [pagerly.io/docs/mcp](https://www.pagerly.io/docs/mcp).
{% endhint %}
