To configure a proxy in ChromeDevTools/chrome-devtools-mcp, pass the --proxyServer flag in your MCP server arguments so the launched Chromium instance routes traffic through your chosen gateway. However, according to Chromium’s proxy documentation, Chromium’s native SOCKS5 implementation does not support username/password authentication. If your SOCKS5 provider requires credentials, you must handle authentication outside of Chromium using either IP allowlisting or a local proxy bridge bound to 127.0.0.1.
Important protocol distinction: HTTP 407 Proxy Authentication Required is an HTTP proxy authentication response, not a universal SOCKS5 error. Passing inline credentials in a socks5:// URL typically causes connection failures or rejected handshakes rather than a guaranteed 407 dialog. The guide below separates these authentication paths, walks through sequential verification, and includes a troubleshooting matrix for common failures.
1. Proxy Authentication Paths Compared
When chrome-devtools-mcp launches Chrome, --proxyServer is forwarded directly to the browser process. How authentication behaves depends on the proxy protocol and where credentials are supplied.
| Connection Path | Where Authentication Is Handled | Key Requirement |
|---|---|---|
Chrome → SOCKS5 with IP Allowlisting (socks5://host:port) |
Proxy provider checks your client’s public source IP | Provider supports IP allowlisting; your actual outbound source IP is allowlisted |
| Chrome → Local HTTP Bridge → Authenticated SOCKS5 | Local bridge (127.0.0.1) supplies upstream SOCKS5 credentials |
Bridge supports upstream SOCKS5 auth and runs in a network reachable by Chrome |
Chrome → Authenticated SOCKS5 (socks5://user:pass@host:port) |
Not supported by Chromium’s native SOCKS5 proxy stack | Use a local authentication bridge or switch to IP allowlisting |
| Chrome → Authenticated HTTP Proxy | HTTP proxy authentication flow (HTTP 407 challenge) |
Requires a compatible auth handler; verify support in your specific MCP workflow |
(Note: --proxyServer applies to browser instances launched by chrome-devtools-mcp. If you attach MCP to an already-running Chrome instance via --browserUrl, proxy settings must be configured when that browser is launched.)
2. Option A: SOCKS5 with IP Allowlisting (Zero Extra Processes)
If your server, CI/CD runner, or office network has a stable public IP and your provider supports IP allowlisting, direct SOCKS5 routing is the simplest setup—no local forwarding service is required.
- Identify the public source IP of the machine connecting to your proxy provider (you can check it via socks5.io What’s My IP). Note that this is your outbound source IP, which is different from the proxy’s exit IP.
- Add that source IP to your proxy provider’s allowlist.
- Add the server configuration to your MCP client. The JSON format below applies to clients that use
mcpServersJSON configs (such as Claude Code and Cursor). If you use another client such as Codex, check its official MCP documentation for its native format (for example, TOML or CLI registration).
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--proxyServer=socks5://proxy.example.com:1080"
]
}
}
}
(Replace proxy.example.com:1080 with the actual gateway hostname and port from your proxy dashboard. For production reproducibility, you can pin a specific tested version of chrome-devtools-mcp instead of @latest.)
3. Option B: Local Authentication Bridge (For Username/Password SOCKS5)
If you develop on a dynamic home IP or your SOCKS5 endpoint requires username/password credentials, run a local unauthenticated proxy bridge on 127.0.0.1 that forwards traffic to your authenticated upstream SOCKS5 server.
Method 1: 1-Line Bridge with gost (Docker or CLI)
gost translates a local unauthenticated HTTP listener into an authenticated upstream SOCKS5 connection.
Using Docker (Bash/Zsh):
docker run -d --name mcp-proxy-bridge \
-p 127.0.0.1:8080:8080 \
gogost/gost \
-L http://:8080 \
-F socks5://your_username:your_password@proxy.example.com:1080
Single-line command (PowerShell / Windows / Linux):
docker run -d --name mcp-proxy-bridge -p 127.0.0.1:8080:8080 gogost/gost -L http://:8080 -F socks5://your_username:your_password@proxy.example.com:1080
Or using the gost binary directly:
gost -L http://127.0.0.1:8080 -F socks5://your_username:your_password@proxy.example.com:1080
Networking & security note: Inside Docker,
-L http://:8080listens on the container’s interface so Docker port forwarding works, while-p 127.0.0.1:8080:8080ensures the host only exposes the port on loopback (127.0.0.1), not on external networks. Also ensure Chrome and the bridge share a reachable network—if Chrome runs inside a different Docker container,127.0.0.1refers to that container’s own loopback, not the host.
Method 2: Lightweight Node.js Bridge (proxy-chain)
If you prefer keeping the bridge inside Node.js alongside npx chrome-devtools-mcp, install proxy-chain and load your upstream credentials from an environment variable so secrets are never hard-coded into source control.
npm install proxy-chain
Create proxy-bridge.mjs:
import ProxyChain from 'proxy-chain';
const upstreamUrl = process.env.UPSTREAM_PROXY_URL;
if (!upstreamUrl) {
throw new Error('Set UPSTREAM_PROXY_URL before starting the bridge.');
}
const server = new ProxyChain.Server({
port: 8080,
host: '127.0.0.1',
prepareRequestFunction: () => ({
upstreamProxyUrl: upstreamUrl,
}),
});
server.listen(() => {
console.log(`Local MCP proxy bridge listening on http://127.0.0.1:${server.port}`);
});
Start the bridge and keep the terminal running (URL-encode special characters like @, :, or # in your password):
macOS / Linux (Bash/Zsh):
export UPSTREAM_PROXY_URL="socks5://your_username:your_password@proxy.example.com:1080"
node proxy-bridge.mjs
Windows (PowerShell):
$env:UPSTREAM_PROXY_URL="socks5://your_username:your_password@proxy.example.com:1080"
node proxy-bridge.mjs
Connect chrome-devtools-mcp to the Local Bridge
Once gost or proxy-bridge.mjs is running, point your mcpServers JSON config to http://127.0.0.1:8080:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--proxyServer=http://127.0.0.1:8080"
]
}
}
}
4. Verify the Proxy in 3 Sequential Steps
A bridge printing "listening" only confirms the local port is open—it does not verify your upstream credentials or prove that Chrome is routing through it. Always verify in order:
# Step 1: Test the upstream SOCKS5 endpoint directly (IP-allowlisted example)
# Note: Use socks5h:// in curl for remote DNS resolution; on Windows PowerShell, call curl.exe explicitly.
curl --proxy socks5h://proxy.example.com:1080 https://api.ipify.org?format=json
# Step 2: If using a local bridge, test its HTTP listener
curl --proxy http://127.0.0.1:8080 https://api.ipify.org?format=json
(For Step 1 with username/password auth, use curl --proxy socks5h://your_username:your_password@proxy.example.com:1080 https://api.ipify.org?format=json. Note that socks5h:// is a curl convention—do not automatically replace socks5:// with socks5h:// inside Chromium’s --proxyServer flag.)
Step 3: Verify inside the MCP-controlled browser. Ask your coding agent to navigate to https://socks5.io/tools/ip-check/ or https://api.ipify.org?format=json using the configured MCP server, then compare the returned IP against your direct connection IP.
5. Troubleshooting Common Proxy Failures
| Symptom | Possible Cause | What to Check |
|---|---|---|
| HTTP 407 Proxy Authentication Required | An HTTP proxy hop requires authentication or rejected the credentials | Confirm which hop uses HTTP, verify credentials, and check URL encoding for special characters (@, :, #) |
Connection refused (ECONNREFUSED) |
Local bridge is not running, wrong port, or localhost points to a different container |
Confirm the bridge process is active, check port mapping (8080), and verify container network reachability |
| Connection timeout | Unreachable upstream endpoint, firewall block, or source IP not allowlisted | Run Step 1 (curl) directly against the upstream endpoint; verify your current public source IP in the provider allowlist |
| Exit IP did not change | MCP config not reloaded, wrong browser session attached, or bypass rule matched | Restart the MCP client/server, confirm --proxyServer is applied to the launched browser, and re-test in that exact session |
| SOCKS5 connection fails | Protocol/port mismatch or upstream requires unsupported inline SOCKS5 auth | Check whether the port expects HTTP or SOCKS5 (see SOCKS vs. HTTP differences); route credential-based SOCKS5 through a local bridge |
| Unexpected country or language | IP geolocation database variance, browser locale headers, timezone, or cached cookies | Verify exit IP, Accept-Language, timezone, and cookies separately—do not assume IP alone controls site localization |
6. Advanced: Multi-Region Geo-QA Setup
To test localized pricing, regional redirects, and language layouts across multiple countries in Claude Code or Cursor, define separate MCP server entries—one per target region—using --isolated so each launched browser uses a clean profile.
The example below assumes IP allowlisting on your regional endpoints. If your provider requires username/password authentication, run a separate local bridge port per region (for example, 127.0.0.1:8081 for US, 127.0.0.1:8082 for UK, 127.0.0.1:8083 for Japan) and point each --proxyServer to its corresponding local port.
{
"mcpServers": {
"chrome-us": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--proxyServer=socks5://us.proxy.example.com:1080"
]
},
"chrome-uk": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--proxyServer=socks5://uk.proxy.example.com:1080"
]
},
"chrome-jp": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--proxyServer=socks5://jp.proxy.example.com:1080"
]
}
}
}
Beyond IP Routing: Regional QA Signals
Changing the exit IP via a proxy only changes the network origin. Because api.ipify.org only reports the IP address (not geolocation metadata or browser state), verify these signals separately when running strict localization QA:
- Browser Locale &
Accept-Language: Confirm the browser language matches the tested region (for example,ja-JPfor Japan). - Timezone & Geolocation API: Sites using
Intl.DateTimeFormat()or browser Geolocation permissions check client-side signals independently of IP. Configure these via browser launch flags, MCP tools (where supported), or a dedicated CDP client. - Session Isolation: Launching a fresh
--isolatedbrowser session separates cookies and storage between regions, whereas reusing a single browser session across tests can retain currency or locale cookies.
Choosing a Proxy for Repeatable Regional QA
When evaluating proxy endpoints for chrome-devtools-mcp, focus on the capabilities your workflow requires:
- Protocol & Auth Compatibility: Native SOCKS5 support with IP allowlisting eliminates the need to maintain local bridge processes in CI/CD.
- Exit IP Consistency: A stable exit IP helps keep multi-step checkout, login, and localization tests consistent (though no proxy type can guarantee that a target website will skip verification or never disconnect).
- Regional Coverage: Dedicated endpoints for your target markets—such as United States proxies, UK proxies, and Japan proxies.
If your QA pipeline needs stable regional exit IPs with SOCKS5 support, you can review socks5.io Static Residential Proxies to verify plan specifications, authentication options, and supported locations.











