MCP clients sign in with OAuth 2.1 and PKCE, so no token is copied by hand. Most clients do all of this themselves after claude mcp add or codex mcp login; this page is for client authors and the curious.
| Resource (the MCP server) | https://mcp.monitorly.cloud |
| Authorization server (issuer) | https://app.monitorly.cloud |
| Protected resource metadata (RFC 9728) | https://mcp.monitorly.cloud/.well-known/oauth-protected-resource |
| Authorization server metadata (RFC 8414) | https://app.monitorly.cloud/.well-known/oauth-authorization-server |
The flow
Section titled “The flow”- The client calls the server without a token and gets
401withWWW-Authenticate: Bearer resource_metadata="…". - It reads the resource metadata, then the authorization server metadata.
- It identifies itself, preferably with a Client ID Metadata Document:
client_idis an HTTPS URL of a JSON document that describes the client. Otherwise it registers dynamically (RFC 7591) and gets aclient_idof the formmlyc_…. Only public clients: there are no client secrets. - It opens
https://app.monitorly.cloud/oauth/authorizein the browser withresponse_type=code, a PKCES256challenge,resource=https://mcp.monitorly.cloud(RFC 8707) and the scopes it wants. - The person signs in and, on the consent screen, chooses a workspace, optionally a single project, and read or write access, and may narrow the scopes. What is granted is the intersection with what the client asked for.
- The browser returns to the client’s redirect URI with
code,stateandiss(RFC 9207). The code works once, for 60 seconds. - The client exchanges it at
https://app.monitorly.cloud/oauth/tokenwith the PKCE verifier.
Tokens
Section titled “Tokens”| Token | Lifetime |
|---|---|
Access token (mly_…, used as Authorization: Bearer) |
1 hour |
Refresh token (mlyr_…) |
30 days; each refresh issues a new pair |
A refresh token is always issued. Using a refresh token or a code a second time revokes the whole grant. A refresh may ask for fewer scopes than granted, never more.
An OAuth access token works only on the MCP server; on the REST API it is refused. The one exception is the monitorly CLI’s own sign-in, which works on both.
Redirect URIs
Section titled “Redirect URIs”Redirect URIs are compared exactly. For loopback redirects (http://127.0.0.1, http://[::1], http://localhost), any port is accepted, as RFC 8252 allows. A client document lists 1 to 20 redirect URIs; a registered client 1 to 10, HTTPS or loopback HTTP.
Limits
Section titled “Limits”- Authorization requests: 30 per client address in 15 minutes; then
429 temporarily_unavailablewithRetry-After. - Dynamic registrations: 10 per client address in 15 minutes; then
429 slow_down. - An authorization request waits for consent up to 10 minutes.
Seeing and revoking access
Section titled “Seeing and revoking access”Every grant shows in Settings → API tokens with the client’s name. Revoking it there, or calling /oauth/revoke (RFC 7009) with any of its tokens, ends all of its access and refresh tokens at once.
The client’s name and logo on the consent screen are what the client declares about itself. For a metadata document the screen also shows the host the document came from, which is verified; a dynamically registered client is not verified at all.