Each app can run its own OAuth 2.1 authorization server for MCP clients. A person adds your MCP server in Claude, Cursor or an IDE, signs in with your app's sign-in methods, approves the client, and the client gets an access token for that MCP server only. The server is off until you turn it on; until then every endpoint under /v1/oauth/:app_id answers 404.
| Feature | Detail |
|---|---|
| Issuer | https://api.scute.io/v1/oauth/<app public id> |
| Metadata | RFC 8414, at the path-inserted and appended well-known URLs |
| Clients | Public only, PKCE with S256, no client secret. Registered in Scute, self-registered (RFC 7591), or known by a client ID metadata document (the client_id is an https URL). |
| Resource indicators | RFC 8707. resource is required and must be one of the app's MCP servers. |
| Access tokens | RS256 JWT, typ: at+jwt (RFC 9068), with kid; aud is the MCP server's URL |
| Refresh tokens | Opaque and rotating. Reusing one revokes the grant. |
| Consent | On the app's hosted page, or your own sign-in page |
To put guardrails on every tool call as well, run the MCP gateway in front of your MCP server. The endpoints themselves are on OAuth endpoints.
Set up#
Turn it on
PATCH /v1/apps/:app_id/oauth/settings with "enabled": true, or the MCP sign-in page of the app in the dashboard.
Add your MCP server
POST /v1/apps/:app_id/oauth/resources with the server's public URL. Tokens are minted only for listed servers.
Pick the agent clients act as
Link clients to an agent, or set default_agent. The agent's roles are the most a client can do through the gateway.
Settings#
/v1/apps/:app_id/oauth/settingsApp key/v1/apps/:app_id/oauth/settingsApp keycurl -X PATCH https://api.scute.io/v1/apps/$SCUTE_APP_ID/oauth/settings \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "default_agent": "mcp-assistant" }'The answer is every setting plus issuer and metadata_url.
MCP servers#
An MCP server is a resource indicator (RFC 8707). Scute refuses to mint a token for any audience that is not on this list.
/v1/apps/:app_id/oauth/resourcesApp keycurl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/oauth/resources \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "Content-Type: application/json" \ -d '{ "url": "https://mcp.acme.io/mcp", "name": "Acme MCP", "scopes": ["tools:read", "tools:write"], "scope_actions": { "tools:read": ["invoice:read"], "tools:write": ["invoice:refund"] } }'/v1/apps/:app_id/oauth/resourcesApp key/v1/apps/:app_id/oauth/resources/:idApp keyTakes name, scopes, scope_actions and disabled. The URL cannot change.
/v1/apps/:app_id/oauth/resources/:idApp keyRevokes every active grant for the server, then deletes it.
Clients#
| kind | client_id | Comes from |
|---|---|---|
| registered | cli_... | Created by you |
| dynamic | dcr_... | The client registered itself at /register |
| metadata_document | An https URL | Scute fetched the client's metadata document from that URL |
A metadata document is refetched when it is more than 24 hours old. If a refetch fails, a copy fetched in the last 7 days keeps working. The document must be JSON, at most 20000 bytes, with client_id equal to its own URL and token_endpoint_auth_method none (or missing).
Redirect URIs: 1 to 20 per client. https anywhere, http only on loopback (any port matches, RFC 8252), or an app's own scheme such as cursor://. No fragment. javascript, data, file, vbscript, about, blob, ftp, ws and wss are refused.
/v1/apps/:app_id/oauth/clientsApp key/v1/apps/:app_id/oauth/clientsApp keyNewest first, up to 200. ?kind= filters by kind.
/v1/apps/:app_id/oauth/clients/:idApp keyDynamic and metadata document clients describe themselves: changing their name or redirect URIs is a 422. Disable them instead.
/v1/apps/:app_id/oauth/clients/:idApp keyFrom the dashboard, every write on this page needs an owner or admin of the workspace. Changes are recorded as app.oauth.* audit events.