cosmic-mcp

AUTHENTICATION

OAuth 2.1 with PKCE

COSMOS follows the MCP authorization spec. Clients discover everything from the metadata below; people sign in with their Reach account.

Flow

  1. Call https://cosmic-mcp.app/mcp without a token: the 401 carries WWW-Authenticate with the protected resource metadata URL (RFC 9728).
  2. Read the authorization server metadata (RFC 8414) and register if you have no client id (RFC 7591).
  3. Send the person to /oauth/authorize with PKCE S256 (plain is refused), state and resource=https://cosmic-mcp.app/mcp (RFC 8707).
  4. They sign in with Reach and tick the scopes they allow. You get a code at your redirect URI.
  5. Exchange it at /oauth/token. Refresh tokens rotate on every use; replaying an old one revokes the whole chain.

Metadata URLs

https://cosmic-mcp.app/.well-known/oauth-protected-resource
https://cosmic-mcp.app/.well-known/oauth-authorization-server

Client registration

Dynamic client registration is open at /oauth/register. New clients wait for a COSMOS administrator to approve them; until then sign-in shows that the client is pending.

Public clients use token_endpoint_auth_method: none with PKCE. Redirect URIs must be https, or http on a loopback address for native apps.

Token lifetimes

  • Access token: 1 hours (opaque, revocable at once)
  • Refresh token: 30 days, rotated on every use

Scopes

ScopeLegWhat it allows
bridge:connectbrowserLet your local bridge connect to COSMOS
browser:drive High risk, off by defaultbrowserDrive tabs in the TheOne Agent group of your own browser
browser:evaluate High risk, off by defaultbrowserRun JavaScript in pages you enabled it for
cosmos:admin High risk, off by defaultcosmosAdminister COSMOS: clients, legs, policies
cosmos:jobscosmosSee and cancel your own long-running jobs
cosmos:service High risk, off by defaultcosmosInternal service: act for a Reach workspace the caller already authorized (client_credentials only)
plugins:admin High risk, off by defaultcosmosPublish and distribute plugins
plugins:readcosmosList the plugin catalogue
icarus:generateicarusGenerate concept briefs with MERLIN (uses compute)
icarus:publish High risk, off by defaulticarusSchedule approved posts (each post needs your click)
icarus:readicarusRead your client's persona, trends, predictions and reports
icarus:writeicarusEdit your client's persona card
models:generate High risk, off by defaultmodelsGenerate text, images, video and voice with your workspace's own AI keys (paid calls need your OK in Reach)
models:readmodelsSee the AI providers and estimate the cost of a generation
veritas:approve High risk, off by defaultveritasApprove or deny agent actions that wait for a person
veritas:contain High risk, off by defaultveritasSuspend or release your organization's agents
veritas:readveritasRead your organization's agent passports and receipt sessions
veritas:verifyveritasCheck receipts, passports and artifact credentials against the trust list and the log