{"record":{"id":"a03a5c4056604d4b","repo":"BerriAI/litellm","slug":"stdio-config-is-required-for-stdio-transport","errorCode":null,"errorMessage":"stdio_config is required for stdio transport","messagePattern":"stdio_config is required for stdio transport","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/experimental_mcp_client/client.py","lineNumber":269,"sourceCode":"        self._elicitation_callback: Callable | None = elicitation_callback\n        self._logging_callback: Callable | None = logging_callback\n        # handle the basic auth value if provided\n        if auth_value:\n            self.update_auth_value(auth_value)\n\n    def _create_transport_context(\n        self,\n    ) -> tuple[Any, httpx.AsyncClient | None]:\n        \"\"\"\n        Create the appropriate transport context based on transport type.\n        Returns:\n            Tuple of (transport_context, http_client).\n            http_client is only set for HTTP transport and needs cleanup.\n        \"\"\"\n        http_client: httpx.AsyncClient | None = None\n        if self.transport_type == MCPTransport.stdio:\n            if not self.stdio_config:\n                raise ValueError(\"stdio_config is required for stdio transport\")\n            server_params: Final = StdioServerParameters(\n                command=self.stdio_config.get(\"command\", \"\"),\n                args=self.stdio_config.get(\"args\", []),\n                env=self._get_safe_stdio_env(self.stdio_config.get(\"env\")),\n            )\n            return stdio_client(server_params), None\n        if self.transport_type == MCPTransport.sse:\n            headers = self._get_auth_headers()\n            httpx_client_factory = self._create_httpx_client_factory()\n            return (\n                sse_client(\n                    url=self.server_url,\n                    timeout=self.timeout,\n                    headers=headers,\n                    httpx_client_factory=httpx_client_factory,\n                ),\n                None,\n            )","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/experimental_mcp_client/client.py#L251-L287","documentation":"Transport construction guard in the experimental MCP client: the transport type is stdio but no stdio_config (command/args/env) was supplied, so there is nothing to build a stdio transport from.","triggerScenarios":"Thrown at litellm/experimental_mcp_client/client.py:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a stdio_config (command, args, env) when using stdio transport for the MCP client.","Use SSE or streamable HTTP transport if the server is remote instead."],"exampleFix":null,"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-23T08:17:48.524Z"}