sipeed/picoclaw · error
target %q looks like a remote MCP URL, but transport is %q.
Error message
target %q looks like a remote MCP URL, but transport is %q. Use --transport http or --transport sse
What it means
When transport is stdio (the default) but the target parses as an http/https URL with a host — looksLikeRemoteURL, helpers.go:259-273 — the CLI refuses to store a URL as a stdio command and names the fix (add.go:225-231). This catches the most common mistake: supplying a remote MCP URL while forgetting that transport defaults to stdio.
Source
Thrown at cmd/picoclaw/internal/mcp/add.go:226
}
if len(args) > 0 {
return config.MCPServerConfig{}, fmt.Errorf("%s transport does not accept command arguments", transport)
}
parsedURL, err := url.ParseRequestURI(target)
if err != nil || parsedURL.Scheme == "" || parsedURL.Host == "" {
return config.MCPServerConfig{}, fmt.Errorf("invalid MCP URL %q", target)
}
server.URL = target
server.Headers = headers
return server, nil
}
if len(headers) > 0 {
return config.MCPServerConfig{}, fmt.Errorf("--header can only be used with http or sse transport")
}
if looksLikeRemoteURL(target) {
return config.MCPServerConfig{}, fmt.Errorf(
"target %q looks like a remote MCP URL, but transport is %q. Use --transport http or --transport sse",
target,
transport,
)
}
command := target
commandArgs := append([]string(nil), args...)
if err := validateLocalCommandPath(target); err != nil {
return config.MCPServerConfig{}, err
}
if isLocalCommandPath(command) {
command = expandHomePath(command)
}
server.Command = command
server.Args = commandArgsView on GitHub (pinned to 49183d7e8d)
Solutions
- Append --transport http (streamable-http is accepted and normalizes to http)
- Use --transport sse if the endpoint is a legacy SSE server
- If you truly meant stdio, replace the URL with a local command path
Example fix
# before picoclaw mcp add github https://api.githubcopilot.com/mcp/ # after picoclaw mcp add github https://api.githubcopilot.com/mcp/ --transport http
Defensive patterns
Strategy: validation
Validate before calling
func looksLikeRemoteURL(target string) bool {
u, err := url.ParseRequestURI(target)
return err == nil && u.Host != "" &&
(strings.ToLower(u.Scheme) == "http" || strings.ToLower(u.Scheme) == "https")
}
if looksLikeRemoteURL(target) && transport == "stdio" {
transport = "http" // or fail loudly with a clear message
} Prevention
- Whenever the target starts with http:// or https://, always pass --transport http (or sse)
- Pin the transport explicitly in scripts instead of relying on the stdio default
When it happens
Trigger: `picoclaw mcp add github https://api.githubcopilot.com/mcp/` with no --transport flag; `-t stdio` passed explicitly together with a URL.
Common situations: Following vendor MCP docs that show only a URL; coming from other CLIs that infer transport from the URL shape; copy-pasting an sse endpoint into a stdio-style command line.
Related errors
- unsupported transport %q
- --env can only be used with stdio transport
- --env-file can only be used with stdio transport
- %s transport does not accept command arguments
- invalid MCP URL %q
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/379f50f9530e46ce.
Report an issue: GitHub.