Connect ZenRows MCP to Claude Managed Agents for real-time web scraping with anti-bot bypass and optional private network routing.
ZenRows handles the hard parts of web access so your agents don’t have to. Anti-bot bypass, JavaScript rendering, and residential proxies come built in on every tool call. Use the hosted MCP server to reach any public website, or route scraped data through MCP Tunnels when your infrastructure can’t be exposed to the internet.
Claude Managed Agents is Anthropic’s hosted agent platform. It lets you build and deploy agents that call external tools, including MCP servers, without managing orchestration infrastructure yourself. Agents are configured and run from the Claude Console.
No-code web access for your agents
Connect ZenRows MCP in the Console and your agent can scrape any website by describing the task in plain English. No selectors, no proxy management, no anti-bot tuning.
Anti-bot bypass on every tool call
Premium residential proxies, JavaScript rendering, and stealth fingerprinting come standard. Your agents reach JavaScript-heavy SPAs, Cloudflare-protected sites, and geo-restricted pages without configuration.
Private network routing with MCP Tunnels
MCP Tunnels creates an outbound-only encrypted connection from your infrastructure to Anthropic’s backend. Scraped data flows directly into your internal systems with no inbound ports, no firewall changes, and no public endpoints required.
Works with the Messages API too
Use the same tunneled MCP server programmatically through the Anthropic Messages API, alongside the Console-based agent interface.
ZenRows MCP connects to Claude Managed Agents through three paths. Pick the one that fits your setup.
Option A (remote MCP server)
Option B (MCP Tunnels)
Option C (Messages API)
Use this option when your agent only needs to scrape public websites. This is the simplest path — no infrastructure required.Prerequisites
A ZenRows account and API key. Find your key in the ZenRows dashboard.
Access to the Claude Console with a role that can manage agents and MCP servers.
1
Open Managed Agents in the Console
In the Claude Console sidebar, go to Managed Agents > Sessions and click New session.
If you don’t see Managed Agents in the sidebar, your account may not have access yet. Claude Managed Agents is currently in beta. Request access to try it.
2
Add the ZenRows MCP server
When configuring the agent, click + MCP Server and enter the following:
Field
Value
Server URL
https://mcp.zenrows.com/mcp
Transport
Streamable HTTP
Authorization
Bearer YOUR_ZENROWS_API_KEY
Replace YOUR_ZENROWS_API_KEY with your key from the ZenRows dashboard.
Most MCP clients accept an authorization field that automatically wraps the value as a Bearer token. If the Console provides a free-form headers field instead, set Authorization: Bearer YOUR_ZENROWS_API_KEY manually.
3
Start scraping
Once connected, your agent can access all ZenRows tools. Describe the task in plain English:
Get the product names and prices from https://www.scrapingcourse.com/ecommerce/.
Scrape https://www.scrapingcourse.com/antibot-bypass using Premium Proxies.
Open https://www.scrapingcourse.com/ecommerce/ in a browser, type "hoodie" into the search field, press Enter, wait for results to load, then extract all matching product names and prices.
Use this option when scraped data needs to flow into your private infrastructure, or when compliance requirements prevent exposing systems to the internet. The tunnel creates an outbound-only encrypted connection from your network to Anthropic’s backend — no inbound ports, no firewall changes, no public endpoints.
MCP Tunnels is in research preview and is provided as-is without uptime or continuity commitments. Request access to try it.
Prerequisites
A ZenRows account and API key. Find your key in the ZenRows dashboard.
Access to the Claude Console with a role that can manage agents and MCP servers.
Docker and Docker Compose installed on the host machine, or a Kubernetes cluster.
OpenSSL 1.1.1 or later (pre-installed on macOS and most Linux distributions).
Node.js 18 or later (required to run the ZenRows local MCP server via npx).
1
Create a tunnel in the Console
In the Console sidebar, go to Manage > MCP tunnels and click New tunnel.
Give the tunnel a name.
Leave Set up programmatic access off. The manual credentials flow works for most setups.
After the tunnel is created, open it and copy two values from the Connection section: the domain (looks like abcd1234.tunnel.anthropic.com) and the token (click the eye icon to reveal it).
Keep the tunnel token safe — treat it like a password. If you suspect it has been compromised, regenerate it from the tunnel detail page in the Console.
2
Generate and register a CA certificate
The proxy validates inner TLS against a CA certificate you register in the Console. Anthropic will not connect to the tunnel until a certificate is registered.Generate a CA and server certificate with OpenSSL:
mkdir -p data# Generate the CA key and certificateopenssl req -x509 -newkey rsa:4096 -keyout data/ca.key -out data/ca.crt \ -days 365 -nodes -subj "/CN=ZenRows Tunnel CA"# Generate the server key and certificate signing requestopenssl req -newkey rsa:4096 -keyout data/server.key -out data/server.csr \ -nodes -subj "/CN=mcp-proxy"# Sign the server certificate with the CAopenssl x509 -req -in data/server.csr -CA data/ca.crt -CAkey data/ca.key \ -CAcreateserial -out data/server.crt -days 365
Back in the Console, on the tunnel detail page, click Add certificate and upload data/ca.crt.
The tunnel will show “Needs certificate” and will not appear in the agent MCP server picker until at least one CA certificate is registered.
3
Deploy the tunnel stack
Create a docker-compose.yml file in the same directory as your data/ folder:
Create the proxy config at data/config.yaml. Replace YOUR_TUNNEL_DOMAIN with the domain copied from the Console (for example, abcd1234.tunnel.anthropic.com):
host.docker.internal resolves to the host machine from inside a Docker container on Docker Desktop (macOS and Windows). On Linux, add --add-host=host.docker.internal:host-gateway to the mcp-proxy service, or use the host’s LAN IP directly.
4
Run the ZenRows local MCP server
Run the ZenRows local MCP server on the same host as the tunnel stack:
The server listens on port 8080 by default. Confirm the upstream port in config.yaml matches.
Node.js 18 or later is required for npx to work. You can verify your version with node --version.
5
Attach the tunnel to your Managed Agent session
In Managed Agents > Sessions, create a session and choose Create new agent.
Click + MCP Server and open the dropdown. Tunnels with at least one active certificate appear at the top of the list, above the public connector catalog.
Select your tunnel, enter scraper as the subdomain, and set the path to /mcp.
The Resolves to line confirms the full URL your agent will call. It should look like https://scraper.YOUR_TUNNEL_DOMAIN/mcp.
6
Start scraping
With the tunnel connected, your agent has access to all ZenRows tools and routes all traffic through your private network:
Get the product names and prices from https://www.scrapingcourse.com/ecommerce/.
Open https://www.scrapingcourse.com/ecommerce/ in a browser, type "hoodie" into the search field, press Enter, wait for results to load, then extract all matching product names and prices.
How it worksA tunnel deployment runs two lightweight components inside your network:
cloudflared: the tunnel agent. It opens an outbound-only connection to Anthropic’s tunnel edge and carries encrypted traffic back to your proxy.
Proxy: Anthropic’s routing component. It terminates inner TLS, validates upstream IPs, and routes each request to the correct MCP server based on hostname.
Each MCP server you expose gets a hostname under your tunnel domain, for example scraper.your-tunnel-domain. Traffic between Anthropic and your proxy is encrypted end to end. The tunnel runs on Cloudflare’s network, but Cloudflare cannot read request or response payloads because the proxy terminates inner TLS using a certificate only you hold.
Use this option when you want to call a tunneled ZenRows MCP server programmatically, without the Console. This requires a running MCP Tunnels deployment (Option B) — the Messages API connects to the tunnel URL directly, it does not manage tunnels itself.Prerequisites
A ZenRows account and API key. Find your key in the ZenRows dashboard.
An Anthropic API key from the same workspace the tunnel was created in. Find it in the Claude Console under Settings > API keys.
A running MCP Tunnels deployment (Option B) with at least one active tunnel and a registered CA certificate.
Python 3.8 or later.
1
Install the Anthropic Python library
pip install anthropic
2
Set your environment variables
export ANTHROPIC_API_KEY=your_anthropic_api_key
3
Run the script
Pass the tunnel hostname in the mcp_servers array. Replace scraper.YOUR_TUNNEL_DOMAIN with the hostname configured in your tunnel routing rules.
import anthropicimport osclient = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])response = client.beta.messages.create( model="claude-sonnet-4-5", max_tokens=1000, messages=[ { "role": "user", "content": "Get the top 5 products from https://www.scrapingcourse.com/ecommerce/ and return their names and prices." } ], mcp_servers=[ { "type": "url", "url": "https://scraper.YOUR_TUNNEL_DOMAIN/mcp", "name": "zenrows", } ], tools=[{"type": "mcp_toolset", "mcp_server_name": "zenrows"}], betas=["mcp-client-2025-11-20"],)print(response)
The betas header is required while the MCP connector is in beta. Use an API key from the same workspace the tunnel was created in — cross-workspace tunnel access is not supported.
The tunnel does not appear in the MCP server dropdown
The tunnel must have at least one active CA certificate registered in the Console. A tunnel showing “Needs certificate” will not appear in the picker. Register a certificate and try again.
Confirm the upstream value in config.yaml is reachable from the container running the proxy. On Docker Desktop, use host.docker.internal instead of localhost to reach services on the host machine. On Linux, use the host’s LAN IP or add host-gateway as described in Step 3.
Common causes are a mismatched certificate or a revoked tunnel token. Generate a new token from the Console, update your .env file, and restart the stack.
Confirm the ZenRows local MCP server is running and that the upstream port in config.yaml matches the port the server is listening on. The default port is 8080. You can verify with npx -y @zenrows/mcp --help.For more help, see the ZenRows MCP overview and the Anthropic MCP Tunnels troubleshooting guide.
Do I need MCP Tunnels to use ZenRows with Claude Managed Agents?
No. If your agent only needs to scrape public websites, connect through the ZenRows hosted MCP server (Option A). MCP Tunnels is only needed when scraped data has to flow into private infrastructure or when compliance requirements prevent exposing systems to the internet.
Can I use the local stdio version of ZenRows MCP instead of the remote URL?
For Claude Managed Agents and the Messages API, use the remote MCP server URL (https://mcp.zenrows.com/mcp) or a tunneled URL. The local stdio package (@zenrows/mcp) is for desktop AI clients like Claude Desktop that run the server as a local subprocess. When using MCP Tunnels, the local MCP server runs inside your private network behind the tunnel proxy, not as a local subprocess on your laptop.
What is the difference between Option A and Option B?
Option A uses the ZenRows hosted MCP server directly over the public internet. It is simpler to set up and works for most use cases. Option B routes all traffic through a private encrypted tunnel. Use it when your internal systems cannot be exposed to the internet, or when your industry has compliance requirements around data routing.
Can I use multiple MCP servers through the same tunnel?
Yes. Add additional routes to config.yaml, each with a different subdomain. Each route maps to a different upstream MCP server inside your network. In the Console, attach each subdomain as a separate MCP server in the agent session.
What is the difference between Option B and Option C?
Both use MCP Tunnels for private network routing. Option B connects through the Claude Console and is aimed at no-code or low-code agent configuration. Option C connects programmatically through the Anthropic Messages API and is aimed at developers building applications directly on top of the API.
Was this page helpful?
⌘I
Assistant
Responses are generated using AI and may contain mistakes.