Authentication Modes
Mission Control supports two authentication modes:Local Token
Single shared bearer token for self-hosted deployments
Clerk JWT
Multi-user JWT authentication via Clerk
Configuration
The authentication mode is configured via theAUTH_MODE environment variable:
User Authentication
Local Mode
In local mode, all requests use a single shared bearer token:- Token must be at least 50 characters
- Token is stored in
LOCAL_AUTH_TOKENenvironment variable - All authenticated users map to a single
[email protected]account
Clerk Mode
In Clerk mode, each user authenticates with a Clerk-issued JWT:- JWT signature is verified using Clerk’s public keys
- User identity is extracted from the
subclaim - Email and name are extracted from token claims or fetched from Clerk API
- User records are automatically created/synced on first authentication
Agent Authentication
Agents authenticate using a separate token system. See Agent Tokens for details.Authentication Flow
Client obtains token
- Local mode: Token is configured in environment variables
- Clerk mode: User signs in via Clerk UI to obtain JWT
Backend validates token
- Local mode: Constant-time comparison against
LOCAL_AUTH_TOKEN - Clerk mode: JWT signature verification with clock skew tolerance
Bootstrap Endpoint
Use the bootstrap endpoint to resolve your authenticated identity:Error Responses
401 Unauthorized
Returned when authentication fails:- Missing
Authorizationheader - Invalid token format
- Expired JWT (Clerk mode)
- Token mismatch (Local mode)
Security Considerations
Next Steps
Local Token Setup
Configure local token authentication
Clerk Integration
Set up Clerk JWT authentication
Agent Tokens
Authenticate agent API clients
API Reference
View authentication endpoints