API reference

OAuth server settings

Turn the app's OAuth server on, set token lifetimes, list its MCP servers, review their tools and manage user grants.

Every call on this page takes the app key in Authorization: Bearer. Validation failures return 422 with error_code invalid. Unknown ids return 404 with error_code not_found. Clients are on OAuth clients.

Settings#

Get settings#

GET/v1/apps/:app_id/oauth/settingsApp key
cURLbash
curl https://api.scute.io/v1/apps/$SCUTE_APP_ID/oauth/settings \  -H "Authorization: Bearer $SCUTE_APP_KEY"
Response 200json
{  "enabled": false,  "dynamic_registration": true,  "client_metadata_documents": true,  "access_ttl": 3600,  "refresh_ttl": 2592000,  "login_url": null,  "default_agent": null,  "pin_mode": "trust_first_use",  "issuer": "https://api.scute.io/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6",  "metadata_url": "https://api.scute.io/.well-known/oauth-authorization-server/v1/oauth/app_3mxZRrzWxhPZ08dXvqq6"}

Update settings#

PATCH/v1/apps/:app_id/oauth/settingsApp key

Send only the fields you change. Returns the settings.

enabledboolean
Turns the server on or off. Default false.
dynamic_registrationboolean
Allow POST /v1/oauth/:app_id/register. Default true.
client_metadata_documentsboolean
Accept https URLs as client ids. Default true.
access_ttlinteger
Access token lifetime in seconds, 300 to 86400. Default 3600.
refresh_ttlinteger
Refresh token lifetime in seconds, 3600 to 7776000. Default 2592000 (30 days).
login_urlstring
An https URL of your own consent page. Empty means the hosted page.
default_agentstring
Slug of the agent clients act as when none is linked to the client. Used by token exchange.
pin_modestring
trust_first_use (default) pins a tool the first time it is seen. approve_new holds new tools for review.
cURLbash
curl -X PATCH https://api.scute.io/v1/apps/$SCUTE_APP_ID/oauth/settings \  -H "Authorization: Bearer $SCUTE_APP_KEY" \  -H "Content-Type: application/json" \  -d '{"enabled": true}'

MCP servers#

An MCP server (a resource, RFC 8707) is a URL tokens may be issued for. authorize refuses any other resource.

FieldTypeDescription
idstringUUID of the resource.
urlstringThe server URL, stored with a lowercase scheme and host, no default port and no bare / path.
namestringDisplay name.
scopesarrayScopes the server offers.
scope_actionsobjectOptional map of scope to permission slugs. When set, a task from token exchange gets only the permissions of its granted scopes.
disabledbooleantrue when disabled.
quarantined_toolsarrayNames of tools held for review.
created_atstringISO 8601 time.

List MCP servers#

GET/v1/apps/:app_id/oauth/resourcesApp key

Returns { "resources": [ ... ] }, oldest first.

Add an MCP server#

POST/v1/apps/:app_id/oauth/resourcesApp key
urlstringrequired
An https URL without a fragment or user info. http only on a loopback host. Unique within the app.
namestringrequired
Up to 100 characters.
scopesstring[]
1 to 50 scope names. Default ["mcp"].
scope_actionsobject
Map of each scope to a list of permission slugs.
cURLbash
curl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/oauth/resources \  -H "Authorization: Bearer $SCUTE_APP_KEY" \  -H "Content-Type: application/json" \  -d '{"url": "https://mcp.acme.example", "name": "Acme MCP", "scopes": ["mcp"]}'

Returns 201 with the resource.

Update an MCP server#

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

Takes name, scopes, scope_actions and disabled. The URL can't be changed.

Remove an MCP server#

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

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

Tool review#

The MCP gateway reports the tools each server lists, with a hash of each tool's definition. A tool seen for the first time is pinned (trust_first_use) or held (approve_new). A pinned tool whose definition changes is held until approved.

List tools#

GET/v1/apps/:app_id/oauth/resources/:id/toolsApp key

Returns resource (the URL) and tools: a map of tool name to its pin (hash, pending_hash, status pinned or quarantined, and times such as first_seen_at, changed_at, approved_at).

Report tools#

POST/v1/apps/:app_id/oauth/resources/:id/tools/observeApp key
toolsobject[]required
Up to 500 entries, each with name and hash.
Response 200json
{  "tools": { "search": "pinned", "delete_record": "quarantined" },  "quarantined": ["delete_record"]}

Approve a tool#

POST/v1/apps/:app_id/oauth/resources/:id/tools/approveApp key

Takes name. Pins the tool's current definition. Returns resource and tools. A tool with nothing to approve returns 422.

Hold a tool#

POST/v1/apps/:app_id/oauth/resources/:id/tools/quarantineApp key

Takes name. Marks the tool quarantined. Returns resource and tools. An unknown tool returns 404.

Grants#

A grant records that a user let a client act for them on one MCP server with some scopes.

FieldTypeDescription
idstringUUID of the grant.
client_idstringThe OAuth client id.
client_namestringThe client's display name.
user_idstringUUID of the app user.
userobjectemail and name of the user.
resourcestringThe MCP server URL.
scopesarrayGranted scopes.
created_at, last_used_atstringISO 8601 times.
revoked_atstringWhen it was revoked, or null.
revoked_reasonstringFor example app_revoked, client_revoked, client_disabled, resource_removed, code_reuse or refresh_reuse.

List grants#

GET/v1/apps/:app_id/oauth/grantsApp key

Newest first, up to 200.

user_idstring
UUID of an app user.
client_idstring
An OAuth client id.
activeboolean
true lists only grants that are not revoked.

Returns { "grants": [ ... ] }.

Revoke a grant#

POST/v1/apps/:app_id/oauth/grants/:id/revokeApp key

Revokes the grant with reason app_revoked and returns it. The client's refresh token stops working and its access tokens stop passing introspection.