v2
mcp
mcp

Initiate OAuth login for an MCP server

Discover OAuth metadata from the MCP server and return a login URL.

  1. Discovers the protected-resource metadata (RFC 9728)
  2. Fetches the authorization server metadata (RFC 8414)
  3. Performs Dynamic Client Registration (RFC 7591) if available
  4. Returns the authorization URL for the frontend to open in a popup
post/api/mcp/oauth/login

Request body

server_urlstring required

URL of the MCP server that requires OAuth

scopesstring[] nullable

OAuth scopes to request. Omit or use null to use catalogue or discovered defaults; an empty list requests no scopes.

Response

Successful Response

login_urlstring required
state_tokenstring required

Changes