{"record":{"id":"12ae5fcecfa40006","repo":"BerriAI/litellm","slug":"mcp-upstream-registration-endpoint-returned-no-res","errorCode":null,"errorMessage":"MCP upstream registration endpoint returned no response","messagePattern":"MCP upstream registration endpoint returned no response","errorType":"http","errorClass":"HTTPException","httpStatus":502,"severity":"error","filePath":"litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py","lineNumber":1453,"sourceCode":"    upstream rejection instead of a generic 500 and failing loud on an absent response.\"\"\"\n    headers: Final = {\n        \"Content-Type\": \"application/json\",\n        \"Accept\": \"application/json\",\n    }\n    async_client: Final = get_async_httpx_client(llm_provider=httpxSpecialProvider.Oauth2Register)\n    try:\n        response: Final = await async_client.post(\n            registration_url,\n            headers=headers,\n            json=register_data,\n        )\n        if response is not None:\n            response.raise_for_status()\n    except httpx.HTTPStatusError as exc:\n        status_code, detail = dcr_fault_detail(classify_upstream_dcr_rejection(exc.response, log_context=server_id))\n        raise HTTPException(status_code=status_code, detail=detail) from exc\n    if response is None:\n        raise HTTPException(\n            status_code=502,\n            detail=\"MCP upstream registration endpoint returned no response\",\n        )\n    return response\n\n\nclass EphemeralDcrClient(BaseModel):\n    \"\"\"A DCR client minted for a single authorize round trip and never stored by the gateway.\"\"\"\n\n    model_config = ConfigDict(frozen=True)\n    client_id: str = Field(min_length=1)\n    client_secret: str | None = None\n    token_endpoint_auth_method: MCPTokenEndpointAuthMethod | None = None\n\n\n_EPHEMERAL_DCR_CLIENT_CACHE: Final = InMemoryCache(default_ttl=_OAUTH_STATE_COOKIE_TTL_SECONDS)\n_EPHEMERAL_DCR_MINT_LOCKS: Final[dict[str, asyncio.Lock]] = {}\n","sourceCodeStart":1435,"sourceCodeEnd":1471,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py#L1435-L1471","documentation":"Defensive guard in the MCP dynamic-client-registration POST: httpx returned no response object for the registration request, so registration cannot be inspected or trusted and fails loudly instead of silently continuing.","triggerScenarios":"Thrown at litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:1453 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check connectivity to the upstream registration endpoint.","Verify the registration endpoint URL and server availability."],"exampleFix":"curl the registration endpoint to confirm it responds.","handlingStrategy":"try-catch","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"}