{"record":{"id":"2ac96bf93ed67ef6","repo":"BerriAI/litellm","slug":"url-or-spec-path-is-required-for-http-sse-transpor","errorCode":null,"errorMessage":"url or spec_path is required for HTTP/SSE transport","messagePattern":"url or spec_path is required for HTTP/SSE transport","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/_types.py","lineNumber":1392,"sourceCode":"    @classmethod\n    def validate_transport_fields(cls, values):\n        if isinstance(values, dict):\n            transport: Final = values.get(\"transport\")\n            if transport == MCPTransport.stdio:\n                if not values.get(\"command\"):\n                    raise ValueError(\"command is required for stdio transport\")\n                if not values.get(\"args\"):\n                    raise ValueError(\"args is required for stdio transport\")\n                # Validate command against allowlist to prevent arbitrary execution\n                base_command: Final = os.path.basename(values[\"command\"])\n                if base_command not in MCP_STDIO_ALLOWED_COMMANDS:\n                    raise ValueError(\n                        f\"Command '{values['command']}' is not in the allowed commands list \"\n                        f\"for stdio transport. Allowed commands: {sorted(MCP_STDIO_ALLOWED_COMMANDS)}\"\n                    )\n            elif transport in [MCPTransport.http, MCPTransport.sse]:\n                if not values.get(\"url\") and not values.get(\"spec_path\"):\n                    raise ValueError(\"url or spec_path is required for HTTP/SSE transport\")\n        return values\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def validate_credentials_requirements(cls, values):\n        \"\"\"Validate credentials when provided.\n\n        auth_value is optional — users may configure it dynamically\n        (e.g. via per-request headers or OAuth2 flows) instead of\n        storing a static value at server creation time.\n        \"\"\"\n        return values\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def validate_dcr_bridge_auth_type(cls, values):\n        if not isinstance(values, dict) or not values.get(\"dcr_bridge\"):\n            return values","sourceCodeStart":1374,"sourceCodeEnd":1410,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_types.py#L1374-L1410","documentation":"Pydantic model_validator (validate_transport_fields) on the MCP server registration type rejecting an HTTP or SSE transport server that declares neither a 'url' nor a 'spec_path'. Remote MCP servers need an endpoint to connect to (directly or via a discovered spec), so the registration is refused before the server enters the registry. It is the HTTP/SSE counterpart of the stdio command/args checks in the same validator.","triggerScenarios":"Thrown at litellm/proxy/_types.py:1392 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide url or spec_path for HTTP/SSE transport."],"exampleFix":"url='https://mcp.example.com/sse'","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"}