An ADK agent that uses MCP (Model Context Protocol) tools to interact with Firecrawl for web scraping and crawling capabilities.
This agent demonstrates how to use MCP toolsets to connect to Firecrawl, enabling web scraping, content extraction, and website crawling functionality.
adk_mcp_firecrawl_agent/
├── agent.py # Main agent code with MCPToolset
├── __init__.py # Package initialization
└── .env.example # Example environment variables template
- Python 3.11 or later
- Google ADK installed (see parent directory README for installation instructions)
- Google API key from Google AI Studio
- Firecrawl API key from Firecrawl
- Node.js and npx (for Firecrawl MCP, automatically installed when agent runs)
To create a Firecrawl API key:
- Go to Firecrawl and sign up for an account
- Navigate to your Firecrawl Dashboard
- Go to API Keys section
- Click Create API Key or copy your existing API key
- Copy the API key - you'll need it for the
.envfile
Note: Firecrawl offers a free tier with limited requests. Check their pricing page for details.
Copy the example environment file and update it with your API keys:
cp .env.example .envThen edit .env and replace the placeholder values:
GOOGLE_GENAI_USE_VERTEXAI=False
GOOGLE_API_KEY="your-google-api-key"
FIRECRAWL_API_KEY="your-firecrawl-api-key"Environment Variables:
GOOGLE_GENAI_USE_VERTEXAI=False: Use AI Studio (Gemini API) instead of Vertex AIGOOGLE_API_KEY: Your Google API key from Google AI StudioFIRECRAWL_API_KEY: Your Firecrawl API key (created in step 1 above)
Note: The agent uses npx firecrawl-mcp which will be automatically installed when the agent runs.
From the 2_adk_mcp directory:
adk run adk_mcp_firecrawl_agentFrom the 2_adk_mcp directory:
adk webThen open the URL shown in the terminal (typically http://localhost:8000) in your browser and select the agent.
- Google ADK Version:
1.18.0 - Model:
gemini-2.5-pro - Tool:
MCPToolsetconnected to Firecrawl MCP - Capabilities:
- Web scraping
- Content extraction
- Website crawling
- URL content retrieval
The agent connects to Firecrawl via:
- Connection Type: Stdio (standard input/output)
- Command:
npx -y firecrawl-mcp - Authentication: API key from
FIRECRAWL_API_KEYenvironment variable - Timeout: 30 seconds
