Sign in to an oauth server as yourself so the portal can read its capabilities (editors and above)
/v1/teams/{team}/mcp-servers/{serverId}/oauth/authorize-setupBrowser session only (403 session_required with an API key). Starts the connect flow of startMyConnection for the caller's own connection to this server (the server's scopes, PKCE S256, the resource parameter unless sendResource is false, a single-use state bound to this session, person and server). After the callback that connection becomes the server's setup connection (McpServer.oauth.setupConnection, audited as mcp_server.auth_update with setupBy) and the portal reads the capabilities with it at once (mcp_server.refresh; a failure is stored as lastRefreshError). The browser returns to returnTo (default /teams/{team}/servers/{serverId}?setup=connected) or to /connect/done when the sign-in failed. 409 not_oauth (authMode isn't oauth); 409 team_archived; 422 provider_mismatch (a linked platform provider was turned off or no longer matches); 400 invalid_return_to; 429 slow_down (shared with startMyConnection).
Path Parameters
Team slug or ID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/teams/string/mcp-servers/497f6eca-6276-4993-bfeb-53cbbbba6f08/oauth/authorize-setup" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "authorizeUrl": "string", "scopes": [ "string" ], "expiresAt": "2019-08-24T14:15:22Z" }}