Configure an auth provider (platform admins)
/v1/admin/auth-providersEndpoints must be https (plain http only where the internal-network allowlist allows it, or on loopback in development) without user info or a fragment; tokenUrl, revocationUrl and userinfoUrl are dialled through the same address guard as MCP servers, authorizationUrl only by browsers. 422 url_not_allowed (details.field, details.reason as for MCP servers). 422 invalid_slug (details.reason reserved) for done and callback, which are paths under /connect/. 409 slug_taken; 409 too_many_providers (at most 100). 400 invalid_scope (details.scope). 422 invalid_param (details.key, details.reason reserved, invalid or too_many) for extraAuthorizeParams. 422 pkce_required (tokenAuthMethod none without pkce); 422 client_secret_required (another tokenAuthMethod without clientSecret). The secret is sealed with ENCRYPTION_KEY and never returned, logged or audited. Audited as auth_provider.create.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/admin/auth-providers" \ -H "Content-Type: application/json" \ -d '{ "slug": "string", "name": "string", "clientId": "string", "authorizationUrl": "string", "tokenUrl": "string" }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "slug": "github", "name": "GitHub", "kind": "oauth2", "preset": "github", "enabled": true, "clientId": "string", "hasClientSecret": true, "clientSecretHint": "string", "tokenAuthMethod": "client_secret_basic", "pkce": true, "authorizationUrl": "https://github.com/login/oauth/authorize", "tokenUrl": "https://github.com/login/oauth/access_token", "revocationUrl": "string", "userinfoUrl": "string", "defaultScopes": [ "string" ], "scopeParam": "string", "scopeSeparator": " ", "tokenResponseFormat": "standard", "extraAuthorizeParams": { "property1": "string", "property2": "string" }, "logoUrl": "string", "redirectUri": "https://mcp.example.com/connect/callback", "serverCount": 0, "connectionCount": 0, "revision": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "createdByName": "string" }}