- The Machine API, specify
private_v6. fly ips, specifyallocate-v6 --privatefly launch, specify--flycast
fly proxy to create a tunnel, or you can follow our blueprint to Jack into your private network with WireGuard.
With fly mcp proxy, this support is built in. To use, simply specify a --url ending in .internal or .flycast.
.internaladdresses can be used to target individual machines or regions, but can only be used to access machines that are started. Just remember that the protocol to use ishttpnothttps, and the port you want to use it the internal port. So an typical URL would look likehttp://mcp.internal:8080/..flycastaddresses target an external port for your application, and supports fly routing headers. If your request is routed to a machine that is stopped or suspended, that machine will be started first. Again the protocol to use ishttpnothttps, so an typical URL would look likehttp://mcp.flycast/.
fly mcp wrap has a --private flag which will cause the proxy to respond with a 403 Forbidden response to all requests that do not come in via the private network. This may be useful when combined with containers and machines with multiple services, some of which are public but the MCP server is private.