AI Personal Learning
and practical guidance
Ali-painted frog

Firecrawl MCP Server: Firecrawl-based Web Crawler MCP Service

General Introduction

Firecrawl MCP Server is an open source tool developed by MendableAI, based on the Model Context Protocol (MCP) protocol implementation, integrated with Firecrawl API, provides powerful web crawling and data extraction. It is designed for AI models (e.g. Cursor, Claude, and other LLM clients), and supports operations ranging from single-page crawling to batch crawling, searching, and structured data extraction. Whether it's JavaScript rendering of dynamic web pages, deep crawling and content filtering, Firecrawl MCP Server gets the job done efficiently. The tool supports cloud and self-hosted deployments with automatic retries, rate limiting, and logging systems for developers, researchers, and data engineers. As of March 2025, the project is continuously updated on GitHub and is widely recognized by the community.

Firecrawl MCP Server: Firecrawl-based Web Crawling MCP Protocol-1


 

Function List

  • Single Page Grab: Extracts Markdown or structured data from a specified URL.
  • bulk crawler: Efficient handling of multiple URLs with support for parallel operation and built-in rate limiting.
  • Web Search: Extracts content from search results based on a query.
  • deep crawling: Supports URL discovery and multi-layer web crawling.
  • data extraction: Extracting structured information from web pages using LLM.
  • JavaScript Rendering: Capture the full content of a dynamic web page.
  • Intelligent Filtration: Content filtering via tag inclusion/exclusion.
  • Condition Monitoring: Provides batch task progress and credit utilization queries.
  • log system: Records operational status, performance, and error messages.
  • Mobile/Desktop Support: Adaptation to different device viewports.

 

Using Help

Installation process

Firecrawl MCP Server provides multiple installation methods for different usage scenarios. The following are the detailed steps:

Way 1: Quick run with npx

  1. Get the Firecrawl API key (register on the Firecrawl website to get it).
  2. Open a terminal and set the environment variables:
    export FIRECRAWL_API_KEY="fc-YOUR_API_KEY"

interchangeability "fc-YOUR_API_KEY" for your actual key.
3. Run the command:

npx -y firecrawl-mcp
  1. After successful startup, the terminal displays [INFO] FireCrawl MCP Server initialized successfullyThe

Mode 2: Manual Installation

  1. Global Installation:
    npm install -g firecrawl-mcp
    
  2. Set the environment variables (as above).
  3. Running:
    firecrawl-mcp
    

Approach 3: Self-hosted deployment

  1. Clone a GitHub repository:
    git clone https://github.com/mendableai/firecrawl-mcp-server.git
    cd firecrawl-mcp-server
    
  2. Install the dependencies:
    npm install
    
  3. Build project:
    npm run build
    
  4. Set the environment variables and run it:
    node dist/src/index.js
    

Way 4: Run on Cursor

  1. assure Cursor Version 0.45.6 or higher.
  2. Open Cursor Settings > Features > MCP Servers.
  3. Click "+ Add New MCP Server" and enter:
    • Name. firecrawl-mcp
    • Type. command
    • Command. env FIRECRAWL_API_KEY=your-api-key npx -y firecrawl-mcp
    • Windows users who are experiencing problems can try:cmd /c "set FIRECRAWL_API_KEY=your-api-key && npx -y firecrawl-mcp"
  4. Save and refresh the list of MCP servers, which Composer Agent automatically invokes.

Way 5: Running on Windsurf

  1. compiler . /codeium/windsurf/model_config.json::
    {
    "mcpServers": {
    "mcp-server-firecrawl": {
    "command": "npx",
    "args": ["-y", "firecrawl-mcp" ], { "mcp-server-firecrawl".
    "env": {
    "FIRECRAWL_API_KEY": "YOUR_API_KEY_HERE"
    }
    }
    }
    }
    
  2. Save and run Windsurf.

Configuring Environment Variables

Required Configurations

  • FIRECRAWL_API_KEY: Cloud API key, which must be set when using cloud services.

Optional Configurations

  • FIRECRAWL_API_URL: API endpoints for self-hosted instances such as https://firecrawl.your-domain.comThe
  • Retry the configuration:
    • FIRECRAWL_RETRY_MAX_ATTEMPTS: Maximum number of retries, default 3.
    • FIRECRAWL_RETRY_INITIAL_DELAY: First retry delay (milliseconds), default 1000.
    • FIRECRAWL_RETRY_MAX_DELAY: Maximum delay in milliseconds, default 10000.
    • FIRECRAWL_RETRY_BACKOFF_FACTOR: The fallback factor, default 2.
  • Credit monitoring:
    • FIRECRAWL_CREDIT_WARNING_THRESHOLD: Warning threshold, default 1000.
    • FIRECRAWL_CREDIT_CRITICAL_THRESHOLD: Emergency Threshold, default 100.

Configuration example

Cloud Usage:

export FIRECRAWL_API_KEY="your-api-key"
export FIRECRAWL_RETRY_MAX_ATTEMPTS=5
export FIRECRAWL_RETRY_INITIAL_DELAY=2000
export FIRECRAWL_CREDIT_WARNING_THRESHOLD=2000

Main function operation flow

Function 1: Single page scrape (firecrawl_scrape)

  • procedure::
    1. After starting the server, send a POST request:
      curl -X POST http://localhost:端口/firecrawl_scrape \
      -H "Content-Type: application/json" \
      -d '{"url": "https://example.com", "formats": ["markdown"], "onlyMainContent": true, "timeout": 30000}'
      
    2. Returns the main content in Markdown format.
  • Parameter description::
    • onlyMainContent: Only the main elements are extracted.
    • includeTags/excludeTags: Specify HTML tags to include or exclude.
  • application scenario: Quickly extract the core information of an article or page.

Function 2: Batch Crawl (firecrawl_batch_scrape)

  • procedure::
    1. Sends a bulk request:
      curl -X POST http://localhost:端口/firecrawl_batch_scrape \
      -H "Content-Type: application/json" \
      -d '{"urls": ["https://example1.com", "https://example2.com"], "options": {"formats": ["markdown"]}}'
      
    2. Get the operation ID, for example batch_1The
    3. Check the status:
      curl -X POST http://localhost:端口/firecrawl_check_batch_status \
      -H "Content-Type: application/json" \
      -d '{"id": "batch_1"}'
      
  • distinctiveness: Built-in rate limiting and parallel processing for large-scale data collection.

Function 3: Web Search (firecrawl_search)

  • procedure::
    1. Send a search request:
      curl -X POST http://localhost:端口/firecrawl_search \
      -H "Content-Type: application/json" \
      -d '{"query": "AI tools", "limit": 5, "scrapeOptions": {"formats": ["markdown"]}}'
      
    2. Returns the Markdown content of the search results.
  • use: Real-time access to web page data relevant to the query.

Function 4: Deep Crawl (firecrawl_crawl)

  • procedure::
    1. Initiate a crawl request:
      curl -X POST http://localhost:端口/firecrawl_crawl \
      -H "Content-Type: application/json" \
      -d '{"url": "https://example.com", "maxDepth": 2, "limit": 100}'
      
    2. Returns the crawl results.
  • parameters::maxDepth controlling the depth of the crawl.limit Limit the number of pages.

Function 5: Data Extraction (firecrawl_extract)

  • procedure::
    1. Sends an extraction request:
      curl -X POST http://localhost:端口/firecrawl_extract \
      -H "Content-Type: application/json" \
      -d '{"urls": ["https://example.com"], "prompt": "Extract product name and price", "schema": {"type": "object", "properties": {"name": {"type": " string"}, "price": {"type": "number"}}}}'
      
    2. Returns structured data.
  • distinctiveness: Supports LLM extraction, customizing schema to ensure output format.

Tips for use

  • Log View: Keep an eye on the terminal logs at runtime (e.g. [INFO] Starting scrape) to debug.
  • error handlingIf you meet [ERROR] Rate limit exceeded, adjust the retry parameters or wait.
  • Integration with LLM: The following is an example of how to use the Cursor or the Claude The tool is automatically invoked by directly entering the crawling requirements in the

Through the above operations, users can easily deploy and use Firecrawl MCP Server to meet diversified web data needs.

CDN1
May not be reproduced without permission:Chief AI Sharing Circle " Firecrawl MCP Server: Firecrawl-based Web Crawler MCP Service

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish