Oauth
Complete MCP client OAuth flow
Completes the OAuth flow for an MCP client after the user has authorized the request. This endpoint should be called after the OAuth provider redirects back to the callback endpoint and the OAuth token has been stored. It retrieves the pending MCP client configuration and establishes the connection with the OAuth-provided credentials.
AuthorizationBearer <token>
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Path Parameters
idstring
MCP client ID
Response Body
curl -X POST "https://loading/{AI_GATEWAY_URL}/api/mcp/client/string/complete-oauth"{
"status": "success",
"message": "Operation completed successfully"
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}