sipeed/picoclaw · error
unsupported transport %q
Error message
unsupported transport %q
What it means
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.
Source
Thrown at cmd/picoclaw/internal/mcp/add.go:183
)
}
targetArgs := make([]string, 0, len(positional)-2+len(serverArgs))
targetArgs = append(targetArgs, positional[2:]...)
targetArgs = append(targetArgs, serverArgs...)
return opts, positional[0], positional[1], targetArgs, false, nil
}
func buildServerConfig(target string, args []string, opts addOptions) (config.MCPServerConfig, error) {
transport := config.NormalizeMCPTransportType(opts.Transport)
if transport == "" {
transport = "stdio"
}
switch transport {
case "stdio", "http", "sse":
default:
return config.MCPServerConfig{}, fmt.Errorf("unsupported transport %q", opts.Transport)
}
env, err := parseEnvAssignments(opts.Env)
if err != nil {
return config.MCPServerConfig{}, err
}
headers, err := parseHeaderAssignments(opts.Headers)
if err != nil {
return config.MCPServerConfig{}, err
}
server := config.MCPServerConfig{
Enabled: true,
Type: transport,
Deferred: opts.Deferred,
}
switch transport {View on GitHub (pinned to 49183d7e8d)
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
Example fix
# before picoclaw mcp add ws-server wss://example.com/mcp --transport ws # after picoclaw mcp add ws-server https://example.com/mcp --transport http
Defensive patterns
Strategy: validation
Validate before calling
case "${TRANSPORT:-stdio}" in stdio|http|sse) ;; *) echo "unsupported transport: $TRANSPORT"; exit 2;; esac Type guard
func isSupportedMCPTransport(t string) bool {
switch config.NormalizeMCPTransportType(t) {
case "stdio", "http", "sse":
return true
}
return false
} Prevention
- Allowlist transports as stdio/http/sse before invoking
- Default to omitting --transport (stdio) when unsure
- Re-check supported values after upgrading picoclaw
When it happens
Trigger: `--transport websocket`, `--transport ws`, `--transport grpc`, or typos like 'htpp' - anything that normalizes to a value outside {stdio, http, sse}.
Common situations: Assuming streamable 'ws' exists; following docs newer than the installed picoclaw; CLI autocompletion suggesting a removed value.
Related errors
- --env can only be used with stdio transport
- --env-file can only be used with stdio transport
- %s transport does not accept command arguments
- --header can only be used with http or sse transport
- target %q looks like a remote MCP URL, but transport is %q.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/557ae8d2919fb250.
Report an issue: GitHub.