Skip to main content
The Caret MCP server supports two authentication methods: OAuth 2.0 with PKCE (recommended) and API Key (legacy).

OAuth 2.0 with PKCE

Most MCP clients (Claude Desktop, Cursor, etc.) handle the OAuth flow automatically. This section is for developers building custom MCP clients.

1. Dynamic Client Registration

Register your client to get a client_id and client_secret.
Response:

2. Authorization Request

Redirect the user to the authorization endpoint.
The user will be redirected to Google sign-in, then prompted to select a Caret workspace. After authorization, the user is redirected back to your redirect_uri with a code parameter.

3. Token Exchange

Exchange the authorization code for tokens.
Response:

4. Token Refresh

When the access token expires, use the refresh token to get a new one.
The old refresh token is revoked and a new one is issued with each refresh.

Scopes

Token Lifetime

API Key Authentication

As an alternative to OAuth, you can use an existing Caret API key.
Create API keys in Settings > Developer in the Caret app. See API Authentication for details.

Permission Mapping

Errors