Skip to Content
Volatilis GRC Docs
Developers

OAuth

How an AI app or connector signs in to the MCP endpoint with OAuth 2.1, including discovery, registration and token lifetimes.

Most AI apps do this for you. This page is for people who build a connector.

OAuth sign-ins are for the MCP endpoint only. The REST API accepts access tokens, not OAuth tokens. See Authentication.

Role needed

Any member approves an app for themselves. Write access is only offered to people whose role may create records.

How it works

The server follows OAuth 2.1 with PKCE, Client ID Metadata Documents, dynamic client registration (RFC 7591), resource indicators (RFC 8707) and the discovery documents of the MCP authorization specification.

The app calls the MCP endpoint without a token. It gets 401 and a WWW-Authenticate header with a resource_metadata address.

The app reads the discovery documents. It either uses the address of its own client metadata document as client_id, or registers a client.

The app opens the authorization endpoint in the browser, with a PKCE challenge (method S256). The person signs in, chooses the organization and access and selects Allow access.

The app exchanges the code for an access token and a refresh token at the token endpoint.

The app calls the MCP endpoint with Authorization: Bearer vgoa_... and refreshes the token before it expires.

Discovery

curl https://grc.volatilis.org/.well-known/oauth-protected-resource/api/mcp
curl https://grc.volatilis.org/.well-known/oauth-authorization-server
EndpointAddress
Authorizationhttps://grc.volatilis.org/oauth/authorize
Tokenhttps://grc.volatilis.org/api/oauth/token
Registrationhttps://grc.volatilis.org/api/oauth/register
Revocationhttps://grc.volatilis.org/api/oauth/revoke

Supported: client metadata documents (client_id_metadata_document_supported: true), response type code, grant types authorization_code and refresh_token, code challenge method S256, client authentication none, client_secret_post and client_secret_basic, scopes read and write.

Client metadata document

An app can use the https address of a JSON document it publishes as its client_id, without registering. Claude does this. The server fetches the document when the app first connects and keeps it for 24 hours.

  • The address must be https, use a host name (not an IP address) and have a path. The host must resolve to public addresses only, also after a redirect. The document may be at most 5 KB and must answer within 3 seconds.
  • client_id in the document must equal its address. redirect_uris follow the same rules as for registration below, and the redirect URI of each request must match one of them exactly.
  • Only public clients: token_endpoint_auth_method is none or missing. The app uses PKCE.
  • The consent screen shows the host that publishes the document.
{
  "client_id": "https://example.com/oauth/client.json",
  "client_name": "My connector",
  "redirect_uris": ["https://example.com/callback"],
  "token_endpoint_auth_method": "none"
}

Register a client

curl -s -X POST https://grc.volatilis.org/api/oauth/register \
  -H "Content-Type: application/json" \
  -d '{"client_name":"My connector","redirect_uris":["https://example.com/callback"],"token_endpoint_auth_method":"none"}'
  • Send 1 to 5 redirect_uris. Each must be https, or http on localhost, 127.0.0.1 or [::1]. No fragment, no credentials, no custom schemes.
  • none makes a public client that relies on PKCE. The other two methods return a client secret once. Keep it secret.
  • The client_name is shown on the consent screen. Use a name people recognise. The screen marks an app as "Known app" only when it returns to claude.ai, claude.com, chatgpt.com, teams.microsoft.com or the Copilot Studio consent address. Every other app shows "Unverified app" with the address it returns to.
  • Registration is limited per address and in total per day. A client that nobody approves within 7 days is deleted.

Scopes

ScopeMeaning
readSearch and read what the person can see
writeRead, and create and change records in the modules the person may change. Includes read. Never delete or approve

offline_access is accepted and ignored: a refresh token is always issued. Other scopes are refused. The granted scope is the lowest of what the app asks, what the person chooses and what their role allows.

If the authorization or token request names a resource, it must be the MCP address https://grc.volatilis.org/api/mcp. The code, the approval and every token are bound to that address, and the MCP endpoint refuses a token issued for another one.

Lifetimes

ItemLifetime
Authorization code2 minutes, single use
Access token (vgoa_)1 hour
Refresh token30 days, renewed each time it is used. Refresh tokens rotate. A public client may leave out client_id on a refresh; a confidential client still authenticates

Rate limits

The token and revocation endpoints are limited per registered client. A limit per address applies on top; it is set high because AI apps send all their users' requests from a few shared addresses. Over a limit the answer is 429 with slow_down and Retry-After.

Revoke access

The person opens Settings, API and MCP tokens and chooses Disconnect on the app under "Connected AI apps". The app loses access at once and must be approved again. An app can also call the revocation endpoint. Allowing an app is recorded in the audit log.

On this page