On this page

OAuth and URL options

How OAuth sign-in works for MCP clients, and the options you can add to the server URL.

#URL options

OptionEffect
?project_ref=<ref>Only this project. Tools no longer need a project_ref argument.
?read_only=trueRead-only, even with a read-write token or grant.
?features=<groups>Only these tool groups, comma separated: account, database, migrations, logs, advisors, functions, storage, development, docs, usage, monitoring (every read tool the monitoring prompts use) (also debugging = logs + advisors). Default: every group. An unknown group is an error.
Example
https://stitchdb.com/platform/mcp?project_ref=abcdefghijklmnop&read_only=true&features=monitoring

#OAuth flow

Clients discover everything from the server: an unauthenticated request returns 401 with a WWW-Authenticate header pointing to the protected resource metadata, which names the StitchDB authorization server.

EndpointURL
Protected resource metadatahttps://stitchdb.com/.well-known/oauth-protected-resource/platform/mcp
Authorization server metadatahttps://stitchdb.com/.well-known/oauth-authorization-server
Dynamic client registrationhttps://stitchdb.com/platform/oauth/register
Authorizationhttps://stitchdb.com/platform/oauth/authorize
Tokenhttps://stitchdb.com/platform/oauth/token
Revocationhttps://stitchdb.com/platform/oauth/revoke
  • Authorization code flow with PKCE; only the S256 method is accepted, and state is returned unchanged.
  • Redirect addresses must match a registered one exactly (loopback addresses of desktop apps may use any port).
  • Access tokens last one hour. Refresh tokens last 30 days and are replaced on every use; reusing an old one ends the whole connection.
  • Scopes: mcp:read and mcp:write. What the app gets is what you choose on the consent screen.
Was this helpful?