Documentation
¶
Overview ¶
Package containerurl provides helpers for rewriting localhost URLs to host.containers.internal so they are reachable from inside a container.
Index ¶
Constants ¶
const ContainerHost = "host.containers.internal"
ContainerHost is the hostname used to reach the host machine from inside a container.
Variables ¶
This section is empty.
Functions ¶
func RewriteMCPCommandArgs ¶
func RewriteMCPCommandArgs(mcp *workspace.McpConfiguration)
RewriteMCPCommandArgs rewrites localhost URLs in MCP command args so they are reachable from inside a container. Only command-based MCP servers are affected — these are spawned inside the container and may reference localhost to reach host services. URL-based MCP servers (remote endpoints) are not modified.
func RewriteURL ¶
RewriteURL replaces localhost aliases in a URL with host.containers.internal so the URL is reachable from inside a container. If the input is not a valid URL or does not reference localhost, it is returned unchanged.
Types ¶
This section is empty.