Notebooks
G
Groq
Mcp Firecrawl

Mcp Firecrawl

managed-by-terraformtutorials03-mcpmcp-firecrawlgroq-api-cookbook

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:

  1. Set up Groq MCP client for fast inference.
  2. Set up Firecrawl MCP server for enterprise web scraping.
  3. Seamlessly connect the client to the server through the Responses API.

[ ]

Getting Started

Follow these steps to set up:

  1. Sign up for Groq at console.groq.com to get your free API key.
  2. Sign up for Firecrawl at firecrawl.dev/app/api-keys to get your API key.
  3. Copy your API keys from your Groq and Firecrawl account dashboards.
  4. 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:

ToolDescription
firecrawl_scrapeScrape content from a single URL with advanced options and formatting
firecrawl_batch_scrapeScrape multiple URLs efficiently with built-in rate limiting and parallel processing
firecrawl_check_batch_statusCheck the status of a batch operation and retrieve results
firecrawl_searchSearch the web and optionally extract content from search results
firecrawl_crawlStart an asynchronous crawl with advanced options for depth and link following
firecrawl_extractExtract structured information from web pages using LLM capabilities and JSON schemas
firecrawl_deep_researchConduct comprehensive deep web research with intelligent crawling and LLM analysis
firecrawl_generate_llmstxtGenerate standardized llms.txt files that define how LLMs should interact with a site

Key Benefits

  1. Enterprise-Grade Reliability: Handles JavaScript, authentication, and dynamic content
  2. AI-Powered Intelligence: Understands content semantically, not just structurally
  3. Batch Processing: Efficient parallel operations for production workloads
  4. Speed: Sub-10 second responses when combined with Groq's fast inference
  5. 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.