langchain-ai/deepagents · error · ValueError
Server '{server_name}' has unsupported transport type '{serv
Error message
Server '{server_name}' has unsupported transport type '{server_type}'. Supported types: stdio, sse, http What it means
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.
Source
Thrown at libs/code/deepagents_code/mcp_tools.py:933
f"Server '{server_name}' has type 'stdio' but also declares "
"a 'url' field. Remove 'url' or set "
'`"type": "http"` (or `"sse"`) for a remote server.'
)
raise ValueError(error_msg)
if "args" in server_config and not isinstance(server_config["args"], list):
error_msg = f"Server '{server_name}' 'args' must be a list"
raise TypeError(error_msg)
if "env" in server_config and not isinstance(server_config["env"], dict):
error_msg = f"Server '{server_name}' 'env' must be a dictionary"
raise TypeError(error_msg)
else:
error_msg = (
f"Server '{server_name}' has unsupported transport type '{server_type}'. "
"Supported types: stdio, sse, http"
)
raise ValueError(error_msg)
auth = server_config.get("auth")
if auth is not None:
if auth != "oauth":
msg = (
f"Server '{server_name}' has unsupported auth value "
f"{auth!r}. Only 'oauth' is supported."
)
raise ValueError(msg)
if server_type == "stdio":
msg = (
f"Server '{server_name}' uses stdio transport; "
"'auth: oauth' is only valid for http/sse transports."
)
raise ValueError(msg)
header_names = {name.lower() for name in (server_config.get("headers") or {})}
if "authorization" in header_names:
msg = (View on GitHub (pinned to a1af029e6e)
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.
Example fix
// before
{"docs": {"type": "websocket", "url": "wss://mcp.example.com"}}
// after
{"docs": {"type": "http", "url": "https://mcp.example.com"}} Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED_TYPES = {"stdio", "sse", "http"}
def validate_type(name: str, cfg: dict) -> None:
stype = cfg.get("type", "stdio")
if stype not in SUPPORTED_TYPES:
raise ValueError(f"Server '{name}' has unsupported transport type '{stype}'. Supported: {sorted(SUPPORTED_TYPES)}") Type guard
def has_supported_type(cfg: dict) -> bool:
return cfg.get("type", "stdio") in {"stdio", "sse", "http"} Try / catch
try:
tools = resolve_and_load_mcp_tools(config)
except ValueError as e:
if "unsupported transport type" in str(e):
print(f"Fix 'type' field: {e}") # map 'websocket'/'streamable-http' etc. to http, fix typos/casing
else:
raise Prevention
- 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.
When it happens
Trigger: 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`.
Common situations: 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.
Related errors
- Server '{server_name}' uses {transport!r} transport; OAuth l
- {str(exc)}
- {field} references unset env var {name}. Set {name} in the e
- {field} contains a malformed '${{...}}' reference. Use '${VA
- {field} must be a string, got {type(value).__name__}
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/1f3061caf607975d.
Report an issue: GitHub.