Claude Code Static IPs

Give supported Claude Code requests two stable source IPs for protected APIs, from your laptop, development container or a remote host you control.

Route the HTTP client that actually calls the protected service. Keep destination authentication and Claude Code’s permissions in place while QuotaGuard supplies a consistent outbound network identity.

The full Claude Code setup guide explains the right route, secure configuration and source-IP checks.

Claude Code servers connected to a green shield and lock.

Reach protected APIs from the Claude Code client that calls them

Keep partner APIs and integration checks accessible when the development host changes. Register both addresses from your QuotaGuard subscription and route the destination’s HTTP requests through the proxy.

Select the smallest useful scope. A tool can use QuotaGuard while the model provider keeps its existing route. Configure a provider proxy only when that connection also needs fixed egress.

Choose provider routing or tool routing

Claude Code supports authenticated HTTP and HTTPS proxy URLs. Configure a command or its HTTP library when only a protected API call needs fixed egress. For an API-adapter repair, give the approved test command a stable source so it can compare a permitted staging response with the expected result. A successful model response does not establish the tool’s source address.

Allowlist both assigned addresses

The destination may see either subscription address during normal routing or failover. Add both in the format the destination requires, such as separate /32 entries for IPv4 CIDR lists. Keep the API key, OAuth scopes and roles in place: source-IP approval is an additional network check, not a replacement for authentication.

Verify the actual protected request

Run the source-IP check from the same command client and execution environment that will call the API. Then perform an authorized read-only operation against the destination. Destination logs or a specific IP-policy response help establish the outcome; a successful terminal curl check alone does not verify every Claude Code tool.

A configured Claude Code command HTTP client routes through QuotaGuard to a protected API.

Keep Claude Code sandbox policy on the request path

Preserve sandbox domain restrictions while adding fixed egress. Claude Code supports an upstream HTTP or HTTPS proxy behind its built-in local sandbox proxy.

The local policy layer still decides which destinations the sandboxed command may reach. QuotaGuard supplies the source address for the permitted upstream connection.

Set the upstream route before launch

Supply the authenticated QuotaGuard URL through your approved secret configuration. Shell-export changes require restarting the affected Claude Code session. Check lowercase and uppercase variables, because a stale lowercase value can take precedence. Keep proxy credentials out of prompts, screenshots and repository files.

Retain the built-in local proxy

Do not enter a remote QuotaGuard host or port into sandbox httpProxyPort or socksProxyPort. Those settings replace local proxy listeners and change who performs filtering. Keep the built-in domain policy in place and use the supported upstream configuration instead of disabling restrictions to make a source-IP check pass.

Match terminal, background and Desktop settings

A terminal export does not configure every session. Put network variables in user or managed settings when background agents need them. When Desktop manages the provider connection, that route reads managed and user settings, not repository settings. Identify the requesting process before copying configuration between environments.

A sandboxed Claude Code command passes through its local policy proxy before the QuotaGuard upstream route.

Put MCP egress on the server’s onward API connection

Claude Code connecting to an MCP server and that server calling a partner API are separate network legs. Put the proxy on the client that opens the protected connection.

A customer-operated MCP status tool can expose a narrow, authorized lookup while its HTTP client uses fixed egress. The Claude Code guide covers local and remote placement, secret handling and troubleshooting.

Give local MCP clients an explicit route

A local stdio MCP server is a separate process. Supply the configuration its HTTP library needs and verify that library uses it. The stdio exchange remains local; it is not the outbound request that a partner API checks. Do not infer the server’s API route from the model connection or the shell sandbox.

Configure remote MCP where the request originates

Proxying Claude Code’s connection to a remote HTTP MCP endpoint does not change the server’s next API request. Configure server-side egress when you operate that server. A vendor-hosted connector needs its own supported setting or operator assistance; local proxy variables cannot assign its backend source IP.

Use the transport the requesting client supports

QuotaGuard Static tunnels destination HTTPS through an HTTP proxy. Shield adds TLS on the client-to-proxy hop and requires an HTTPS-proxy-capable client or supported adapter. Claude Code does not support SOCKS proxies. Check each MCP library separately, and keep certificate verification and destination authentication enabled.

The customer-controlled MCP server HTTP client routes its onward API call through QuotaGuard; local stdio remains separate.

FAQs

Common questions about Claude Code static IPs and QuotaGuard.

When does a Claude Code workflow need a static IP?

When its requesting client calls a service that requires approved source addresses and the execution host does not already have a suitable fixed route. If your company VPN or managed egress gateway covers that exact client, keep the approved path. A private-network-only API still needs its supported network access; public static egress does not create that access.

Will HTTPS_PROXY route every Claude Code tool?

No. The model client, command HTTP clients, MCP servers and browsers can use different processes and routes. Apply configuration to the client that opens the protected connection and check its bypass rules. A successful model response or one curl IP check does not prove that all tools use the same source.

Should I put QuotaGuard’s port in sandbox httpProxyPort?

No. httpProxyPort and socksProxyPort select replacement local proxy listeners; they are not remote upstream connection fields. Keep Claude Code’s built-in sandbox proxy and its domain restrictions. Configure the supported HTTP or HTTPS upstream route instead.

Why does my terminal IP check pass but Claude Code’s Bash tool fails?

The Bash tool may use a sandbox policy proxy, different inherited settings or a different HTTP client. Run the check through the actual Bash-tool route, keep the destination permitted under the existing policy, and inspect the client’s effective configuration. A sandbox denial and a destination IP allowlist rejection are different failures.

Why did my changed proxy variable not affect the running session?

Shell exports are read when Claude Code starts. Restart that session after changing its launch environment, and check for stale lowercase variables that take precedence. Background agents should receive network variables through user or managed settings rather than depending on whichever shell started their supervisor.

Does a local stdio MCP server need separate configuration?

Its onward HTTP client needs a working proxy configuration. Supply the necessary values to that server process and verify its library’s behavior. The local stdio exchange is not the API-facing network connection, and the shell sandbox does not establish an MCP server’s egress route.

Can my local proxy settings change a hosted MCP connector’s API address?

Not by themselves. A remote MCP server or hosted connector calls its backend API from its own infrastructure. Configure that server’s onward HTTP client if you control it. Otherwise, use the provider’s supported egress controls rather than assuming local Claude Code settings affect the backend.

Can Claude Code use QuotaGuard’s SOCKS endpoint?

Claude Code’s documented provider proxy configuration does not support SOCKS. Use its supported authenticated HTTP or HTTPS proxy route. Other customer-controlled clients may have separate SOCKS support, but that does not make a SOCKS URL valid for Claude Code’s provider connection.

What should I check if the protected API still returns 401 or 403?

First establish the source seen by the destination and confirm both assigned IPs are allowed. Then check that API’s credentials, scopes, roles and policy response. Proxy authentication is separate from destination authentication; a destination 403 alone does not prove that the QuotaGuard password or route is wrong.

🚀 Ready to Get Started? Choose Your QuotaGuard Path

QuotaGuard STATIC

Why: You need a rock-solid, fixed IP for general API access, AI workflows, or standard third-party integrations.
Best For: Developers, startups, and general application connectivity.
Key Feature: SOCKS5 support for secure database access.
Sign Up for QG Static

QuotaGuard SHIELD

Why: You handle PHI, payment card data, or sensitive PII and require TLS encryption on the customer-to-proxy hop while preserving your application’s HTTPS session to its destination.
Best For: Regulated industries, financial services, and healthcare.
Key Feature: TLS-encrypted proxy connection with the destination HTTPS session preserved.
Sign Up for QG Shield

Trusted by Engineering Teams Everywhere

Reliability Engineered for the Modern Cloud

For over a decade, QuotaGuard has provided reliable, high-performance static IP and proxy solutions for cloud environments like Heroku, Kubernetes, and AWS.

Get the fixed identity and security your application needs today.