BerriAI/litellm · error · HTTPException
redirect_uris is required to register a client with this ser
Error message
redirect_uris is required to register a client with this server
What it means
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.
Source
Thrown at litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1615
return dummy_return
if mcp_server.authorization_url is None:
raise HTTPException(
status_code=400,
detail=_endpoint_not_configured_detail(
mcp_server,
"authorization url",
"set Authorization URL and Token URL manually",
"set Issuer to discover them from the identity provider (RFC 8414)",
),
)
if mcp_server.registration_url is None:
return dummy_return
bridge_relay: Final = _dcr_bridge_relays_client_registration(mcp_server)
if bridge_relay and not client_redirect_uris:
raise HTTPException(
status_code=400,
detail="redirect_uris is required to register a client with this server",
)
register_data: Final = {
"client_name": client_name,
"redirect_uris": client_redirect_uris if bridge_relay else [current_redirect_uri],
"grant_types": grant_types or (["authorization_code", "refresh_token"] if bridge_relay else []),
"response_types": response_types or (["code"] if bridge_relay else []),
"token_endpoint_auth_method": token_endpoint_auth_method or ("none" if bridge_relay else ""),
}
response: Final = await _post_dcr_registration(
registration_url=mcp_server.registration_url,
register_data=register_data,
server_id=mcp_server.server_id,
)
token_response = response.json()View on GitHub (pinned to 77b7c6c40c)
Solutions
- Include redirect_uris when registering the client with this server.
Example fix
redirect_uris=['https://client.example/callback']
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1615 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/c1a957fe31c70196.
Report an issue: GitHub.