API reference

OAuth server for MCP clients

Each app can run an OAuth 2.1 authorization server that MCP clients use to act for the app's users.

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.

PropertyValue
Issuerhttps://api.scute.io/v1/oauth/:app_id, with the app's public id
ClientsPublic only: no client secret, PKCE with S256 required
Grant typesauthorization_code, refresh_token, and token exchange for the MCP gateway
ResourceRequired on authorize (RFC 8707). Must be one of the app's MCP servers.
Access tokenRS256 JWT with typ at+jwt, signed with the workspace key, aud set to the resource
Refresh tokenOpaque (ort_...), rotated on each use. Reusing one revokes the grant.
Client registrationRegistered 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#

EndpointPage
GET /v1/oauth/:app_id/.well-known/oauth-authorization-serverMetadata
GET /v1/oauth/:app_id/authorizeAuthorize and token
GET /v1/oauth/:app_id/requests/:handleAuthorize and token
POST /v1/oauth/:app_id/requests/:handle/decisionAuthorize and token
POST /v1/oauth/:app_id/tokenAuthorize and token
POST /v1/oauth/:app_id/registerClients
POST /v1/oauth/:app_id/revokeIntrospect and revoke
POST /v1/oauth/:app_id/introspectIntrospect and revoke
/v1/apps/:app_id/oauth/...Server settings

Metadata#

GET/.well-known/oauth-authorization-server/v1/oauth/:app_idNone
GET/v1/oauth/:app_id/.well-known/oauth-authorization-serverNone

The authorization server metadata (RFC 8414). The first path is the path-insertion form MCP clients try first. Both return the same document.

cURLbash
curl https://api.scute.io/.well-known/oauth-authorization-server/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6
Response 200json
{  "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:

ClaimDescription
issThe issuer above.
subUUID of the app user who consented.
audThe MCP server URL the token is for.
client_idThe client the user consented to.
scopeGranted scopes, space separated.
iat, expIssued and expiry times. Lifetime is the app's access_ttl, default 3600 seconds.
jtiUnique token id.
scutegrant (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#

PathLimit
POST /v1/oauth/:app_id/register20 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.