Skip to main content

Network access

Most agent environments let outbound traffic through, or already allow your MCP client's own connection. The one step that sandboxes commonly block is the upload PUT: after deploy_create_upload, the agent sends the file's bytes from its own shell, with curl or a script. Those requests go to your site's partition API host, so that host has to be reachable from the agent's shell.

What needs to be reachable

FromToWhen
The agent's shell, where curl or fetch runsus.api.hostsmith.netUploads to sites in the us partition
The agent's shelleu.api.hostsmith.netUploads to sites in the eu partition

Both use HTTPS on port 443. Small deploys with deploy_files send the content through the MCP server and need neither.

You don't need to allow mcp.hostsmith.net or hostsmith.net for the agent's shell. The MCP connection and the sign-in run in your client app (Claude, Claude Code, Cursor and others), not in the agent's shell, so terminal sandbox rules don't apply to them. If you added the MCP server and signed in, those already work.

The REST API can also return direct S3 URLs, when a caller asks for mode: "presigned" when starting an upload. Those need egress to the bucket's S3 host (*.s3.<region>.amazonaws.com) instead. The MCP server always uses the default, the partition API host.

Allowing the hosts in your sandbox

Cursor

Add the hosts to the network policy in ~/.cursor/sandbox.json (all workspaces) or <workspace>/.cursor/sandbox.json (one workspace):

JSON
{
  "networkPolicy": {
    "allow": [
      "us.api.hostsmith.net",
      "eu.api.hostsmith.net"
    ]
  }
}

A host listed in networkPolicy.deny stays blocked even if it's also in allow. If your team admin manages the network allowlist, it replaces your local one: ask them to add the hosts. See Cursor's sandbox.json reference.

Claude Code

Add the hosts to sandbox.network.allowedDomains in ~/.claude/settings.json, or in the project's .claude/settings.json:

JSON
{
  "sandbox": {
    "enabled": true,
    "network": {
      "allowedDomains": [
        "us.api.hostsmith.net",
        "eu.api.hostsmith.net"
      ]
    }
  }
}

If deniedDomains lists one of these hosts, remove it first: deny wins over allow. Without the entry, Claude Code asks you the first time a command reaches a new host, and Yes, and don't ask again saves the host for you. See Claude Code's sandboxing docs.

Codex CLI

The workspace-write sandbox turns network access off by default. Turn it on in ~/.codex/config.toml:

TOML
[sandbox_workspace_write]
network_access = true

This opens outbound network for every command in workspace-write mode, not just these hosts. Codex's network proxy, which limits traffic to listed domains, is experimental; see Codex's configuration reference if you want to try it. The risk of the broad setting is bounded by the upload URLs themselves: each carries a token that lets one PUT to one object, for one hour.

Other sandboxes and corporate firewalls

Allow outbound HTTPS (TCP 443) to us.api.hostsmith.net and eu.api.hostsmith.net.

If an HTTP proxy sits in the path, make sure that:

  • CONNECT is allowed for both hosts;
  • if the proxy inspects TLS, it trusts the certificate chain: Hostsmith's certificates are issued by Amazon (Amazon Trust Services);
  • NO_PROXY lists these hosts only if your network expects direct traffic to them.

When egress is blocked

A large deploy that fails with one of these usually means the agent's shell can't reach the partition API host:

  • curl: (6) Could not resolve host: us.api.hostsmith.net
  • connection refused from a host your browser reaches
  • 407 Proxy Authentication Required from a corporate proxy
  • a PUT that hangs or times out

Retrying doesn't help: a blocked host stays blocked. The deploy_create_upload tool tells your agent to stop, show you the setting for your sandbox from this page, and wait for you to change it. If you can't change it, the agent can give you the upload URLs to run the PUT yourself. The URLs stay valid for an hour, so the agent can retry the same ones once you've allowed the host.

To test the path yourself, run this from the same shell your agent uses:

Terminal
curl -sS https://us.api.hostsmith.net/v1/partitions

If it prints the partitions as JSON, the host is reachable. If it fails, the agent's uploads fail the same way.