{"record":{"id":"c1a957fe31c70196","repo":"BerriAI/litellm","slug":"redirect-uris-is-required-to-register-a-client-wit","errorCode":null,"errorMessage":"redirect_uris is required to register a client with this server","messagePattern":"redirect_uris is required to register a client with this server","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py","lineNumber":1615,"sourceCode":"        return dummy_return\n\n    if mcp_server.authorization_url is None:\n        raise HTTPException(\n            status_code=400,\n            detail=_endpoint_not_configured_detail(\n                mcp_server,\n                \"authorization url\",\n                \"set Authorization URL and Token URL manually\",\n                \"set Issuer to discover them from the identity provider (RFC 8414)\",\n            ),\n        )\n\n    if mcp_server.registration_url is None:\n        return dummy_return\n\n    bridge_relay: Final = _dcr_bridge_relays_client_registration(mcp_server)\n    if bridge_relay and not client_redirect_uris:\n        raise HTTPException(\n            status_code=400,\n            detail=\"redirect_uris is required to register a client with this server\",\n        )\n\n    register_data: Final = {\n        \"client_name\": client_name,\n        \"redirect_uris\": client_redirect_uris if bridge_relay else [current_redirect_uri],\n        \"grant_types\": grant_types or ([\"authorization_code\", \"refresh_token\"] if bridge_relay else []),\n        \"response_types\": response_types or ([\"code\"] if bridge_relay else []),\n        \"token_endpoint_auth_method\": token_endpoint_auth_method or (\"none\" if bridge_relay else \"\"),\n    }\n    response: Final = await _post_dcr_registration(\n        registration_url=mcp_server.registration_url,\n        register_data=register_data,\n        server_id=mcp_server.server_id,\n    )\n\n    token_response = response.json()","sourceCodeStart":1597,"sourceCodeEnd":1633,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py#L1597-L1633","documentation":"Validation in the MCP OAuth registration path: no redirect_uris were supplied (none configured and none derivable from the request base URL), and dynamic client registration requires at least one redirect URI.","triggerScenarios":"Thrown at litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1615 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include redirect_uris when registering the client with this server."],"exampleFix":"redirect_uris=['https://client.example/callback']","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}