{"record":{"id":"06382142641a9890","repo":"BerriAI/litellm","slug":"mcp-server-mcp-server-name-is-description","errorCode":null,"errorMessage":"MCP server '{mcp_server_name}' is {description}","messagePattern":"MCP server '(.+?)' is (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py","lineNumber":678,"sourceCode":"    mcp_server_name: str | None,\n    description: str,\n) -> None:\n    \"\"\"404 a NAMED discovery request unless it resolves to an oauth2 or DCR-bridge server.\n\n    A named server that is unknown (or hidden from the caller) and one that exists\n    but is non-oauth2 both return the same 404, so the well-known discovery paths\n    cannot be used to enumerate non-OAuth server names. Root discovery (no name) is\n    unaffected, and pass-through servers are resolved by the caller before this runs.\n    DCR-bridge servers are admitted because they serve the gateway's own authorization\n    server metadata (the register, authorize, and token relays).\n    \"\"\"\n    if mcp_server_name is None:\n        return\n    if mcp_server is not None and mcp_server.auth_type == MCPAuth.oauth2:\n        return\n    if mcp_server is not None and mcp_server.is_dcr_bridge:\n        return\n    raise HTTPException(\n        status_code=404,\n        detail=f\"MCP server '{mcp_server_name}' is {description}\",\n    )\n\n\ndef _dcr_bridge_relays_client_registration(mcp_server: MCPServer) -> bool:\n    \"\"\"True when a DCR-bridge server relays client registration to the upstream authorization\n    server instead of short-circuiting to an admin-configured OAuth client. In the relay arm the\n    upstream holds each client's own registration, so the authorize and token relays pass the\n    client's ``client_id`` and ``redirect_uri`` through verbatim and the authorization code\n    returns directly to the client's redirect URI without transiting the gateway. Gateway-side\n    redirect trust and the ``/callback`` state relay therefore only apply to the short-circuit\n    arm, where the upstream only knows the gateway's own callback.\"\"\"\n    return mcp_server.is_dcr_bridge and bool(mcp_server.registration_url) and not mcp_server.client_id\n\n\ndef _require_s256_pkce(\n    code_challenge: str | None,","sourceCodeStart":660,"sourceCodeEnd":696,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py#L660-L696","documentation":"Shared 404 detail for a named /.well-known lookup that resolved to an unknown, hidden, or non-oauth2 server. The deliberate uniformity prevents callers from using the well-known endpoints to enumerate non-OAuth server names; only oauth2 and DCR-bridge servers are admitted here.","triggerScenarios":"Thrown at litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py:678 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the server status description and address it (e.g. server disabled or misconfigured)."],"exampleFix":"Check server config/status in the proxy admin UI.","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-14T05:17:10.506Z"}