Playwright MCP with a Mobile Proxy
Send the browser an agent drives through Playwright MCP out over a dedicated Coronium line, with the login kept in a config file.
Microsoft maintains Playwright MCP, a server that hands an agent a real browser to open pages, click, type and read what is on screen. Out of the box that browser leaves from your own connection. Point it at a carrier line and every site it opens sees a mobile IP in the country you chose.
Checked against the Playwright MCP documentation on 30 October 2026. Sources are listed at the end.
{
"browser": {
"browserName": "chromium",
"isolated": true,
"launchOptions": {
"proxy": {
"server": "http://CONNECTION_IP:HTTP_PORT",
"username": "USERNAME",
"password": "PASSWORD"
}
},
"contextOptions": {
"locale": "de-DE",
"timezoneId": "Europe/Berlin"
}
}
}Before you start
An MCP host
Claude Code, Codex, Cursor, VS Code, Claude Desktop or any other client that runs stdio servers. Playwright MCP needs Node 18 or newer; the Coronium server needs Node 20, so plan for 20.
One line for the browser
Its HTTP Port, Username and Password. The country of the line is the country every page will think the browser is in.
A Coronium API token, for rotation
From dashboard.coronium.io, Account, API Access. Only needed if the agent should rotate the line or read its status; the browser itself signs in with the proxy login.
What the agent gets
The Coronium MCP server is coronium-proxy-mcp on npm. The environment variable CORONIUM_TOOL_PROFILE decides which tools exist inside Playwright MCP. Counts below were read with tools/list on the current release.
| Profile | Tools | Money tools | Use it for |
|---|---|---|---|
| directory | 21 | None | An agent that checks, tests and rotates lines you already rent. The hosted server runs this profile. |
| read-only | 31 | None | Reporting: balances, lines, usage, payments and tickets, with nothing that changes state. |
| buyer | 12, or 13 with CORONIUM_ENABLE_SPENDING=1 | Buy only, and only with spending on | An agent that quotes, buys and runs a few lines after you approve each total. |
| full | 59, plus 6 money tools with spending on | Buy, renew, top up and cancel, only with spending on | Everything else: settings, webhooks, rotation timers and Node tools. The server default when the profile is unset. |
- directory
- Tools: 21
- Money tools: None
- An agent that checks, tests and rotates lines you already rent. The hosted server runs this profile.
- read-only
- Tools: 31
- Money tools: None
- Reporting: balances, lines, usage, payments and tickets, with nothing that changes state.
- buyer
- Tools: 12, or 13 with CORONIUM_ENABLE_SPENDING=1
- Money tools: Buy only, and only with spending on
- An agent that quotes, buys and runs a few lines after you approve each total.
- full
- Tools: 59, plus 6 money tools with spending on
- Money tools: Buy, renew, top up and cancel, only with spending on
- Everything else: settings, webhooks, rotation timers and Node tools. The server default when the profile is unset.
Start with directory. Its tools include coronium_list_free_modems, coronium_list_tariffs, coronium_get_proxies, coronium_test_modem, coronium_rotate_modem, coronium_get_rotation_status, coronium_replace_modem and coronium_get_renewal_quote. Names can change between releases, so let the agent read them from tools/list rather than from this page.
Put Playwright MCP on the line
The proxy can be set with a flag or a config file. For a line that needs a login, the config file is the one that works.
Know what the flag can and cannot carry
--proxy-servertakes a URL such ashttp://host:portorsocks5://host:port, and--proxy-bypasslists domains that skip the proxy. The documented form has no place for a username and password. Every Coronium line signs in with both, so use the config file below.Checked against Playwright MCP README
Write the config file
Save the file at the top of this page with your line's values.
browser.launchOptionsis passed to Playwright's launch call, and Playwright'sproxyoption takesserver,usernameandpassword. Use the HTTP Port: Playwright documents the login for HTTP proxies.Checked against Playwright: browserType.launch proxy option
Match locale and time zone to the line
contextOptionsaccepts Playwright's browser context options, includinglocaleandtimezoneId. Set them to the line's country; the example is for a German line. A browser on Berlin time behind a Brazilian IP is the kind of mismatch sites score.Checked against Playwright: Emulation, locale and timezone
Add the server to your host
Pass the config with
--configand an absolute path. In Claude Code, put--before the command so Claude Code does not read--configas its own option. Other hosts take the same arguments in their JSON config. Naming the server after the line it uses makes the agent's log easier to read.Claude Code, or the mcpServers block of any other host claude mcp add browser-line -- npx @playwright/mcp@latest --config /ABSOLUTE/PATH/playwright-line.json { "mcpServers": { "browser-line": { "command": "npx", "args": ["@playwright/mcp@latest", "--config", "/ABSOLUTE/PATH/playwright-line.json"] } } }Checked against Playwright MCP README
Add the Coronium server next to it
With both servers the agent can browse through the line and rotate it. Use the
directoryprofile; it cannot spend. In clients that support remote servers with OAuth, the hosted server at https://api.coronium.io/mcp does the same without a token.Claude Code claude mcp add coronium -e CORONIUM_API_TOKEN=YOUR_CORONIUM_API_TOKEN -e CORONIUM_TOOL_PROFILE=directory -- npx -y coronium-proxy-mcp@2.3.0 # or the hosted server (sign in with /mcp) claude mcp add --transport http coronium-remote https://api.coronium.io/mcpChecked against coronium-proxy-mcp on npm
Ask for the exit IP
Ask the agent to open
https://api.ipify.organd read the page. The address should match the line's IP in the Coronium dashboard. If it shows your own address, the config file was not loaded.Checked against Playwright MCP README
First tasks to try
Ask in plain words. The agent picks the tools; the names below are what it should call, so you can tell from its log whether it did.
โWhich countries have Coronium lines in stock right now, and what does 24 hours cost in each?โ
Calls
coronium_list_free_modemsthencoronium_list_tariffs. Reads live stock and plans. Nothing is bought.โShow my Coronium lines with their country, carrier, expiry and SOCKS5 URL.โ
Calls
coronium_get_proxies. Returns credentials. Treat the answer as a secret and keep it out of shared chats.โRotate my line called <name> and tell me the new IP once the rotation has finished.โ
Calls
coronium_rotate_modemthencoronium_get_rotation_status. A rotation answers done, rotating (poll the status, do not resubmit) or unchanged (the carrier kept the IP; wait about 60 seconds).โRotate the line, close the browser, then open api.ipify.org again and tell me both addresses.โ
Calls
coronium_rotate_modemthencoronium_get_rotation_statusthenbrowser_closethenbrowser_navigate. The last two are Playwright MCP tools. A fresh browser after the rotation starts a clean session on the new address.
Rotate between tasks, not inside one
The browser never needs to know the IP changed: host, port and login stay the same, and the next request leaves through the new address. What carries over is the session. Cookies and storage from before the rotation now arrive from a different IP.
That is why the config above sets isolated. In isolated mode Playwright MCP keeps the profile in memory, and closing the browser throws its storage away. Rotate, let the agent call browser_close, and the next task starts as a new visitor on a new address.
Leave at least 60 seconds between rotations. An agent that rotates before every page will hit the interval and get refusals; rotate per task or per account instead.
Several browsers, several lines
A persistent Playwright MCP profile can be used by one browser at a time; the README says to start additional clients with --isolated or their own --user-data-dir. The same split works for lines: one config file per line, one server entry per config, named after the line.
Playwright MCP can also emulate a phone. --device "iPhone 15" picks a device profile, and --mobile uses a generic one. A phone-shaped browser on a carrier IP is a consistent pair, and mobile pages are lighter for the agent to read.
{
"mcpServers": {
"browser-de": { "command": "npx", "args": ["@playwright/mcp@latest", "--config", "/PATH/line-de.json"] },
"browser-us": { "command": "npx", "args": ["@playwright/mcp@latest", "--config", "/PATH/line-us.json", "--device", "iPhone 15"] }
}
}Money tools stay off
Nothing in Playwright MCP touches your Coronium balance. The Coronium server can, but only when you change its profile and turn spending on.
- Money tools appear only when
CORONIUM_ENABLE_SPENDING=1is set in the host environment and the profile isbuyer(buy only) orfull. A.envfile in the working directory cannot turn it on. - Every money call needs
confirm: true, a new idempotency key for each approved order, an explicit funding source and the exact approved total; any other live total is refused withprice_changed. - The server spends money already on the account. It has no way to add funds; a person does that in the dashboard.
Keep the login out of reach
The config file holds the line's password in plain text. Keep it outside any repository, readable by your user only (chmod 600 on macOS and Linux), and give each line its own file so a leak exposes one line.
- Create the API token in dashboard.coronium.io, Account, API Access and keep it in the host's config, never in a chat or a repository. Regenerating it in the dashboard revokes the old one.
- Give each agent its own line. Two agents on one line rotate each other's IP in the middle of a task.
- The answer to
coronium_get_proxiescontains proxy passwords. Treat it, the Reset Link and any OpenVPN profile as secrets. coronium_replace_modemis irreversible: the line gets a new device, new credentials and possibly a new carrier. Filter it out if the agent should never do that on its own.
Check it worked
Ask the agent to open these pages in the Playwright browser and read the results back, or watch them in the headed window.
- The IP and the carrier
- Open What Is My IP through the line. The country should be the line's country and the network should be the mobile carrier, not a hosting company.
- WebRTC
- Run the WebRTC leak test. The only public address it should report is the line's. Your own address showing up means the browser is leaking around the proxy.
- Timezone against the IP
- The IP and timezone check compares the clock the browser reports with the timezone of the IP. A mismatch is one of the first things anti-fraud systems look at.
From a terminal the agent can use, the same check is one request. Export the line's details once, then ask an IP echo service which address it sees:
export CORONIUM_PROXY_HOST="CONNECTION_IP"
export CORONIUM_HTTP_PORT="HTTP_PORT"
export CORONIUM_SOCKS_PORT="SOCKS5_PORT"
export CORONIUM_PROXY_USER="USERNAME"
export CORONIUM_PROXY_PASS="PASSWORD"
curl -x "http://$CORONIUM_PROXY_USER:$CORONIUM_PROXY_PASS@$CORONIUM_PROXY_HOST:$CORONIUM_HTTP_PORT" https://api.ipify.orgWhen it does not connect
| What you see | Likely cause | What to do |
|---|---|---|
| Pages show your own IP | The server started without the config, usually because of a relative path or a missing -- in Claude Code. | Use an absolute path, and in Claude Code keep the -- between the server name and npx. |
| Every page fails with a proxy error | The SOCKS5 Port was used with a login, or the username or password has a typo. | Use http://CONNECTION_IP:HTTP_PORT in server and copy the login from the dashboard. |
| You used --proxy-server and every page asks for credentials or fails | The flag carries no username and password. | Move the proxy into the config file's launchOptions.proxy with username and password. |
| A second client cannot start the browser | Two clients share one persistent profile. | Start each with --isolated or its own --user-data-dir, as the README advises. |
| Sites see the right IP but the wrong time zone | contextOptions was left at the machine's defaults. | Set locale and timezoneId for the line's country. |
- Pages show your own IP
- The server started without the config, usually because of a relative path or a missing
--in Claude Code. - Use an absolute path, and in Claude Code keep the
--between the server name andnpx. - Every page fails with a proxy error
- The SOCKS5 Port was used with a login, or the username or password has a typo.
- Use
http://CONNECTION_IP:HTTP_PORTinserverand copy the login from the dashboard. - You used --proxy-server and every page asks for credentials or fails
- The flag carries no username and password.
- Move the proxy into the config file's
launchOptions.proxywithusernameandpassword. - A second client cannot start the browser
- Two clients share one persistent profile.
- Start each with
--isolatedor its own--user-data-dir, as the README advises. - Sites see the right IP but the wrong time zone
contextOptionswas left at the machine's defaults.- Set
localeandtimezoneIdfor the line's country.
Questions
Does --proxy-server accept a username and password?
The documented form is a URL with a scheme, host and port, such as http://myproxy:3128, with no login fields. For a line that signs in, put the proxy in the config file under browser.launchOptions.proxy, where Playwright accepts username and password.
Should Playwright MCP use the HTTP or the SOCKS5 port?
The HTTP port. Playwright documents the proxy username and password for HTTP proxies, and every Coronium line has an HTTP port on the same host with the same login as its SOCKS5 port.
How does the agent change the IP mid-run?
Add the Coronium MCP server next to Playwright MCP. The agent calls coronium_rotate_modem, waits for coronium_get_rotation_status to report done, and then closes the browser so the next task starts a clean session on the new address.
Can one agent use lines in two countries?
Yes. Give each line its own config file and its own Playwright MCP server entry, for example browser-de and browser-us, and tell the agent which one to use for which task.
Does a mobile IP make the browser look like a phone?
Not by itself. The IP is a carrier address, but the browser is desktop Chromium unless you add --device or --mobile, which Playwright MCP provides for phone emulation.
How we checked
Every Playwright MCP config key, command and flag on this page was read from the pages below on 30 October 2026. The Coronium side comes from the dashboard and the live API. There are no screenshots: we quote the names instead of showing an account we do not run. If a label in Playwright MCP has moved since, the tool's own page is the one to trust.
- Playwright MCP READMERequirements, client setup (Claude Code, Codex, Cursor and the standard config), --proxy-server, --proxy-bypass, --config, --isolated, --user-data-dir, --device, --mobile, the config file schema and the note on persistent profiles.
- Playwright: browserType.launch proxy optionserver, bypass, username and password, with the login described for HTTP proxies.
- Playwright: Emulation, locale and timezonelocale and timezoneId as browser context options.
- coronium-proxy-mcp on npmPackage and version; tool names read with tools/list on the current release on 30 October 2026.