{"record":{"id":"557ae8d2919fb250","repo":"sipeed/picoclaw","slug":"unsupported-transport-q","errorCode":null,"errorMessage":"unsupported transport %q","messagePattern":"unsupported transport %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/mcp/add.go","lineNumber":183,"sourceCode":"\t\t)\n\t}\n\n\ttargetArgs := make([]string, 0, len(positional)-2+len(serverArgs))\n\ttargetArgs = append(targetArgs, positional[2:]...)\n\ttargetArgs = append(targetArgs, serverArgs...)\n\n\treturn opts, positional[0], positional[1], targetArgs, false, nil\n}\n\nfunc buildServerConfig(target string, args []string, opts addOptions) (config.MCPServerConfig, error) {\n\ttransport := config.NormalizeMCPTransportType(opts.Transport)\n\tif transport == \"\" {\n\t\ttransport = \"stdio\"\n\t}\n\tswitch transport {\n\tcase \"stdio\", \"http\", \"sse\":\n\tdefault:\n\t\treturn config.MCPServerConfig{}, fmt.Errorf(\"unsupported transport %q\", opts.Transport)\n\t}\n\n\tenv, err := parseEnvAssignments(opts.Env)\n\tif err != nil {\n\t\treturn config.MCPServerConfig{}, err\n\t}\n\theaders, err := parseHeaderAssignments(opts.Headers)\n\tif err != nil {\n\t\treturn config.MCPServerConfig{}, err\n\t}\n\n\tserver := config.MCPServerConfig{\n\t\tEnabled:  true,\n\t\tType:     transport,\n\t\tDeferred: opts.Deferred,\n\t}\n\n\tswitch transport {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/mcp/add.go#L165-L201","documentation":"buildServerConfig normalizes opts.Transport with config.NormalizeMCPTransportType, defaults empty to 'stdio', then accepts only stdio, http, and sse. Any other normalized value is rejected, quoting the ORIGINAL --transport string you typed, so the message reflects your input even after case-normalization.","triggerScenarios":"`--transport websocket`, `--transport ws`, `--transport grpc`, or typos like 'htpp' - anything that normalizes to a value outside {stdio, http, sse}.","commonSituations":"Assuming streamable 'ws' exists; following docs newer than the installed picoclaw; CLI autocompletion suggesting a removed value.","solutions":["Use one of: stdio, http, sse","Check `picoclaw mcp add --help` on your build for the supported list","Upgrade picoclaw if newer docs mention a transport your binary lacks"],"exampleFix":"# before\npicoclaw mcp add ws-server wss://example.com/mcp --transport ws\n# after\npicoclaw mcp add ws-server https://example.com/mcp --transport http","handlingStrategy":"validation","validationCode":"case \"${TRANSPORT:-stdio}\" in stdio|http|sse) ;; *) echo \"unsupported transport: $TRANSPORT\"; exit 2;; esac","typeGuard":"func isSupportedMCPTransport(t string) bool {\n    switch config.NormalizeMCPTransportType(t) {\n    case \"stdio\", \"http\", \"sse\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Allowlist transports as stdio/http/sse before invoking","Default to omitting --transport (stdio) when unsure","Re-check supported values after upgrading picoclaw"],"tags":["mcp","cli","transport","validation"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}