FireCrawl MCP server

Integration with FireCrawl to provide advanced web scraping capabilities for extracting structured data from complex websites.
Back to servers
Setup instructions
Provider
Mendable
Release date
Dec 06, 2024
Language
TypeScript
Package
Stats
187.8K downloads
3.6K stars

Firecrawl MCP Server is a web scraping tool that integrates with Model Context Protocol (MCP), allowing AI assistants to search, crawl, and extract information from websites. It supports both cloud-based and self-hosted deployments with features like rate limiting, batch processing, and structured data extraction.

Installation Options

Quick Start with NPX

The simplest way to run Firecrawl MCP is using npx:

env FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp

Global Installation

To install the package globally:

npm install -g firecrawl-mcp

Running with Server-Sent Events (SSE)

For local SSE mode instead of stdio transport:

env SSE_LOCAL=true FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp

Access it at: http://localhost:3000/sse

Editor Integration

Cursor Integration

For Cursor version 0.48.6 and later:

  1. Open Cursor Settings
  2. Go to Features > MCP Servers
  3. Click "+ Add new global MCP server"
  4. Enter the following configuration:
{
  "mcpServers": {
    "firecrawl-mcp": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "YOUR-API-KEY"
      }
    }
  }
}

For Cursor version 0.45.6:

  1. Open Cursor Settings
  2. Go to Features > MCP Servers
  3. Click "+ Add New MCP Server"
  4. Enter:
    • Name: "firecrawl-mcp"
    • Type: "command"
    • Command: env FIRECRAWL_API_KEY=your-api-key npx -y firecrawl-mcp

VS Code Integration

For manual installation in VS Code, add this to your User Settings (JSON):

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "apiKey",
        "description": "Firecrawl API Key",
        "password": true
      }
    ],
    "servers": {
      "firecrawl": {
        "command": "npx",
        "args": ["-y", "firecrawl-mcp"],
        "env": {
          "FIRECRAWL_API_KEY": "${input:apiKey}"
        }
      }
    }
  }
}

Windsurf Integration

Add this to your ./codeium/windsurf/model_config.json:

{
  "mcpServers": {
    "mcp-server-firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Claude Desktop Integration

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-server-firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Configuration

Environment Variables

Required for Cloud API

Optional Configuration

  • Retry Configuration:

    • FIRECRAWL_RETRY_MAX_ATTEMPTS: Maximum retry attempts (default: 3)
    • FIRECRAWL_RETRY_INITIAL_DELAY: Initial delay in ms (default: 1000)
    • FIRECRAWL_RETRY_MAX_DELAY: Maximum delay in ms (default: 10000)
    • FIRECRAWL_RETRY_BACKOFF_FACTOR: Backoff multiplier (default: 2)
  • Credit Usage Monitoring:

    • FIRECRAWL_CREDIT_WARNING_THRESHOLD: Warning threshold (default: 1000)
    • FIRECRAWL_CREDIT_CRITICAL_THRESHOLD: Critical threshold (default: 100)

Configuration Example

# Required for cloud API
export FIRECRAWL_API_KEY=your-api-key

# Optional retry configuration
export FIRECRAWL_RETRY_MAX_ATTEMPTS=5
export FIRECRAWL_RETRY_INITIAL_DELAY=2000
export FIRECRAWL_RETRY_MAX_DELAY=30000
export FIRECRAWL_RETRY_BACKOFF_FACTOR=3

# Optional credit monitoring
export FIRECRAWL_CREDIT_WARNING_THRESHOLD=2000
export FIRECRAWL_CREDIT_CRITICAL_THRESHOLD=500

Tool Selection Guide

Use this guide to choose the right tool for your task:

Tool Best for Returns
scrape Single page content markdown/html
batch_scrape Multiple known URLs markdown/html[]
map Discovering URLs on a site URL[]
crawl Multi-page extraction (with limits) markdown/html[]
search Web search for info results[]
extract Structured data from pages JSON
deep_research In-depth, multi-source research summary, sources
generate_llmstxt LLMs.txt for a domain text

Available Tools

1. Scrape Tool (firecrawl_scrape)

For extracting content from a single URL:

{
  "name": "firecrawl_scrape",
  "arguments": {
    "url": "https://example.com",
    "formats": ["markdown"],
    "onlyMainContent": true,
    "waitFor": 1000,
    "timeout": 30000,
    "mobile": false,
    "includeTags": ["article", "main"],
    "excludeTags": ["nav", "footer"],
    "skipTlsVerification": false
  }
}

2. Batch Scrape Tool (firecrawl_batch_scrape)

For scraping multiple URLs efficiently:

{
  "name": "firecrawl_batch_scrape",
  "arguments": {
    "urls": ["https://example1.com", "https://example2.com"],
    "options": {
      "formats": ["markdown"],
      "onlyMainContent": true
    }
  }
}

3. Map Tool (firecrawl_map)

For discovering URLs on a website:

{
  "name": "firecrawl_map",
  "arguments": {
    "url": "https://example.com"
  }
}

4. Search Tool (firecrawl_search)

For web searching and optional content extraction:

{
  "name": "firecrawl_search",
  "arguments": {
    "query": "latest AI research papers 2023",
    "limit": 5,
    "lang": "en",
    "country": "us",
    "scrapeOptions": {
      "formats": ["markdown"],
      "onlyMainContent": true
    }
  }
}

5. Crawl Tool (firecrawl_crawl)

For crawling and extracting content from multiple pages:

{
  "name": "firecrawl_crawl",
  "arguments": {
    "url": "https://example.com/blog/*",
    "maxDepth": 2,
    "limit": 100,
    "allowExternalLinks": false,
    "deduplicateSimilarURLs": true
  }
}

6. Extract Tool (firecrawl_extract)

For extracting structured data from web pages:

{
  "name": "firecrawl_extract",
  "arguments": {
    "urls": ["https://example.com/page1", "https://example.com/page2"],
    "prompt": "Extract product information including name, price, and description",
    "systemPrompt": "You are a helpful assistant that extracts product information",
    "schema": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "price": { "type": "number" },
        "description": { "type": "string" }
      },
      "required": ["name", "price"]
    }
  }
}

7. Deep Research Tool (firecrawl_deep_research)

For in-depth research on complex topics:

{
  "name": "firecrawl_deep_research",
  "arguments": {
    "query": "What are the environmental impacts of electric vehicles compared to gasoline vehicles?",
    "maxDepth": 3,
    "timeLimit": 120,
    "maxUrls": 50
  }
}

8. Generate LLMs.txt Tool (firecrawl_generate_llmstxt)

For creating standardized AI permission guidelines:

{
  "name": "firecrawl_generate_llmstxt",
  "arguments": {
    "url": "https://example.com",
    "maxUrls": 20,
    "showFullText": true
  }
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "firecrawl-mcp" '{"command":"npx","args":["-y","firecrawl-mcp"],"env":{"FIRECRAWL_API_KEY":"YOUR-API-KEY"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "firecrawl-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "firecrawl-mcp"
            ],
            "env": {
                "FIRECRAWL_API_KEY": "YOUR-API-KEY"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "firecrawl-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "firecrawl-mcp"
            ],
            "env": {
                "FIRECRAWL_API_KEY": "YOUR-API-KEY"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later