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

# Authentication

> OAuth 2.0 flow, scopes, token lifetimes, and migration from API keys for Hyperbrowser MCP

## OAuth 2.0 over Streamable HTTP

All HTTP requests to `hbmcp` authenticate with `Authorization: Bearer <MCP OAuth access token>`.

* **Interactive OAuth discovery**: Unauthenticated requests return `401` with a `WWW-Authenticate` challenge pointing to RFC 9728 protected-resource metadata (`https://mcp.hyperbrowser.ai/.well-known/oauth-protected-resource/mcp/...`). OAuth-capable clients discover the issuer (`https://app.hyperbrowser.ai/oauth`), register via Dynamic Client Registration, and complete browser sign-in, team selection, and scope consent using S256 PKCE.
* **Token lifetimes**: Access tokens expire after **10 minutes**. Clients automatically renew them with rotating refresh tokens for up to **30 days**, after which sign-in is required again.
* **Path-specific grants**: Protected-resource metadata advertises the exact path you connect to (for example `/mcp/browser,usage`). Switching to a different [toolset path](https://hyperbrowser.ai/docs/mcp/toolsets.md) requires re-authorizing that URL.

## Scopes and Permissions

Each toolset path advertises only the scopes required by its tools:

| Scope | Toolsets covered |
| - | - |
| `mcp:tools` | `web`, `browser`, `sandbox` |
| `mcp:usage` | `usage` |
| `mcp:admin` | `admin` |

* Requests missing a required scope return `403` with `error="insufficient_scope"`.
* Invalid or expired tokens return `401` with `error="invalid_token"`.
* Backend team roles, member API-key management settings, and email verification remain enforced; the MCP server never elevates permissions.

## Static-Header Clients

Clients that do not support interactive OAuth discovery or token refresh (including non-interactive [agent platforms](https://hyperbrowser.ai/docs/mcp/toolsets.md#agent-platforms)) must obtain an MCP OAuth access token externally and pass it in the `Authorization` header:

```text theme={null}
Authorization: Bearer <MCP_OAUTH_ACCESS_TOKEN>
```

Because access tokens expire after 10 minutes, static-header integrations must manage token renewal externally.

## Migrating from API Keys and Stdio

> [!WARNING]
>
> **API keys and stdio are not supported.** Neither `x-api-key`, `Authorization: Bearer hb_...`, nor ordinary dashboard/CLI tokens authenticate requests to `hbmcp`, and the local stdio transport has been removed.

If you are migrating from an earlier setup:

1. Remove `x-api-key` headers, `Authorization: Bearer hb_...` tokens, and `TRANSPORT=stdio` / `HYPERBROWSER_API_KEY` configuration from your MCP client.
2. Point your client at the Streamable HTTP URL (`https://mcp.hyperbrowser.ai/mcp`, or `https://mcp.hyperbrowser.ai/mcp/basic` for web tools only).
3. Complete the OAuth sign-in and team consent flow in your browser.


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