Complete MCP server OAuth authorization
Completes an OAuth authorization with the state and code the provider sent to redirect_uri. Must be called by the same caller that started it. The gateway exchanges the code and stores the tokens as the caller’s oauth credential, replacing their previous oauth credential on the server. Tokens are never returned.
Authorizations
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Body
Response
OK
oauth credentials come only from the OAuth connect flow.
bearer, authorization, headers, none, oauth needs_reauthorization when the OAuth provider no longer honors the credential.
active, needs_reauthorization Scopes granted to an oauth credential; null for every other auth_type.