Appearance
Firecrawl + Google Agent Development Kit (ADK)
Updated Feb 2026Integrate Firecrawl with Google's Agent Development Kit (ADK) to build AI agents with web scraping capabilities through the Model Context Protocol (MCP).
Source: docs.firecrawl.dev/developer-guides/llm-sdks-and-frameworks/google-adk
Overview
Firecrawl provides an MCP server that integrates with Google's ADK, enabling agents to scrape, crawl, and extract structured data from any website. The integration supports both cloud-based and self-hosted Firecrawl instances with streamable HTTP.
Features
- Web scraping, crawling, and content discovery from any website
- Advanced search capabilities and intelligent content extraction
- Deep research and high-volume batch scraping
- Flexible deployment (cloud or self-hosted)
- Streamable HTTP support for optimal performance
Prerequisites
- Firecrawl API key from firecrawl.dev
- Google ADK installed
Setup
Remote MCP Server (Recommended)
python
from google.adk.agents.llm_agent import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
FIRECRAWL_API_KEY = "YOUR-API-KEY"
root_agent = Agent(
model="gemini-2.5-pro",
name="firecrawl_agent",
description='A helpful assistant for scraping websites with Firecrawl',
instruction='Help the user search for website content',
tools=[
MCPToolset(
connection_params=StreamableHTTPServerParams(
url=f"https://mcp.firecrawl.dev/{FIRECRAWL_API_KEY}/v2/mcp",
),
)
],
)Local MCP Server
If self-hosting, replace the URL with your local Firecrawl MCP server endpoint.
Available Tools
| Tool | Name | Description |
|---|---|---|
| Scrape | firecrawl_scrape | Scrape content from a single URL |
| Batch Scrape | firecrawl_batch_scrape | Scrape multiple URLs with rate limiting and parallel processing |
| Check Batch | firecrawl_check_batch_status | Check the status of a batch operation |
| Map | firecrawl_map | Discover all indexed URLs on a site |
| Search | firecrawl_search | Search the web and optionally extract content |
| Crawl | firecrawl_crawl | Start an async crawl with advanced options |
| Check Crawl | firecrawl_check_crawl_status | Check the status of a crawl job |
| Extract | firecrawl_extract | Extract structured data from web pages using LLM |
Configuration
Required
| Variable | Description |
|---|---|
FIRECRAWL_API_KEY | Your Firecrawl API key (required for cloud, optional for self-hosted) |
Optional
| Variable | Default | Description |
|---|---|---|
FIRECRAWL_API_URL | Cloud API | Custom API endpoint for self-hosted instances |
FIRECRAWL_RETRY_MAX_ATTEMPTS | 3 | Maximum retry attempts |
FIRECRAWL_RETRY_INITIAL_DELAY | 1000 | Initial delay in ms |
FIRECRAWL_RETRY_MAX_DELAY | 10000 | Maximum delay in ms |
FIRECRAWL_RETRY_BACKOFF_FACTOR | 2 | Exponential backoff multiplier |
FIRECRAWL_CREDIT_WARNING_THRESHOLD | 1000 | Credit warning threshold |
FIRECRAWL_CREDIT_CRITICAL_THRESHOLD | 100 | Credit critical threshold |
Example: Web Research Agent
python
from google.adk.agents.llm_agent import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
FIRECRAWL_API_KEY = "YOUR-API-KEY"
research_agent = Agent(
model="gemini-2.5-pro",
name="research_agent",
description='An AI agent that researches topics by scraping and analyzing web content',
instruction='''You are a research assistant. When given a topic or question:
1. Use the search tool to find relevant websites
2. Scrape the most relevant pages for detailed information
3. Extract structured data when needed
4. Provide comprehensive, well-sourced answers''',
tools=[
MCPToolset(
connection_params=StreamableHTTPServerParams(
url=f"https://mcp.firecrawl.dev/{FIRECRAWL_API_KEY}/v2/mcp",
),
)
],
)
response = research_agent.run("What are the latest features in Python 3.13?")
print(response)Best Practices
- Use the right tool for the job:
firecrawl_search-- find relevant pages firstfirecrawl_scrape-- single pagesfirecrawl_batch_scrape-- multiple known URLsfirecrawl_crawl-- discover and scrape entire sites
- Monitor your usage: Configure credit thresholds to avoid unexpected costs
- Handle errors gracefully: Configure retry settings based on your use case
- Optimize performance: Use batch operations for multiple URLs