Repository navigation
playwright mcp with a proxy
Microsoft's server takes --proxy-server, the same shape Chromium has always
used, plus --proxy-bypass for hosts that should go direct. That is the
configuration part and it is one line. The rest of this page is the part that
decides whether it helps.
When an agent starts failing on a site that worked from your laptop, the change is usually not the browser. It is where the request came from. A laptop on a domestic connection and a container on a cloud host present two very different network identities, and the second one is pre-judged before a single byte of your page interaction happens.
That is worth knowing before you spend a day switching servers. Why an agent gets blocked works through attributing the failure properly, and the network is the first place to look, not the last.
Routing HTTP through a proxy is not the same as being at the other end of it. Three specific things stay behind unless you handle them.
DNS. If names are resolved locally and only the connection is proxied, the resolution path still points home. It is invisible in a browser and obvious to anything watching resolvers. Whether it leaks depends on the proxy scheme: a SOCKS5 proxy can be told to resolve remotely, an HTTP proxy resolves for you by design, and a local resolver in front of either undoes both.
WebRTC. The classic one. A page can ask the browser to enumerate candidate addresses, and unless the browser is configured otherwise it will happily report the machine's real ones. The engine wiki has the mechanism and the test: WebRTC leaks with a proxy.
Timezone and locale. The one people forget, and the one that is trivially
checkable from JavaScript. If the exit says Frankfurt and
Intl.DateTimeFormat().resolvedOptions().timeZone says your own city, that is a
contradiction no amount of proxying fixes. Set it to match the exit, or accept
that you are self-reporting a mismatch.
None of these is exotic. All three are readable in a few lines from a page, and the engine wiki documents how to check whether a proxy leaks your real IP so you can test rather than assume.
Do not proxy everything reflexively. A proxied session is slower, and if the
proxy is shared its reputation is not yours to control: you can move from a
neutral address to one that a hundred other people have already spent. For
sites that were never a problem, the direct path is fine, which is what
--proxy-bypass exists for.
Residential and datacenter are different products. A datacenter address is fast, stable and identifiable as a datacenter. A residential one is neither fast nor stable and is not pre-judged the same way. Which you want depends on whether the site is judging the address at all, and that is testable.
Rotation is not free. An address that changes mid-session is a session that looks like it moved city between two clicks. If you rotate, rotate between sessions, not inside one.
invisible_playwright_mcp's server takes the proxy in two
places rather than one. STEALTHFOX_PROXY in the config block that registers
the server is the default exit for everything it opens. browser_open also
takes a proxy argument, so the exit is changeable mid-conversation without
touching the config, and the helper browser can leave by a different address
than the main one - or, given no proxy of its own, by the same one.
What that buys is the third leak above, closed by construction rather than by
remembering: with a proxy set, the timezone and locale are derived from the exit
instead of from the host, so the contradiction this page warns about cannot be
introduced by forgetting. STEALTHFOX_NO_PROXY goes out from the machine's own
address when you want that deliberately, and passing "" for proxy insists on
no proxy for one browser even when the environment sets one.
It is a different shape, not a better one: deriving the timezone costs you the ability to proxy while keeping your own clock, which is occasionally what someone wants. The MCP server has the full settings table.
How do I set a proxy in Playwright MCP? --proxy-server on the server
command line, with --proxy-bypass for hosts that should go direct.
Can I use a different proxy per browser? Not with a single process and a command-line flag. Either run one server per proxy, or use a server that takes the proxy as a tool argument rather than only at startup.
Does a proxy hide that I am automating? No. It changes where the request comes from. Everything a page can read about the browser is unchanged, and so is your pacing.
Will a proxy fix a challenge page? Sometimes, when the address was the reason. Often not. Cloudflare and Playwright MCP covers what a challenge is actually reading.
Do I need a residential proxy? Only if the site is judging the address type. Test with the cheap option first; a lot of failures attributed to the address are pacing.
See also: Playwright MCP best practices, when the agent gets blocked, and the MCP server.
-
microsoft/playwright-mcp, retrieved 2026-09-10, for
--proxy-serverand--proxy-bypass. - The engine wiki's own measurements on WebRTC leaks and checking for IP leaks.
Written while maintaining a server that takes the proxy per browser. The page says that is a convenience rather than an advantage, because the same result is reachable with the tool most readers already have.
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- A stealth browser MCP, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- What is an agentic browser? Definition and the two kinds
- Open-source agentic browsers: the three layers, compared
- Choosing an MCP server for browser automation: four axes
- Stealth MCP servers compared: Camoufox, nodriver, Patchright
- Playwright MCP alternatives, and the three you don't need
- Autonomous browser agents: the four rungs of autonomy
- What is actually free in the AI browser agent stack
- browser-use on GitHub: what the repo actually gives you
- Playwright MCP vs Chrome DevTools MCP: different jobs
- How to choose among MCP servers: a map by category
- Which MCP servers are worth adding to Claude Code
- MCP on GitHub: finding servers and judging them fast
- MCP vs an API: the decision, and what the wrapper costs
- MCP alternatives: when the protocol is the wrong shape
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Playwright MCP session blocked: four causes, four fixes
- Playwright MCP and captchas: what actually gets you past
- Cloudflare and a browser MCP server: what is being read
- Can an AI agent solve a captcha? The honest answer
- Getting an AI agent to fill out forms
- The best model for an MCP browser agent, and what it really costs
- Browser problem or model problem?
- How to use a Playwright MCP server with Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- How to let Claude Desktop control a browser
- How to add a browser to Cursor as an MCP server
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- How to add a browser to Cline as an MCP server
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent
- The MCP server
- How the tools are shaped, and why
- Playwright MCP vs the Playwright CLI: which fits when
- Playwright MCP: browser is already in use, and the fix
- Playwright MCP best practices: four decisions that matter
- Playwright MCP with a proxy, and the three leaks it leaves
- A browser MCP server in GitHub Copilot: setup and limits
- Using a browser MCP server for web scraping: the pattern
- Which LLM for browser automation: the four properties
- How to build a browser agent, and what to take instead
- Getting an AI agent to log into a website: three routes
- MCP tools, resources and prompts: who controls each
- How many MCP tools is too many? The context arithmetic
- How to build an MCP server: the decisions, not the scaffold
- Local or remote MCP server: what changes, and what does not
- Writing an MCP client in Python: the thirty-line version
- Self-hosted AI agent: what one actually costs to run
- How long an AI browser agent takes per step, measured
- Text, HTML, snapshot or screenshot: what the agent should read
- Giving an AI browser agent a stopping condition
- Keeping an AI browser agent out of destructive actions
- Why did the AI agent click the wrong thing
- When the page changes under the AI agent
- Running one AI agent task across a list of sites
- Seeing a page as it appears in another country
- Getting data out of a dashboard with no export button
- Two browsers in one session: main and support
- Finding the dead links on a site with an AI agent
- Filling a CRM record from a company's website
- One form submission per spreadsheet row, with an AI agent
- Dated screenshots of a page as evidence
- Checking order and delivery status with an AI agent
- Reading a PDF that opens inside the browser
- Summarising a long page or thread with an AI agent
- Collecting every image on a page with its caption
- Collecting event and course listings with an AI agent
- Cancelling a subscription with an AI agent
- What an AI agent can and cannot do inside an iframe
- Shadow DOM and an AI agent: you can click it, you cannot read it
- How to add a browser to Codex as an MCP server
- What a page snapshot costs, per control
- How to let Gemini CLI use a browser
- Native selects and the ones that only look like selects
- Clicking by selector or by coordinates
- How long the agent waits before it gives up
- What a second browser costs
- Uploading a file with an AI agent, and why this one cannot
- Watching the agent work, and when it is worth it
- When not to use an AI browser agent
- Agent or script: deciding once instead of every time
- Using the keyboard instead of the mouse
- Secrets in an agent task: where they end up
- What an agent run should log
- Deduplicating what an AI agent collects
- Normalising values across sites
- Validating an AI agent's output
- Reading a table with an AI agent
- Driving a site's own search and filters
- The task works headed and fails headless
- How to let the AdaL CLI use a browser