{"record":{"id":"1423a3ae2abcc14a","repo":"anthropics/skills","slug":"unsupported-transport-type-transport-use-stdi","errorCode":null,"errorMessage":"Unsupported transport type: {transport}. Use 'stdio', 'sse', or 'http'","messagePattern":"Unsupported transport type: (.+?)\\. Use 'stdio', 'sse', or 'http'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/mcp-builder/scripts/connections.py","lineNumber":151,"sourceCode":"    transport = transport.lower()\n\n    if transport == \"stdio\":\n        if not command:\n            raise ValueError(\"Command is required for stdio transport\")\n        return MCPConnectionStdio(command=command, args=args, env=env)\n\n    elif transport == \"sse\":\n        if not url:\n            raise ValueError(\"URL is required for sse transport\")\n        return MCPConnectionSSE(url=url, headers=headers)\n\n    elif transport in [\"http\", \"streamable_http\", \"streamable-http\"]:\n        if not url:\n            raise ValueError(\"URL is required for http transport\")\n        return MCPConnectionHTTP(url=url, headers=headers)\n\n    else:\n        raise ValueError(f\"Unsupported transport type: {transport}. Use 'stdio', 'sse', or 'http'\")\n","sourceCodeStart":133,"sourceCodeEnd":152,"githubUrl":"https://github.com/anthropics/skills/blob/f6656c1256d5a8adfa37db9110046ef20bac644c/skills/mcp-builder/scripts/connections.py#L133-L152","documentation":"create_connection() accepts only the transports it knows: 'stdio', 'sse', and 'http'/'streamable_http'/'streamable-http' (case-insensitive). Anything else raises this ValueError immediately, listing the valid values. It exists to catch config typos and deprecated transport names before a connection object is built.","triggerScenarios":"Calling create_connection(transport='websocket'), 'ws', 'HTTPS' with odd casing like 'Http ' (note: exact-match set is 'http' variants after .lower(); leading/trailing spaces still fail), 'streamable' (abbreviated), or 'stdio-http'.","commonSituations":"New transport names appearing in the MCP ecosystem before this library supports them; config files hand-written with 'ws://' URLs implying a websocket transport; trailing whitespace or YAML quoting quirks in the transport field.","solutions":["Use one of the supported values exactly: 'stdio', 'sse', or 'http' (aliases 'streamable_http', 'streamable-http').","Strip whitespace: transport.strip() before the call if the value comes from user input.","For websocket-based servers, check whether the server also exposes a streamable-http endpoint and use that.","Upgrade mcp-builder if a newer transport name was added upstream."],"exampleFix":"# before\ncreate_connection(name=\"w\", transport=\"websocket\", url=\"ws://localhost:9000\")\n\n# after\ncreate_connection(name=\"w\", transport=\"http\", url=\"http://localhost:9000/mcp\")","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"stdio\", \"sse\", \"http\", \"streamable_http\", \"streamable-http\"}\n\ndef supported_transport(value: str) -> bool:\n    return isinstance(value, str) and value.strip().lower() in SUPPORTED","typeGuard":"def is_supported_transport(value: str) -> bool:\n    return isinstance(value, str) and value.strip().lower() in {\"stdio\", \"sse\", \"http\", \"streamable_http\", \"streamable-http\"}","tryCatchPattern":"try:\n    conn = create_connection(name=n, transport=t, **fields)\nexcept ValueError as e:\n    if \"Unsupported transport\" in str(e):\n        log.error(\"server %s: transport %r not supported; use stdio/sse/http\", n, t)\n        skip_server(n)\n    else:\n        raise","preventionTips":["Normalize and strip the transport value from user config before the call.","Fail fast on config load with a clear list of supported transports.","Watch mcp-builder releases when the MCP spec adds new transports."],"tags":["mcp","validation","config","transport"],"backgroundTag":null,"analyzedSha":"f6656c1256d5a8adfa37db9110046ef20bac644c","analyzedAt":"2026-08-14T16:09:17.493Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}