# Keys and permissions

> API keys, the four permissions, and what MCP sign-in grants.

Every API request carries `Authorization: Bearer <key>` with an **API key** you created in the dashboard. Agent apps you connect through MCP sign in with OAuth instead; their tokens work only at our MCP server, not on the API.

## Permissions

| Permission | Allows |
|---|---|
| `read` | See screens, templates, screenshots and history |
| `control` | Click, type, press keys, scroll, drag |
| `exec` | Run commands, upload, download and list files |
| `power` | Create, start, stop, restart and delete screens; switch their kind and set end times; save and delete templates |

Each endpoint in the [API reference](/api) says which one it needs. A key without it gets `403 PERMISSION_DENIED`.

`control` is close to shell access: with the mouse and keyboard an agent can open a terminal on the desktop and type commands. `exec` exists so the API and history tell the two apart and a key can leave commands out; it is not a wall between them.

## API keys

- Shown once when you create them; we store only a hash.
- Can be limited to some screens.
- Start with `kubi_`, so secret scanners can spot a leaked one. Revoke it in the dashboard and it stops at once.
- The SDK reads the key you pass in code first, then the `KUBI_API_KEY` environment variable.

## MCP sign-in

When you connect an agent app, our sign-in page asks which screens it may use and with which permissions. The app gets a token that lasts an hour and renews itself. An app signed in this way can never delete screens.

## What no agent can do

Keys, billing, proxies, secrets and organization settings exist only in the dashboard, for people. No API key or agent token can create keys, change billing, buy credit or see its balance, set a proxy or a secret, or see payment details.
