Each app can run its own OAuth 2.1 authorization server. MCP clients (Claude, Cursor and other agents) use it to get an access token for one of the app's MCP servers, on behalf of a user who signs in and consents. The server is off until the app turns it on with PATCH /v1/apps/:app_id/oauth/settings. While it is off, every /v1/oauth/:app_id endpoint returns 404 with error_code not_found.
| Property | Value |
|---|---|
| Issuer | https://api.scute.io/v1/oauth/:app_id, with the app's public id |
| Clients | Public only: no client secret, PKCE with S256 required |
| Grant types | authorization_code, refresh_token, and token exchange for the MCP gateway |
| Resource | Required on authorize (RFC 8707). Must be one of the app's MCP servers. |
| Access token | RS256 JWT with typ at+jwt, signed with the workspace key, aud set to the resource |
| Refresh token | Opaque (ort_...), rotated on each use. Reusing one revokes the grant. |
| Client registration | Registered in advance, a client ID metadata document (the client_id is an https URL), or dynamic registration (RFC 7591) |
In these pages :app_id is the app's public id (app_...) or its UUID.
Endpoints#
| Endpoint | Page |
|---|---|
| GET /v1/oauth/:app_id/.well-known/oauth-authorization-server | Metadata |
| GET /v1/oauth/:app_id/authorize | Authorize and token |
| GET /v1/oauth/:app_id/requests/:handle | Authorize and token |
| POST /v1/oauth/:app_id/requests/:handle/decision | Authorize and token |
| POST /v1/oauth/:app_id/token | Authorize and token |
| POST /v1/oauth/:app_id/register | Clients |
| POST /v1/oauth/:app_id/revoke | Introspect and revoke |
| POST /v1/oauth/:app_id/introspect | Introspect and revoke |
| /v1/apps/:app_id/oauth/... | Server settings |
Metadata#
/.well-known/oauth-authorization-server/v1/oauth/:app_idNone/v1/oauth/:app_id/.well-known/oauth-authorization-serverNoneThe authorization server metadata (RFC 8414). The first path is the path-insertion form MCP clients try first. Both return the same document.
curl https://api.scute.io/.well-known/oauth-authorization-server/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6{ "issuer": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6", "authorization_endpoint": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6/authorize", "token_endpoint": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6/token", "registration_endpoint": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6/register", "revocation_endpoint": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6/revoke", "introspection_endpoint": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6/introspect", "jwks_uri": "https://api.scute.io/v1/auth/app_3mxZRrzWxhPZ08dXvqq6/jwks", "response_types_supported": ["code"], "response_modes_supported": ["query"], "grant_types_supported": ["authorization_code", "refresh_token"], "code_challenge_methods_supported": ["S256"], "token_endpoint_auth_methods_supported": ["none"], "revocation_endpoint_auth_methods_supported": ["none"], "scopes_supported": ["mcp"], "authorization_response_iss_parameter_supported": true, "client_id_metadata_document_supported": true}registration_endpoint is left out when dynamic registration is off. scopes_supported lists the scopes of the app's active MCP servers.
The access token#
Verify it with the keys at jwks_uri. Its header has kid and typ at+jwt. Its payload:
| Claim | Description |
|---|---|
| iss | The issuer above. |
| sub | UUID of the app user who consented. |
| aud | The MCP server URL the token is for. |
| client_id | The client the user consented to. |
| scope | Granted scopes, space separated. |
| iat, exp | Issued and expiry times. Lifetime is the app's access_ttl, default 3600 seconds. |
| jti | Unique token id. |
| scute | grant (the grant's id) and app (the app's public id). |
A token stays valid only while its grant is active. Use introspection to check that as well as the signature.
Rate limits#
| Path | Limit |
|---|---|
| POST /v1/oauth/:app_id/register | 20 per hour per IP |
| authorize, token, revoke, requests/... | 120 per minute per IP. A request with an Authorization header falls under the general API limit instead. |
See Errors for the 429 response.