How it works
The standard OAuth 2.1 Authorization Code flow with PKCE:- Discovery — client fetches
https://api.animam.ai/.well-known/oauth-authorization-serverto learn the endpoints - Registration — client POSTs to
/oauth/register(RFC 7591 DCR) and receives aclient_id - Authorize — client opens
/oauth/authorize?response_type=code&client_id=...&code_challenge=...&code_challenge_method=S256in a browser - Consent — the tenant logs into animam.ai and approves the requested scopes
- Token exchange — client POSTs the received code to
/oauth/tokenwith its PKCE verifier - API calls — client uses the returned
access_tokenasAuthorization: Bearer <jwt>on MCP requests
Endpoints
All endpoints live on
https://api.animam.ai.
Scopes
Unknown scopes are silently filtered at consent time (RFC 6749 §3.3).
Security
- PKCE S256 mandatory — no fallback to
plain(OAuth 2.1 hardening) - Public clients only —
token_endpoint_auth_method=none, no client_secret - Exact redirect_uri match — no wildcards, no substring matching
- Single-use authorization codes — replay attempts return
invalid_grant - Strict refresh token rotation — any reuse of a rotated refresh token triggers full-chain revocation
- JWT access tokens RS256 — signed stateless, verifiable via JWKS, hashed in DB for early revocation
- Rate limits — 5/h/IP on DCR, 30/min on token/revoke, 20/min on authorize
Example: register a client and start a flow
Connecting from Claude Desktop
Add Animam as a remote MCP server in your Claude Desktop config. Claude Desktop handles the entire OAuth flow (discovery + DCR + authorize + token exchange) transparently — you just approve the consent screen once.Legacy ApiToken cohabitation
The MCP server accepts both OAuth JWT access tokens and legacyApiToken
Bearer tokens (created from the tenant dashboard). OAuth is preferred for all
third-party integrations; ApiToken remains supported for internal scripts
and CI pipelines.