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.
Overview
Combine Google’s Agent Development Kit (ADK) with the ZenRows MCP server to build autonomous, multi-agent workflows that can read any website in real time. ADK has native MCP support via theMcpToolset class, so connecting ZenRows takes a single block of code. No function-calling boilerplate, no scraping infrastructure, and no anti-bot tuning required.
What is Google ADK?
Google’s Agent Development Kit (ADK) is an open-source, code-first framework for building, evaluating, and deploying AI agents. It is model-agnostic and deployment-agnostic, and it is optimized for Google’s Gemini models while supporting Claude, GPT, and 100+ other LLMs via LiteLLM. ADK provides primitives for agent orchestration (LlmAgent, workflow agents, multi-agent collaboration), tools (function tools, MCP tools, OpenAPI tools), sessions, memory, and deployment to Vertex AI Agent Engine, Cloud Run, and GKE.
Adding ZenRows MCP gives every ADK agent real-time access to any website, including JavaScript-heavy and bot-protected ones.
Key benefits
Native MCP support
McpToolset wrapper takes the ZenRows server URL and your API key. The agent discovers ZenRows’ tools (scrape and 30+ browser automation tools) automatically, with no schema mapping to maintain.Autonomous multi-step tasks
Anti-bot bypass on every tool call
Composes with ADK's full primitive set
Deploys cleanly to Google Cloud
Use cases
The Google ADK and ZenRows combination unlocks a wide range of agent workflows:Autonomous research agents
Autonomous research agents
Lead enrichment pipelines on Vertex AI
Lead enrichment pipelines on Vertex AI
Multi-agent web automation
Multi-agent web automation
Competitive monitoring on Cloud Run
Competitive monitoring on Cloud Run
Form-filling and extraction agents
Form-filling and extraction agents
Getting started
Build a single ADK agent equipped with ZenRows MCP that can answer questions by reading any website in real time.Prerequisites
- Python 3.10 or higher
- A ZenRows API key (Find it in your ZenRows dashboard)
- A Google API key
Setup
Create your environment file
.env file in the parent folder of your agent directory with your API keys.Set up the directory structure
Create the agent
__init__.py, then create the agent in agent.py.How it works
MCPToolsetregisters the ZenRows hosted MCP server as a tool source.StreamableHTTPConnectionParamspoints at the ZenRows MCP endpoint and carries your API key as an OAuth Bearer token in theAuthorizationheader.- On startup,
MCPToolsetqueries the ZenRows server for its available tools and adapts each one to ADK’s tool schema. The agent gets access toscrape,browser_navigate,browser_click, and 30+ other ZenRows tools with no extra configuration. LlmAgentequips the Gemini model with the toolset. The agent reads the prompt, picks the right tool, calls it throughMCPToolset, gets the content back, and writes the answer.
Advanced usage
Autonomous research agent
The real power of ADK is letting an agent decide for itself which tools to call across multiple steps. With ZenRows MCP, that means the agent can autonomously read several pages, follow links it finds interesting, and synthesize findings, all from a single prompt. The example below builds a research agent that visits a topic landing page, identifies the most relevant linked articles, scrapes each one, and produces a synthesized report. This version uses ADK’s programmaticRunner instead of adk web, which is the pattern to use in production code or when embedding ADK into your own application.
Multi-agent workflows
Because ZenRows MCP is a standard ADK tool, you can share it across multiple agents and combine it with ADK’s multi-agent patterns. A common setup is one agent for research (with ZenRows access) and another for writing (without web tools).Troubleshooting
-
424 Failed Dependencyor401 Unauthorizedfrom the MCP server- Confirm the
Authorization: Bearer YOUR_ZENROWS_API_KEYheader is present in theheadersdict onStreamableHTTPConnectionParams. - Verify your key in the ZenRows dashboard and confirm your subscription has remaining quota.
- Confirm the URL is exactly
https://mcp.zenrows.com/mcp.
- Confirm the
-
Empty tool list when starting the agent
If
adk webshows the agent but no ZenRows tools appear in tool calls, the connection to the MCP server failed silently.- Check your API key, the URL, and your network connectivity.
- Look at the
adk webconsole output.MCPToolsetlogslist_toolserrors there.
-
Agent repeatedly scrapes the same page
Add explicit guidance in the agent’s
instructionabout what to do once it has the data. For example,"After scraping each URL once, summarize and stop." -
Deployment fails with Agent Definition Must Be Synchronous
ADK requires agents that use MCP tools to be defined at module load time. If you have an
async def get_agent()factory, refactor soroot_agentis a module-level variable instantiated synchronously. -
Page blocked or data missing in scraped content
If the agent connects and invokes tools correctly but the scraped content comes back blocked or incomplete, the issue is on the target page rather than the MCP connection.
Add explicit guidance to your agent’s instruction. For example,
"When scraping, ask ZenRows to use JavaScript rendering and Premium Proxies for protected sites."
FAQ (Frequently Asked Questions)
What's the difference between using ADK with ZenRows MCP versus calling the Universal Scraper API directly?
What's the difference between using ADK with ZenRows MCP versus calling the Universal Scraper API directly?
Which Gemini model should I use?
Which Gemini model should I use?
gemini-2.5-flash is fast and cost-effective. For autonomous multi-step research and complex reasoning, gemini-2.5-pro is a better fit. You can also use Claude, GPT, or any LiteLLM-supported model through ADK’s model routing if you want to mix providers within the same workflow.Can I use ADK's TypeScript, Java, Go, or Kotlin SDKs with ZenRows MCP?
Can I use ADK's TypeScript, Java, Go, or Kotlin SDKs with ZenRows MCP?
MCPToolset class exists across all ADK language bindings, and the underlying transport (Streamable HTTP) is language-agnostic. Provide the URL https://mcp.zenrows.com/mcp, set the Authorization: Bearer YOUR_ZENROWS_API_KEY header, and the toolset discovers ZenRows’ tools automatically. See the ADK MCP tools guide for language-specific syntax.Can I use the local stdio version of ZenRows MCP with ADK?
Can I use the local stdio version of ZenRows MCP with ADK?
StdioConnectionParams with the @zenrows/mcp npm package instead of StreamableHTTPConnectionParams. The remote URL is recommended because it requires no local install, no Node.js dependency, and runs the same way in development and production. See the ZenRows MCP overview for the local stdio configuration.Can multiple agents share the same ZenRows MCP toolset?
Can multiple agents share the same ZenRows MCP toolset?
Are MCP tool calls captured in ADK's tracing?
Are MCP tool calls captured in ADK's tracing?
list_tools and call_tool invocation alongside the rest of the agent’s events. You can view them in OpenTelemetry-compatible backends or in Vertex AI Agent Engine’s built-in observability when deployed there.