Mcp Firecrawl
Groq + Firecrawl MCP: AI-Powered Web Scraping & Data Extraction
This notebook demonstrates how to empower Groq inference with enterprise-grade web scraping capabilities using Firecrawl's Model Context Protocol (MCP) server for intelligent data extraction, structured parsing, and deep web research.
We will achieve this through three simple steps:
- Set up Groq MCP client for fast inference.
- Set up Firecrawl MCP server for enterprise web scraping.
- Seamlessly connect the client to the server through the Responses API.
Getting Started
Follow these steps to set up:
- Sign up for Groq at console.groq.com to get your free API key.
- Sign up for Firecrawl at firecrawl.dev/app/api-keys to get your API key.
- Copy your API keys from your Groq and Firecrawl account dashboards.
- Paste your API keys into the cell below and run the cell.
Note: do not run the cell below if your keys are already configured in an .env file in this directory
Step 1: Set up the Groq client
Step 2: Set up Firecrawl's remote MCP server
Step 3: Connect Groq to the Firecrawl MCP through Groq's Responses API
This will be our main function we use to call the Groq API.
Let's implement a helper function to display MCP tool calls and their results. This will provide transparency into which tools were called, their arguments, and outputs.
(This is generally useful when debugging if you need to view raw MCP outputs, it's not vital for functionality)
Examples
Note: Some queries may consume more tokens than others depending on the amount of tool calls the model makes. Please be aware of various rate limits that are tied to your API keys if you happen to run into any rate limit errors.
Demo 1: Website Analysis & Content Scraping
Let's build a web scraper that analyzes Anthropic's website to extract comprehensive company information, products, and recent announcements using Firecrawl's intelligent scraping capabilities.
Let's display the agent's response in markdown format.
Let's examine the agent's intermediate steps, including how it calls different Firecrawl tools and configures tool arguments.
Demo 2: Structured Data Extraction
Now we'll create a competitive analysis tool that extracts structured pricing data from multiple AI companies (OpenAI, Anthropic, Groq) and formats it into consistent JSON schemas for easy comparison.
Let's display the structured extraction results.
Let's examine the agent's intermediate steps.
Demo 3: Deep Research & Multi-hop Analysis
Here we'll build an AI research agent that conducts comprehensive multi-hop research on AI inference trends, automatically discovering and analyzing multiple sources to create a detailed research report with proper citations.
Let's display the deep research report.
Let's examine the deep research process.
Demo 4: Try it Yourself
Now it's your turn! Create your own custom web intelligence agent by replacing the query below with your specific web scraping, data extraction, or research task.
Available Firecrawl MCP Tools
Firecrawl MCP provides several powerful tools for web scraping, data extraction, and research:
| Tool | Description |
|---|---|
firecrawl_scrape | Scrape content from a single URL with advanced options and formatting |
firecrawl_batch_scrape | Scrape multiple URLs efficiently with built-in rate limiting and parallel processing |
firecrawl_check_batch_status | Check the status of a batch operation and retrieve results |
firecrawl_search | Search the web and optionally extract content from search results |
firecrawl_crawl | Start an asynchronous crawl with advanced options for depth and link following |
firecrawl_extract | Extract structured information from web pages using LLM capabilities and JSON schemas |
firecrawl_deep_research | Conduct comprehensive deep web research with intelligent crawling and LLM analysis |
firecrawl_generate_llmstxt | Generate standardized llms.txt files that define how LLMs should interact with a site |
Key Benefits
- Enterprise-Grade Reliability: Handles JavaScript, authentication, and dynamic content
- AI-Powered Intelligence: Understands content semantically, not just structurally
- Batch Processing: Efficient parallel operations for production workloads
- Speed: Sub-10 second responses when combined with Groq's fast inference
- Transparency: Full visibility into tool calls and data sources
Summary
You've just experienced fast AI-powered web intelligence that combines:
- Fast responses (3-10 seconds) via Groq inference
- Enterprise web scraping with Firecrawl's advanced capabilities
- Structured data extraction using AI-powered parsing
- Deep research with multi-hop reasoning and source transparency
This approach enables you to build applications that need both speed and reliability for web data collection and analysis tasks.