Get started

Authentication

OAuth authorization code flow, PKCE, workspace grants and token lifecycle.

Take the docs with youMarkdown for your editor or agent.

OAuth is implemented with Laravel Passport 13.7.6 and League OAuth2 Server. Only public authorization-code clients and refresh tokens are exposed. Client credentials, password grants, implicit grants, personal access tokens, and browser session cookies cannot authenticate MCP requests.

RoutePurposeAuthentication
GET /.well-known/oauth-protected-resource/mcpCanonical resource, issuer and scopesPublic, MCP enabled
GET /.well-known/oauth-protected-resourceResource metadata aliasPublic, MCP enabled
GET /.well-known/oauth-authorization-serverAuthorization/token/revocation/registration metadataPublic, MCP enabled
POST /mcp/oauth/registerRegister public client redirect URIsPublic, throttled
GET /mcp/oauth/authorizeSign in and display workspace/scope consentBrowser session
POST /mcp/oauth/authorizeApprove or deny one-time consentBrowser session + CSRF
POST /mcp/oauth/tokenExchange code or rotate refresh tokenPKCE or refresh credential
POST /mcp/oauth/revokeRevoke the connection associated with a tokenPossession of token + client ID
POST /mcpMCP protocolOAuth bearer token
GET /settings/integrations/mcpManage your connections and requestsBrowser session
POST /settings/integrations/mcp/connections/{uuid}/revokeRevoke one connectionBrowser session + CSRF
GET/POST /settings/integrations/mcp/requests/{uuid}Review/approve/decline an exact actionOwner session + CSRF for POST

An unauthenticated MCP request returns HTTP 401 with a WWW-Authenticate: Bearer challenge containing resource_metadata. Register using the registration URL from issuer metadata. Registration accepts client_name, 1–10 redirect_uris, token_endpoint_auth_method: "none", authorization-code/refresh grant types, and response_types: ["code"]. Redirects must be HTTPS, or HTTP on loopback, with no fragment, user info or wildcard. HTTPS redirects and the localhost hostname use exact matching; numeric HTTP loopback ports follow RFC 8252.

Example public-client registration:

json
{
  "client_name": "My Caroush agent",
  "redirect_uris": ["http://127.0.0.1:8765/callback"],
  "token_endpoint_auth_method": "none",
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"]
}

The client creates a cryptographically random PKCE verifier and its SHA-256 base64url challenge, then opens the authorization endpoint with client_id, response_type=code, registered redirect_uri, resource equal to the exact MCP endpoint, requested space-separated scope, state, code_challenge, and code_challenge_method=S256. The user chooses the workspace. Clients cannot supply a user/workspace override to tools.

Exchange the code as form data with grant_type=authorization_code, client_id, redirect_uri, code, code_verifier and the same resource. Access tokens last one hour. Refresh tokens last 30 days and rotate after use. A refresh uses grant_type=refresh_token, client_id, refresh_token and resource; optional scope can narrow access, never expand it. Store tokens using your client's credential store and replace rotated refresh tokens immediately. Reusing a code or an old refresh token is rejected.

A workspace-specific grant marker is embedded by the server. The server verifies it against the signed token, recorded grant, client, resource, account status and current membership. Changing the browser's selected workspace cannot retarget a token. Revoke one grant in Settings or call revocation with token and client_id; existing codes, access tokens and refresh tokens for that grant are invalidated. Queued MCP operations recheck authorization and the MCP enabled flag before executing. Native publishing/generation work already started is not retroactively undone by revocation; stop it through the relevant Caroush workflow if needed.

Dynamic Client Registration is supported for compatibility. Client ID Metadata Documents are not implemented or advertised. Consent is not inferred from arbitrary website content. State, one-time consent nonces, session authentication and CSRF protect the browser authorization flow.