top of page

Proxy for AI Agents: How to Give an Agent Web Access From a Separate IP

1 minute ago
6 min read
Ethernet cables connected to server ports

An AI agent that reads documentation or opens a public page sends that request from your IP address, the same one your team uses for email, logins and everything else. When Bitdefender released a free beta of VPN for AI Agents in September, it came with two limits: it runs only on Macs with Apple silicon, and it covers only requests made through Bitdefender's own tools. A proxy works at a different level. You attach it to the specific tool the agent uses and decide which requests leave from which address.

This is about the agent's outgoing web traffic, not an LLM API gateway. The site will see the proxy address instead of yours, but it can still recognize the browser, a logged-in account and the request pattern, so a separate IP keeps your team's address out of the agent's work; it doesn't make the agent anonymous.

Which agent traffic leaves from your machine

Not every web request an agent makes starts on your computer, and a proxy only affects the ones that do.

  • Hosted web tools. When a chat assistant runs its built-in web search or page fetch, the request leaves from the vendor's servers. The same goes for n8n Cloud workflows. Your proxy never sees these.

  • Local tools. A browser MCP server, a Python or Node script the agent runs, a self-hosted n8n instance: these send requests from your machine or server, under your IP. This is where a proxy belongs.

  • Model API calls. The agent's calls to the model provider. Keep them on your normal connection.

The second group is the one worth separating. An agent can open dozens of pages in a minute, and if a site you're allowed to read rate-limits that burst, the restriction lands on the office or home address everyone shares. Treat a refusal as a signal to slow the agent down or stop, not as something to route around.

Before you start

You need three things: a proxy IP from your provider's dashboard, your own public IP, and the right port. Open https://api.ipify.org without any proxy to see your current address, then add it to the provider's allowlist. With FineProxy, for example, the allowlist is required in every setup: ports 8085 (HTTP) and 1085 (SOCKS5) accept allowlisted addresses with no password, while 8080 and 1080 add a login on top.

Routing a browser tool through a proxy

Playwright MCP is a typical browser tool, and its README lists a --proxy-server option. On a server whose fixed IP is on the allowlist, the proxy goes straight into the MCP config:

.cursor/mcp.json in the project or ~/.cursor/mcp.json for Cursor, and.mcp.json in the project root for Claude Code.

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp", "--proxy-server", "http://PROXY_IP:8085"]
    }
  }
}

Restart the MCP server after saving. A companion option, --proxy-bypass, takes a comma-separated list of domains that should skip the proxy, which is useful for internal tools.

A laptop changes networks, so add its current IP to the allowlist and use the login port. FineProxy keeps such connections working while the address stays in the same subnet; on a new network you update the list. Put the proxy URL with your login and password before the host and port 8080 into an env block on the MCP entry as PLAYWRIGHT_MCP_PROXY_SERVER instead of the --proxy-server argument, and keep that file out of git.

A password exported in a terminal won't help here: Cursor and Claude Code start MCP servers themselves and don't read the shell where you typed export. Percent-encode any @,: or / in the password, since the value is parsed as a URL.

Routing script tools through a proxy

Agents that write and run code need the proxy in the environment of the process that runs those scripts. Python's requests reads HTTP_PROXY, HTTPS_PROXY and NO_PROXY by default; curl reads HTTPS_PROXY but only the lowercase http_proxy, so set both cases.

export HTTP_PROXY=http://PROXY_IP:8085 http_proxy=http://PROXY_IP:8085
export HTTPS_PROXY=http://PROXY_IP:8085 https_proxy=http://PROXY_IP:8085
export NO_PROXY=localhost,127.0.0.1,::1,.openai.com,.anthropic.com
NODE_USE_ENV_PROXY=1 node agent-tools.js

The proxy URL starts with http:// even for HTTPS sites, because the proxy tunnels them. Node.js reads these variables only with NODE_USE_ENV_PROXY=1: fetch() honors it from Node 22.21 and 24.0, the http and https modules from 22.21 and 24.5. Node 20 ignores it, and so does any library that brings its own HTTP agent.

Set these variables where the agent's command runner actually starts, such as the env section of Claude Code's settings, and restart the session after changing them.

Checking which IP the agent actually uses

Don't trust the config; ask the agent. Have it open https://api.ipify.org through the browser tool and then fetch the same URL from a script. Both answers should show the proxy address instead of the one you saw before you started. If the browser shows the proxy and the script shows your own IP, the variables didn't reach that process.

A missing proxy setting fails quietly: the request goes direct and succeeds, and only this check shows it. Repeat it after updating the MCP client or the agent framework, since updates can rewrite configs or start tools with a clean environment. Note that ipify checks the HTTP route only; Chromium's WebRTC can still expose your address to pages that use it unless you launch the browser with a policy that disables non-proxied UDP.

Which proxy type fits agent work

For most agent tasks, such as reading documentation, public product pages and news, datacenter IPs are enough and cost the least. Choose a dedicated IP when you want no other customer on the address during your rental, so the traffic coming from it in that period is only yours. A shared package is cheaper, but its reputation depends partly on the other customers using the same addresses.

Every page now takes one more network hop, so expect long browsing sessions to run a little slower. The provider also sees which hosts the agent connects to, which is one more reason to keep internal services and model APIs in NO_PROXY.

Why model API calls stay off the proxy

Model API calls don't need a different IP: the agent's web identity doesn't depend on them. Over HTTPS the proxy can't read your API key, but it does see the hostname and timing, and if the proxy goes down, the agent would lose its model as well as its browser. Add every model host your stack calls to NO_PROXY; a leading dot, as in.openai.com, covers subdomains in Node, curl and requests.

When the agent also manages the proxy account

Some providers let the agent operate the account over MCP: list proxies, replace a failing IP, read usage or buy more. That saves clicks, but it turns the API key into a spending credential. Create a separate key for each agent, start with read-only scopes, and add write or payment permissions only once you've seen what the agent does with the read ones.

FineProxy documents an MCP server with 49 tools and a REST API with 49 operations (OpenAPI 3.1) that share the same scoped keys. Spending wallet funds needs a separate wallet:spend scope, a purchase is rejected if the price differs from the quote the agent received, and irreversible actions need explicit confirmation. The API also reports top destinations and error categories, so you can see which sites the agent hits and where it fails.

FineProxy's dedicated IPs start at $2 a month in its Israel datacenter location, and dedicated ISP addresses in Italy, Germany or Spain cost $3.20 a month. A 100-IP datacenter package costs $12 for 30 days, with each IP shared by up to five customers, and that package can be tested for 48 hours for $1.60, not refundable. The dashboard shows P50/P95 latency, success rate and abuse status for each IP.

Targeting on FineProxy is by country. Mail protocols, .gov domains and the Google Search results page are closed on every plan, so an agent can't pull Google results through it.

Checklist before you let an agent browse through a proxy

  • List the agent's tools and mark which ones send requests from your machine.

  • Add your current public IP to the provider's allowlist and note which ports need a login.

  • Configure the proxy in each tool's own config or env block, not only in a terminal.

  • Keep model APIs, localhost and internal hosts in NO_PROXY.

  • Verify the exit IP from the browser tool and from a script, and again after updates.

  • Give account-management keys read-only scopes first, and keep spending behind a separate scope.

Get your work moving in remio

See what needs your attention and take the next step in Workspace.

remio currently supports Windows 10+ (x64) and Macs with Apple silicon.

Your AI Partner at Work
Get more done with remio

Plan. Create. Deliver.
All in one place.

bottom of page