{"record":{"id":"6db8f37ebdd3f58d","repo":"different-ai/openwork","slug":"mcp-oauth-configuration-required-6db8f3","errorCode":"MCP_OAUTH_CONFIGURATION_REQUIRED","errorMessage":"This MCP resource advertises multiple authorization servers; an administrator must select one before connecting.","messagePattern":"This MCP resource advertises multiple authorization servers; an administrator must select one before connecting\\.","errorType":"exception","errorClass":"EnterpriseMcpOAuthContractError","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/oauth-provider.ts","lineNumber":165,"sourceCode":"\n  get clientMetadata() {\n    const scope = this.requestedScopes.join(\" \")\n    return {\n      redirect_uris: [this.redirectUri],\n      client_name: this.clientName,\n      grant_types: [\"authorization_code\", \"refresh_token\"],\n      response_types: [\"code\"],\n      token_endpoint_auth_method: \"none\",\n      application_type: this.applicationType,\n      ...(scope ? { scope } : {}),\n    }\n  }\n\n  private assertDiscoveryBinding(state: OAuthDiscoveryState): void {\n    const selectedIssuer = this.authorizationServerIssuer\n    if (!selectedIssuer) {\n      if ((state.resourceMetadata?.authorization_servers?.length ?? 0) > 1) {\n        throw new EnterpriseMcpOAuthContractError(\n          \"MCP_OAUTH_CONFIGURATION_REQUIRED\",\n          \"This MCP resource advertises multiple authorization servers; an administrator must select one before connecting.\",\n        )\n      }\n      return\n    }\n    if (!isAuthorizationServerDiscoveryBound(state, selectedIssuer)) {\n      throw new EnterpriseMcpOAuthContractError(\n        \"MCP_OAUTH_ISSUER_MISMATCH\",\n        \"The OAuth authorization server does not match the issuer selected for this MCP connection.\",\n      )\n    }\n  }\n\n  private expectedCredentialIssuer(context?: OAuthClientInformationContext): string | undefined {\n    const boundIssuer = this.authorizationServerIssuer\n      ?? this.loadedDiscovery?.authorizationServerMetadata?.issuer\n      ?? this.loadedDiscovery?.authorizationServerUrl","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/oauth-provider.ts#L147-L183","documentation":"Error \"This MCP resource advertises multiple authorization servers; an administrator must select one before connecting.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/oauth-provider.ts:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}