BerriAI/litellm · error · ValueError

Invalid config for MCP server '{server_name or server_id}':

Error message

Invalid config for MCP server '{server_name or server_id}': dcr_bridge must be a boolean (got {config_dcr_bridge!r}).

What it means

Config-load type check: the dcr_bridge field in an MCP server definition arrived as something other than a boolean. Raising at load time keeps the flag's truthiness semantics unambiguous instead of letting any non-empty string count as true.

Source

Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:1716

            )
            effective_issuer = manual_issuer or discovered_issuer

            if auth_type == MCPAuth.oauth2 and config_oauth2_flow not in (
                "client_credentials",
                "authorization_code",
            ):
                raise ValueError(
                    f"Invalid config for MCP server '{server_name or server_id}': auth_type oauth2 "
                    f"requires an explicit oauth2_flow (got {config_oauth2_flow!r}). Set "
                    "oauth2_flow: client_credentials for machine-to-machine servers (the proxy mints "
                    "a shared token at token_url using client_id/client_secret, no user interaction) "
                    "or oauth2_flow: authorization_code for interactive servers (per-user tokens via "
                    "browser sign-in, including delegate_auth_to_upstream)."
                )

            config_dcr_bridge = server_config.get("dcr_bridge", None)
            if config_dcr_bridge is not None and not isinstance(config_dcr_bridge, bool):
                raise ValueError(
                    f"Invalid config for MCP server '{server_name or server_id}': dcr_bridge "
                    f"must be a boolean (got {config_dcr_bridge!r})."
                )
            if config_dcr_bridge and auth_type not in (
                MCPAuth.true_passthrough,
                MCPAuth.oauth_delegate,
            ):
                raise ValueError(
                    f"Invalid config for MCP server '{server_name or server_id}': dcr_bridge is only "
                    f"supported for auth_type true_passthrough or oauth_delegate (got {auth_type!r}). "
                    "The DCR bridge serves gateway-hosted OAuth discovery for the client-forwarded "
                    "token modes; interactive oauth2 servers already run the gateway "
                    "authorization-code flow."
                )

            _warn_oauth_endpoints_unresolved(
                server_ref=server_name or server_id,
                server_url=server_url,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set dcr_bridge to a boolean (true/false) in the server config.

Example fix

dcr_bridge: true
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:1716 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/e946cbf17c744d80. Report an issue: GitHub.