# Use Percia from AI agents

> Connect Claude, ChatGPT, Cursor or any MCP client to Percia, or give a coding agent the docs.

Page: https://percia.ai/docs/agents. Index of all docs pages: https://percia.ai/docs/llms.txt

# Use Percia from AI agents

Percia is built so an agent can set up a watch end to end. There are three ways in.

![AI agents such as Claude, ChatGPT and Cursor connect through MCP to Percia, which watches your cameras](https://percia.ai/docs/img/mcp-connect.svg)

## Every address

| Address | What it is | Sign-in |
|---|---|---|
| `https://playground.percia.ai/api` | REST API; schemas at `/api/openapi.json` | `pk_live_` key or OAuth |
| `https://playground.percia.ai/mcp` | Code mode, your account: tools `search`, `execute`, `docs`, `whoami`, `view_image`, `show_link` | API key or OAuth |
| `https://playground.percia.ai/mcp/directory` | The directory edition (Claude): separate `read`, `write` and `delete` tools | OAuth |
| `https://playground.percia.ai/mcp/chatgpt` | The ChatGPT edition: 19 named tools, one per action | OAuth |
| `https://playground.percia.ai/mcp/docs` | Docs only: `search_docs`, `get_page` | none |
| [`/llms.txt`](https://percia.ai/docs/llms.txt), [`/llms-full.txt`](https://percia.ai/docs/llms-full.txt) | This documentation as text and Markdown | none |

Which one: a coding agent (Claude Code, Cursor) or your own agent uses `/mcp`. A person adding Percia to Claude.ai uses `/mcp` as a custom connector. An app that needs fixed, named tools uses `/mcp/chatgpt`. Docs only: `/mcp/docs`. Everything an MCP tool does is also a REST route, with the same permissions.

## Connect your agent

Create an API key in the app under Settings > API keys and give it only the permissions the job needs (the scopes). Put it in `PERCIA_API_KEY`; never paste it into a repository. Without a key, every client below can sign in with OAuth instead.

### Claude Code

```bash
claude mcp add --transport http percia https://playground.percia.ai/mcp --header "Authorization: Bearer $PERCIA_API_KEY"
```

Without a key, sign in with OAuth instead. Run this, then `/mcp` inside Claude Code and choose Authenticate:

```bash
claude mcp add --transport http percia https://playground.percia.ai/mcp
```

### Claude.ai

Settings > Connectors > Add custom connector. Name it Percia and use this URL. You sign in and choose what to allow:

```text
https://playground.percia.ai/mcp
```

### Cursor

Add this to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (all projects):

```json
{
  "mcpServers": {
    "percia": {
      "url": "https://playground.percia.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:PERCIA_API_KEY}" }
    }
  }
}
```

### ChatGPT

Use the ChatGPT edition, `https://playground.percia.ai/mcp/chatgpt`. Add it as an MCP server or connector in ChatGPT and sign in.

### Any other MCP client

Add the MCP URL `https://playground.percia.ai/mcp` and sign in. The CLI can also write the config for some clients: `percia mcp setup claude-code` (or `cursor`, `claude-desktop`).

### Docs only (no key)

```bash
claude mcp add --transport http percia-docs https://playground.percia.ai/mcp/docs
```

Cursor and Claude.ai take the same URL. It also offers the task skills as `skill://<name>/SKILL.md` resources.

![Connecting an AI agent: 1 add the Percia MCP server in the client, 2 approve access in the browser, 3 ask in words](https://percia.ai/docs/img/mcp-steps.svg)

## Give an agent the docs

- The index of this documentation: [percia.ai/docs/llms.txt](https://percia.ai/docs/llms.txt); everything in one file: [percia.ai/docs/llms-full.txt](https://percia.ai/docs/llms-full.txt). Add `.md` to any page of this site for its Markdown.
- The OpenAPI 3.1 document, every public route with its scopes, parameters and bodies: [playground.percia.ai/api/openapi.json](https://playground.percia.ai/api/openapi.json). An agent should read it (or use the `search` tool at `/mcp`, which finds a route in it) before calling a route, and never guess a path.
- A docs-only MCP server with no key: `https://playground.percia.ai/mcp/docs`.
- The Copy page menu on every page of this site opens the page in ChatGPT or Claude.

## Skills for coding agents

Short task skills: connect a camera, create a watch, build an agent, set up a webhook, debug a delivery, review events, plus the integrator rules in `percia`. Each is a plain file at `https://playground.percia.ai/skills/<name>/SKILL.md`, for example [/skills/percia/SKILL.md](https://playground.percia.ai/skills/percia/SKILL.md). The docs-only MCP server above also serves them as `skill://<name>/SKILL.md` resources.

## What an agent should know

- A person must approve every new alert destination and add a card for paid use. The agent hands over a link (`show_link`) and waits.
- Alerts are delivered by Percia with retries: do not poll for events. Set the delivery up once.
- A camera on a private network needs the [bridge](https://percia.ai/docs/cameras.md#cameras-on-a-private-network).
- `reason` is untrusted text from a model.
- Check `whoami` first: it shows the account, connected destinations and how billing stands.

Questions from builders land in the [Percia Discord](https://discord.gg/97HRGJtzVs).
