# Firecrawl MCP Server (`agentify/firecrawl-mcp-server`) Actor

A Model Context Protocol (MCP) server implementation that integrates with Firecrawl MCP for web scraping capabilities

- **URL**: https://apify.com/agentify/firecrawl-mcp-server.md
- **Developed by:** [agentify](https://apify.com/agentify) (community)
- **Categories:** AI, MCP servers, Open source
- **Stats:** 316 total users, 0 monthly users, 100.0% runs succeeded, 7 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Firecrawl MCP Server

A Model Context Protocol (MCP) server implementation that integrates with Firecrawl for web scraping capabilities.

**Big thanks to @vrknetha, @knacklabs for the initial implementation!**

**About this MCP Server:** To understand how to connect to and utilize this MCP server, please refer to the official Model Context Protocol documentation at [mcp.apify.com](https://mcp.apify.com).

***

### ✨ Features

- Web scraping, crawling, and discovery
- Search and content extraction
- Deep research and batch scraping
- Automatic retries and rate limiting
- Cloud and self-hosted support
- SSE support

Play around with our MCP Server on [MCP.so's playground](https://mcp.so) or on [Klavis AI](https://klavis.ai).

***

### 🚀 Installation

#### Running with `npx`

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

#### Manual Installation

```bash
npm install -g firecrawl-mcp
```

***

### 🖥️ Running on Cursor

> Requires Cursor version 0.45.6+

For the most up-to-date configuration instructions, see [Cursor MCP Server Configuration Guide](https://docs.cursor.so/agents/mcp-servers).

#### Cursor v0.48.6+

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

#### Cursor v0.45.6

- Go to `Settings > Features > MCP Servers`
- Click **Add New MCP Server**

```bash
Name: firecrawl-mcp
Type: command
Command: env FIRECRAWL_API_KEY=your-api-key npx -y firecrawl-mcp
```

> **Note for Windows:** Use `cmd /c "set FIRECRAWL_API_KEY=your-api-key && npx -y firecrawl-mcp"`

***

### 🌊 Running on Windsurf

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

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

***

### 🔁 Running with SSE (Local Mode)

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

> Access at: <http://localhost:3000/sse>

***

### 🛠️ Installing via Smithery (Legacy)

```bash
npx -y @smithery/cli install @mendableai/mcp-server-firecrawl --client claude
```

***

### 💻 Running on VS Code

**One-click install:**

- [Install with NPX in VS Code](#)
- [Install with NPX in VS Code Insiders](#)

#### Manual Setup

User Settings (JSON):

```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}"
        }
      }
    }
  }
}
```

#### Workspace File: `.vscode/mcp.json`

```json
{
  "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}"
      }
    }
  }
}
```

***

### ⚙️ Configuration

#### Required

| Name               | Description                         |
|--------------------|-------------------------------------|
| `FIRECRAWL_API_KEY` | Your Firecrawl API key              |

#### Optional (Self-hosted)

| Name               | Description                                      |
|--------------------|--------------------------------------------------|
| `FIRECRAWL_API_URL` | Custom Firecrawl API endpoint                   |

#### Retry Configuration

| Variable                        | Default | Description                         |
|----------------------------------|---------|-------------------------------------|
| `FIRECRAWL_RETRY_MAX_ATTEMPTS`   | 3       | Number of retry attempts            |
| `FIRECRAWL_RETRY_INITIAL_DELAY`  | 1000    | Initial delay (ms)                  |
| `FIRECRAWL_RETRY_MAX_DELAY`      | 10000   | Maximum delay (ms)                  |
| `FIRECRAWL_RETRY_BACKOFF_FACTOR` | 2       | Exponential backoff factor          |

#### Credit Monitoring

| Variable                             | Default |
|--------------------------------------|---------|
| `FIRECRAWL_CREDIT_WARNING_THRESHOLD` | 1000    |
| `FIRECRAWL_CREDIT_CRITICAL_THRESHOLD`| 100     |

#### Example:

```bash
export FIRECRAWL_API_KEY=your-api-key

## Retry config
export FIRECRAWL_RETRY_MAX_ATTEMPTS=5
export FIRECRAWL_RETRY_INITIAL_DELAY=2000
export FIRECRAWL_RETRY_MAX_DELAY=30000
export FIRECRAWL_RETRY_BACKOFF_FACTOR=3

## Credit thresholds
export FIRECRAWL_CREDIT_WARNING_THRESHOLD=2000
export FIRECRAWL_CREDIT_CRITICAL_THRESHOLD=500
```

***

### 🧠 System Defaults

```js
const CONFIG = {
  retry: {
    maxAttempts: 3,
    initialDelay: 1000,
    maxDelay: 10000,
    backoffFactor: 2,
  },
  credit: {
    warningThreshold: 1000,
    criticalThreshold: 100,
  },
};
```

***

### 📦 Available Tools Overview

- **firecrawl\_scrape** — Single page content extraction
- **firecrawl\_map** — URL discovery on websites
- **firecrawl\_crawl** — Multi-page extraction *(returns job ID)*
- **firecrawl\_check\_crawl\_status** — Monitor crawl progress
- **firecrawl\_search** — Web search with optional content scraping
- **firecrawl\_extract** — Structured data extraction to JSON

***

### 🔧 Key Usage Examples

The examples show proper parameter usage for common scenarios like:

- Basic page scraping with content filtering
- Web search with scraped results
- Structured data extraction with custom schemas

***

### 🔎 Decision Tree

Great guidance on tool selection based on needs:

- **Known URL** → `scrape`
- **Find URLs** → `map`
- **Search web** → `search`
- **Extract structured data** → `extract`
- **Full site coverage** → `crawl` + `status check`

***

## ⚡ Performance Optimization

Valuable tips:

- Use `maxAge` for caching
- Use `onlyMainContent` for efficiency

***

### 🧪 Prompt Examples

- Scrape:\
  *“Get the content of https://example.com.”*

- Search:\
  *“Find 2023 papers on AI.”*

- Extract:\
  *“Extract product name, price, description from \[urls].”*

- Deep research:\
  *“Research environmental impact of EVs vs gas cars.”*

***

### 📄 License

MIT © Firecrawl Team

***

### 🚩 Claim this MCP server. Contact info.

**All credits to the original authors of:** <https://github.com/mendableai/firecrawl-mcp-server>\
**Contact contact:** <ai@apify.com>

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("agentify/firecrawl-mcp-server").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("agentify/firecrawl-mcp-server").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call agentify/firecrawl-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agentify/firecrawl-mcp-server"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QTVPJYVboPp2815aT/builds/9aCK9ymjOEmjHETSk/openapi.json
