{"record":{"id":"1f3061caf607975d","repo":"langchain-ai/deepagents","slug":"server-server-name-has-unsupported-transport-t","errorCode":null,"errorMessage":"Server '{server_name}' has unsupported transport type '{server_type}'. Supported types: stdio, sse, http","messagePattern":"Server '(.+?)' has unsupported transport type '(.+?)'\\. Supported types: stdio, sse, http","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/mcp_tools.py","lineNumber":933,"sourceCode":"                f\"Server '{server_name}' has type 'stdio' but also declares \"\n                \"a 'url' field. Remove 'url' or set \"\n                '`\"type\": \"http\"` (or `\"sse\"`) for a remote server.'\n            )\n            raise ValueError(error_msg)\n\n        if \"args\" in server_config and not isinstance(server_config[\"args\"], list):\n            error_msg = f\"Server '{server_name}' 'args' must be a list\"\n            raise TypeError(error_msg)\n\n        if \"env\" in server_config and not isinstance(server_config[\"env\"], dict):\n            error_msg = f\"Server '{server_name}' 'env' must be a dictionary\"\n            raise TypeError(error_msg)\n    else:\n        error_msg = (\n            f\"Server '{server_name}' has unsupported transport type '{server_type}'. \"\n            \"Supported types: stdio, sse, http\"\n        )\n        raise ValueError(error_msg)\n\n    auth = server_config.get(\"auth\")\n    if auth is not None:\n        if auth != \"oauth\":\n            msg = (\n                f\"Server '{server_name}' has unsupported auth value \"\n                f\"{auth!r}. Only 'oauth' is supported.\"\n            )\n            raise ValueError(msg)\n        if server_type == \"stdio\":\n            msg = (\n                f\"Server '{server_name}' uses stdio transport; \"\n                \"'auth: oauth' is only valid for http/sse transports.\"\n            )\n            raise ValueError(msg)\n        header_names = {name.lower() for name in (server_config.get(\"headers\") or {})}\n        if \"authorization\" in header_names:\n            msg = (","sourceCodeStart":915,"sourceCodeEnd":951,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/mcp_tools.py#L915-L951","documentation":"MCP server configs support only three transport types: `stdio`, `sse`, and `http`. `_validate_server_config` resolves the effective type from the `type` field and raises this ValueError for anything else, since no transport implementation exists for other values.","triggerScenarios":"A server entry has `\"type\"` set to a value outside {stdio, sse, http} — e.g. `\"type\": \"websocket\"`, `\"type\": \"streamable\"`, or a typo like `\"type\": \"htttp\"` — and is validated through `select_server`, `resolve_and_load_mcp_tools`, `_validate_mcp_config_servers`, or `_drop_invalid_mcp_config_servers`.","commonSituations":"Typoed type strings; copying types from other MCP clients that support extra transports (websocket, streamable-http); uppercase or mixed-case values like 'STDIO' when resolution is case-sensitive; spec drift after a library version change.","solutions":["Change `type` to one of the supported values: \"stdio\", \"sse\", or \"http\".","Use \"http\" for modern streamable-HTTP remote servers if your previous client called it 'streamable-http'.","Fix casing/typos in the type string (e.g. 'htttp' -> 'http').","Remove the `type` key for local subprocess servers so it defaults to stdio."],"exampleFix":"// before\n{\"docs\": {\"type\": \"websocket\", \"url\": \"wss://mcp.example.com\"}}\n// after\n{\"docs\": {\"type\": \"http\", \"url\": \"https://mcp.example.com\"}}","handlingStrategy":"validation","validationCode":"SUPPORTED_TYPES = {\"stdio\", \"sse\", \"http\"}\n\ndef validate_type(name: str, cfg: dict) -> None:\n    stype = cfg.get(\"type\", \"stdio\")\n    if stype not in SUPPORTED_TYPES:\n        raise ValueError(f\"Server '{name}' has unsupported transport type '{stype}'. Supported: {sorted(SUPPORTED_TYPES)}\")","typeGuard":"def has_supported_type(cfg: dict) -> bool:\n    return cfg.get(\"type\", \"stdio\") in {\"stdio\", \"sse\", \"http\"}","tryCatchPattern":"try:\n    tools = resolve_and_load_mcp_tools(config)\nexcept ValueError as e:\n    if \"unsupported transport type\" in str(e):\n        print(f\"Fix 'type' field: {e}\")  # map 'websocket'/'streamable-http' etc. to http, fix typos/casing\n    else:\n        raise","preventionTips":["Keep a constant list of supported types and check against it when generating configs.","Translate types from other MCP clients (websocket, streamable-http) to the supported 'http' equivalent.","Watch for case sensitivity: always write lowercase 'stdio'/'sse'/'http'.","Validate the type field in CI before configs ship."],"tags":["mcp","config-validation","transport","unsupported-type"],"backgroundTag":"mcp-server-config-invalid","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}