Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt

Use this file to discover all available pages before exploring further.

The ZenRows MCP (Model Context Protocol) server is the standard way AI systems use ZenRows. A single connection gives your AI assistant, agent, or application real-time access to any website.

View on GitHub

ZenRows MCP is open source. Star the repository, file issues, or contribute.

Why ZenRows MCP

  • Reach sites that normally block bots: Get access to any website at scale without getting blocked by anti-bot systems.
  • Managed scraping infrastructure: Proxy rotation, headless browser orchestration, anti-bot evasion, and session management run on ZenRows infrastructure.
  • Plug into any AI you already use: Works with any MCP client, including AI assistants, agent frameworks, AI SDKs, IDE plugins, and custom applications.
  • Plain English, no scraping code: Describe the task naturally and the AI picks the right tool. No selectors, no proxy management, no anti-bot tuning.

What you can do

Once connected, your AI assistant can:
  • Scrape any webpage by describing the task in plain English
  • Extract structured data from e-commerce sites, news pages, job boards, and more
  • Render pages as Markdown, plain text, HTML, or PDF
  • Take above-the-fold or full-page screenshots
  • Access geo-restricted, JavaScript-heavy, or bot-protected pages
  • Automate multi-step browser workflows: navigate, click, fill forms, scroll, drag, and extract across pages
  • Run JavaScript in a live browser context
  • Manage cookies, local storage, multiple tabs, and persistent sessions

Before you start

ZenRows Account

A ZenRows account

ZenRows API Key

Your ZenRows API key

Connection options

The ZenRows MCP server supports two transport options. Pick the one that fits your client.
OptionTransportAuthentication
Remote MCP serverStreamable HTTPOAuth Bearer token
Local MCP serverSTDIO (local subprocess)Environment variable
Both options expose the same set of tools and capabilities. The choice is purely about how your client connects to the server.

Remote MCP server

The hosted ZenRows MCP server is the recommended path for any AI application that calls an LLM API directly. The server runs on ZenRows’ infrastructure, so there is nothing to install, configure, or update.
  • Server URL:
    https://mcp.zenrows.com/mcp
  • Transport:
    Streamable HTTP
  • Authentication:
    OAuth-based. Pass your ZenRows API key as a Bearer token. See Authentication for details.
Example: OpenAI Responses API Most modern AI SDKs accept the connection details through a single MCP tool definition. Here is the complete configuration for the OpenAI Responses API:
Python
import os
from openai import OpenAI

ZENROWS_API_KEY = os.environ["ZENROWS_API_KEY"]

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

response = client.responses.create(
    model="gpt-5",
    tools=[
        {
            "type": "mcp",
            "server_label": "zenrows",
            "server_description": "Web scraping MCP server for accessing live web content.",
            "server_url": "https://mcp.zenrows.com/mcp",
            "authorization": ZENROWS_API_KEY,
            "require_approval": "never",
        }
    ],
    input="Visit https://news.ycombinator.com/ and summarize the three most recent posts.",
)

print(response.output_text)
Generic configuration
FieldValue
Endpointhttps://mcp.zenrows.com/mcp
TransportStreamable HTTP
Auth headerAuthorization: Bearer YOUR_ZENROWS_API_KEY
Most MCP clients accept either an authorization shorthand field that automatically wraps the value as a Bearer token, or a free-form headers field where you set the Authorization header yourself. Either approach works with ZenRows MCP.

Local MCP server

If your AI client runs the MCP server as a local subprocess instead of calling a remote URL, use the @zenrows/mcp npm package. This is the standard configuration for desktop AI clients.
You need Node.js installed for npx to work.
The exact location of the configuration file varies by client, but every supported client uses a similar MCP server config shape. Replace YOUR_ZENROWS_API_KEY with your actual key:
JSON
{
  "mcpServers": {
    "zenrows": {
      "command": "npx",
      "args": ["-y", "@zenrows/mcp"],
      "env": {
        "ZENROWS_API_KEY": "YOUR_ZENROWS_API_KEY"
      }
    }
  }
}

Per-client setup guides

For step-by-step instructions including the exact config file path and restart steps for each client:
ClientType
Claude DesktopAI assistant
Claude CodeAI coding assistant
CursorAI code editor
WindsurfAI code editor
VS CodeAI code editor
ZedAI code editor
JetBrains IDEsAI code editor

Authentication

The ZenRows MCP server uses OAuth-based Bearer token authentication. Your ZenRows API key acts as the access token.
Send the key in the HTTP Authorization header on every request:
Authorization: Bearer YOUR_ZENROWS_API_KEY
OpenAI’s MCP tool, Anthropic’s MCP tool, and most other MCP clients expose this through a single authorization field on the tool config and forward it as the Bearer token automatically. Some clients use a free-form headers field instead. Both approaches are valid.
You can find or rotate your API key in your ZenRows dashboard.
Treat your API key like a password. Do not commit it to source control or share it in client-side code.

Tools

A tool in MCP terms is a named capability the server exposes. For example, scrape or browser_navigate. When you ask your AI to fetch a webpage or fill a form, the AI sees the available tools, picks the one that fits the task, and invokes it. You don’t call tools yourself in code. You set up the MCP connection once, and the AI handles tool selection and invocation from there. The ZenRows MCP exposes two families of tools.

The scrape tool

The scrape tool fetches a webpage in a single request and returns its content in the format you specify: clean Markdown (default), plain text, raw HTML, a screenshot, a PDF, or structured JSON. It uses the Universal Scraper API under the hood. Best for quick data extraction where the AI doesn’t need to interact with the page.

Browser tools

The browser_* tools give your AI assistant control of a cloud-hosted browser session powered by the ZenRows Scraping Browser. The browser comes with built-in residential proxies and anti-bot bypass. Browser tools cover tasks that involve:
  • Navigation across multiple pages in a single session
  • Form fills, button clicks, and other element interactions
  • Waiting for dynamically loaded content
  • JavaScript execution in the browser context
  • Cookies, local storage, and multi-tab management
Every browser workflow starts with browser_navigate, which opens a session and returns a session_id. All subsequent browser calls use this session_id. Call browser_close when done.

Available browser tools

ToolDescription
browser_navigateOpen a browser session and navigate to a URL. Returns a session_id for subsequent calls.
browser_closeClose a browser session and free all associated resources.
ToolDescription
browser_clickClick an element using a CSS selector.
browser_hoverHover over an element to trigger hover effects.
browser_typeType text into an input field. Appends to existing content unless clear_first is set.
browser_fillClear an input field and set its value.
browser_select_optionSelect an option from a <select> dropdown.
browser_checkCheck a checkbox or radio button.
browser_uncheckUncheck a checkbox.
browser_focusMove focus to an element.
browser_press_keyPress a keyboard key (e.g. Enter, Tab, Escape, Control+a).
browser_scrollScroll the page in a given direction.
browser_dragDrag an element to a target element.
ToolDescription
browser_get_accessibility_treeGet the page’s accessibility tree as readable text. Call this after browser_navigate to understand page structure.
browser_get_urlGet the current URL.
browser_get_titleGet the page title.
browser_get_textGet the visible text of an element or the entire page.
browser_get_attributeGet the value of a specific attribute on an element.
browser_get_htmlGet the HTML source of an element or the full page.
browser_query_selector_allFind all elements matching a CSS selector. Returns text, HTML, and attributes.
ToolDescription
browser_screenshotTake a screenshot of the page or a specific element.
browser_generate_pdfRender the current page as a PDF.
ToolDescription
browser_wait_for_selectorWait until an element is stable in the DOM. Set visible=true to require visibility.
browser_wait_for_navigationWait for a page navigation. Call this before the action that triggers navigation.
browser_waitWait for a fixed duration in milliseconds.
ToolDescription
browser_evaluateExecute JavaScript in the browser context and return the result.
ToolDescription
browser_get_cookiesGet all cookies for the current page.
browser_set_cookiesSet one or more cookies.
browser_clear_cookiesClear all cookies for the session.
ToolDescription
browser_local_storageRead, write, or clear localStorage.
ToolDescription
browser_new_tabOpen a new tab. Returns a tab_id.
browser_switch_tabSwitch focus to a different tab.
ToolDescription
browser_batchExecute a sequence of browser actions in a single call for better performance.

Pricing

The ZenRows MCP server itself is free. There is no separate fee for connecting, listing tools, or using the integration. Each tool call is billed against your ZenRows subscription using the standard pricing of the underlying product: You can monitor real-time usage and remaining quota on your Analytics page.

Troubleshooting

Connection issues

IssueCauseSolution
424 Failed Dependency or 401 UnauthorizedMissing or invalid Bearer tokenConfirm Authorization: Bearer YOUR_ZENROWS_API_KEY is set on every request. For OpenAI/Anthropic SDKs, use the authorization field on the MCP tool config. Verify your key is active in your dashboard
Tool list is empty when connecting to the remote URLAuthentication failed silently or wrong endpointConfirm the URL is exactly https://mcp.zenrows.com/mcp and the Bearer token is present and valid
The scrape tool is unavailable in your AI assistant (local STDIO)Configuration not loaded yetRestart your AI tool after saving the configuration file. For Claude Desktop, fully quit and reopen the application
API key is not recognized (local STDIO)Key not replaced in configurationConfirm YOUR_ZENROWS_API_KEY has been replaced with your actual key from the ZenRows dashboard. The value must have no extra spaces or surrounding quotation marks

Scraped content issues

If your AI is connecting and invoking tools correctly but the scraped content comes back missing, blocked, or incomplete, the issue is with the target page rather than the MCP connection. Common causes include JavaScript-loaded content, anti-bot protection, geo-restrictions, and dynamic loading. See the Universal Scraper API troubleshooting guide for fixes you can ask your AI to apply. For example, “scrape with JavaScript rendering enabled” or “use Premium Proxies.”

Example prompts

Once ZenRows MCP is connected, describe the task to your AI assistant in plain English and it handles the scraping automatically.
Fetch https://www.scrapingcourse.com/javascript-rendering/. It uses React, so enable JavaScript rendering.
Get the top 5 products from https://www.scrapingcourse.com/ecommerce/ and extract just the names and prices.
Take a full-page screenshot of https://news.ycombinator.com.
Scrape https://www.scrapingcourse.com/antibot-challenge. It's blocking requests. Use Adaptive Stealth Mode.

Universal Scraper API Reference

Full parameter reference for the scrape tool’s underlying API.

Scraping Browser Introduction

Learn more about the browser powering the browser_* tools.

ZenRows Dashboard

Monitor usage, manage your API key, and track quota.

NPM Package

@zenrows/mcp on npm for local STDIO deployments.

Contributing

The ZenRows MCP server is open source. If you want to modify the server, fix a bug, or suggest an improvement, clone the GitHub repository and run it locally:
Bash
git clone https://github.com/ZenRows/zenrows-mcp
cd zenrows-mcp
npm install
cp .env.example .env   # Add your API key
npm run dev            # Run with .env loaded (requires Node.js 20.6+)
npm run build          # Compile to dist/
npm run inspect        # Open the MCP inspector UI
Pull requests and issues are welcome on the GitHub repository.