Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Protected resource metadata

RFC 9728 metadata naming the authorization server for this API and the scopes it supports.

GET/.well-known/oauth-protected-resource
Responses
200

Success.

resourcestring<uri>required

The MCP endpoint these tokens are for.

authorization_serversstring<uri>[]required

Where to obtain an access token.

scopes_supportedstring[]required
bearer_methods_supportedstring[]required
400

The request failed validation. field names the offending input.

statusCodeintegerrequired

HTTP status code, repeated in the body.

min -9007199254740991 · max 9007199254740991
codestringrequired

Stable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.

messagestringrequired

Human-readable explanation. Wording may change.

fieldstring

The offending request field, present on validation failures.

404

The resource does not exist, or is not visible to this credential.

statusCodeintegerrequired

HTTP status code, repeated in the body.

min -9007199254740991 · max 9007199254740991
codestringrequired

Stable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.

messagestringrequired

Human-readable explanation. Wording may change.

fieldstring

The offending request field, present on validation failures.

429

Rate limited. Retry after the interval named in the response.

statusCodeintegerrequired

HTTP status code, repeated in the body.

min -9007199254740991 · max 9007199254740991
codestringrequired

Stable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.

messagestringrequired

Human-readable explanation. Wording may change.

fieldstring

The offending request field, present on validation failures.

500

Unexpected server error. The body never carries internal detail.

statusCodeintegerrequired

HTTP status code, repeated in the body.

min -9007199254740991 · max 9007199254740991
codestringrequired

Stable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.

messagestringrequired

Human-readable explanation. Wording may change.

fieldstring

The offending request field, present on validation failures.

Try it
Server
Request
curl -X GET 'https://api.varsafe.dev/.well-known/oauth-protected-resource' \
  -H 'Accept: application/json'
Response
{
  "resource": "http://example.com",
  "authorization_servers": [
    "http://example.com"
  ],
  "scopes_supported": [
    "secrets:read"
  ],
  "bearer_methods_supported": [
    "header"
  ]
}