# MCP authentication

> How MCP clients authenticate with Clipbeat today (API key) and the OAuth 2.1 sign-in that is available soon.

Source: https://docs.clipbeat.app/mcp/authentication/

## Today: API key <Badge text="Live" variant="success" />

The MCP server accepts the same personal API key as the REST API:

```text
Authorization: Bearer cb_live_...
```

Create the key in Clipbeat Studio, **Settings**, **Developers**, **API keys**. The key's [scopes](https://docs.clipbeat.app/authentication/#scopes)
decide which tools it can call. Setups for each client are in [Connect an MCP client](https://docs.clipbeat.app/mcp/clients/).

## Soon: one click sign-in with OAuth <Badge text="Available soon" variant="caution" />

> **Not live yet:**
Everything in this section describes a feature that is **not available yet**. Endpoints, scopes and limits can change
before launch. Use the API key method above until this page says otherwise. Launch will be announced in the
[Changelog](https://docs.clipbeat.app/changelog/).

With OAuth, a user connects an AI client to Clipbeat by signing in and approving the connection, without copying a key.
This is how clients that only offer a sign-in screen (for example Claude and ChatGPT connectors) will connect. When it
launches, MCP connections move to OAuth and API keys remain the way to use the REST API.

### How connecting will work

1. The user adds `https://api.clipbeat.app/mcp` to their AI client.
2. The client discovers Clipbeat's authorization server and opens a Clipbeat sign-in page.
3. The user signs in and sees which client is asking, what it may do and how much it may spend per day.
4. The user approves. The client receives tokens and the tools appear.

The user sees and controls every connection in Clipbeat Studio (connected apps): the daily credit limit can be changed
and the connection revoked at any time.

### Planned details for client developers

The design follows the MCP authorization specification and OAuth 2.1:

| Item | Plan |
| --- | --- |
| Protected resource metadata | `GET https://api.clipbeat.app/.well-known/oauth-protected-resource/mcp` (RFC 9728) |
| Authorization server metadata | `GET https://api.clipbeat.app/.well-known/oauth-authorization-server` (RFC 8414) |
| Authorization endpoint | `https://api.clipbeat.app/oauth/authorize` |
| Token endpoint | `https://api.clipbeat.app/oauth/token` |
| Client registration | Client ID metadata documents, and dynamic client registration at `https://api.clipbeat.app/oauth/register` (RFC 7591) |
| Revocation | `https://api.clipbeat.app/oauth/revoke` (RFC 7009) |
| PKCE | Required, `S256` only |
| Resource indicator | `resource=https://api.clipbeat.app/mcp` (RFC 8707); tokens are only valid for the MCP server |
| Scopes | `create:video`, `read:video`, `read:balance` |
| Access token lifetime | 1 hour |
| Refresh tokens | Rotated on every use, valid for 30 days |
| Spending limit | A daily credit limit per connection, set by the user when approving |

A request to `/mcp` without valid credentials will return `401` with a `WWW-Authenticate` header that points to the
protected resource metadata, so standard MCP clients can start the flow on their own.

### What will not change

- Prices, [rate limits](https://docs.clipbeat.app/rate-limits/), the [content policy](https://docs.clipbeat.app/content-policy/) and the tools themselves stay the same.
- Payment still comes from the account's credit balance; card details never go through the client.
- The REST API keeps using API keys.

Questions about the OAuth rollout: [hello@clipbeat.app](mailto:hello@clipbeat.app?subject=MCP%20OAuth).
