Skip to main content
Zero supports OAuth 2.1 authorization code flow with PKCE for third-party integrations like ChatGPT, Claude, Claude Cowork, Codex, Claude Code, and Microsoft Copilot. OAuth lets external AI agents authenticate to the Zero MCP server on behalf of an organization. The browser-facing authorization and consent screen is hosted at zdlake.com. Client registration, token exchange, revocation, and the MCP resource remain on api.zdlake.com.

When to use OAuth vs API keys

Discovery

MCP clients discover Zero’s OAuth configuration automatically through well-known metadata endpoints.

Protected resource metadata

Returns:

Authorization server metadata

Returns:

WWW-Authenticate header

Unauthenticated MCP requests return:

Client registration

Zero supports dynamic client registration for public MCP clients.
Response:
Redirect URIs must use HTTPS or an HTTP loopback address. Zero matches redirect URIs exactly.

Authorization code flow with PKCE

Step 1: Authorization

The consent screen displays the client, requested access, and organizations available to your account. Approval redirects to the exact registered callback:

Step 2: Token exchange

Response:

Step 3: Use the access token

Step 4: Refresh

The response contains a new access and refresh token pair. The previous refresh token is revoked.

Step 5: Revoke

Revocation returns 200 OK even when the token was already revoked or is unknown.

Scope

Data model

Platform compatibility

Security

  • Access, refresh, and authorization codes are stored as SHA-256 hashes, never plaintext.
  • Access tokens expire after one hour.
  • Refresh tokens expire after 30 days and rotate on use.
  • PKCE S256 is required for every authorization request.
  • Authorization codes expire after 10 minutes and can be consumed once.
  • Tokens are bound to one client, user, organization, scope, and MCP resource.
  • MCP access tokens are validated at the MCP boundary and are not forwarded to the REST API.