Skip to main content

developer_url

Function developer_url 

Source
fn developer_url(http_host: &str) -> Result<String, CliError>
Expand description

Build the developer MCP URL from the profile’s http_host.

http_host is flexible:

  • Bare hostname (console.foo.cloud) → infer https://.
  • Loopback (localhost, 127.0.0.0/8, ::1) → infer http:// and, if no port was given, default to LOCAL_HTTP_PORT.
  • host:port or [ipv6]:port → keep the port; infer scheme as above.
  • http://... / https://... → use the URL verbatim. The user picked the scheme and any port; no defaults are applied.

IPv6 hosts are bracketed automatically by url::Url regardless of how the user wrote them.