Agents

MCP sign-in

Turn on an OAuth 2.1 authorization server for an app so MCP clients such as Claude and Cursor sign its users in.

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.

FeatureDetail
Issuerhttps://api.scute.io/v1/oauth/<app public id>
MetadataRFC 8414, at the path-inserted and appended well-known URLs
ClientsPublic 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 indicatorsRFC 8707. resource is required and must be one of the app's MCP servers.
Access tokensRS256 JWT, typ: at+jwt (RFC 9068), with kid; aud is the MCP server's URL
Refresh tokensOpaque and rotating. Reusing one revokes the grant.
ConsentOn 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#

  1. 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.

  2. Add your MCP server

    POST /v1/apps/:app_id/oauth/resources with the server's public URL. Tokens are minted only for listed servers.

  3. 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#

GET/v1/apps/:app_id/oauth/settingsApp key
PATCH/v1/apps/:app_id/oauth/settingsApp key
enabledboolean
The server on or off. Default off.
dynamic_registrationboolean
Clients may register themselves (RFC 7591). Default on.
client_metadata_documentsboolean
Accept an https URL as client_id and read the client from the document there. Default on.
access_ttlinteger
Access token lifetime in seconds. 300 to 86400. Default 3600.
refresh_ttlinteger
Refresh token lifetime in seconds. 3600 to 7776000 (90 days). Default 2592000 (30 days).
login_urlstring
Your own sign-in and consent page, https only. Empty: the app's hosted page. See Your own consent page.
default_agentstring
The slug of the agent a client with no agent of its own acts as.
pin_modestring
How the gateway treats tools it sees for the first time: trust_first_use (default) or approve_new. See Tool pinning.
curl -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.

POST/v1/apps/:app_id/oauth/resourcesApp key
urlstringrequired
The server's public URL, exactly as clients use it. https, or http on localhost, 127.0.0.1 or ::1. No fragment. Stored canonical: lowercase scheme and host, no default port, no bare / path.
namestringrequired
Shown on the consent page. Up to 100 characters.
scopesstring[]
1 to 50 scope names. Default ["mcp"].
scope_actionsobject
Scope to permission slugs, for example { "tools:write": ["invoice:refund"] }. Once any scope is mapped, a task from the gateway gets only the permissions of the scopes the person granted.
curl -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"] }  }'
GET/v1/apps/:app_id/oauth/resourcesApp key
PATCH/v1/apps/:app_id/oauth/resources/:idApp key

Takes name, scopes, scope_actions and disabled. The URL cannot change.

DELETE/v1/apps/:app_id/oauth/resources/:idApp key

Revokes every active grant for the server, then deletes it.

Clients#

kindclient_idComes from
registeredcli_...Created by you
dynamicdcr_...The client registered itself at /register
metadata_documentAn https URLScute 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.

POST/v1/apps/:app_id/oauth/clientsApp key
namestring
Shown on the consent page.
redirect_urisstring[]required
Where the client receives the code.
client_uristring
The client's home page, https.
logo_uristring
Logo shown on the consent page, https.
GET/v1/apps/:app_id/oauth/clientsApp key

Newest first, up to 200. ?kind= filters by kind.

PATCH/v1/apps/:app_id/oauth/clients/:idApp key
agentstring
The slug of the agent this client acts as. Empty unlinks it, and the client falls back to default_agent.
disabledboolean
Disabling a client revokes its active grants.
namestring
Registered clients only.
redirect_urisstring[]
Registered clients only.

Dynamic and metadata document clients describe themselves: changing their name or redirect URIs is a 422. Disable them instead.

DELETE/v1/apps/:app_id/oauth/clients/:idApp key

From the dashboard, every write on this page needs an owner or admin of the workspace. Changes are recorded as app.oauth.* audit events.