Firecrawl MCP server

Integrates with the Firecrawl API to enable website crawling, content translation, and structured data extraction for enhanced web data processing workflows.
Back to servers
Provider
Cody De Arkland
Release date
Feb 26, 2025
Language
TypeScript

This MCP Firecrawl Server provides tools for scraping websites and extracting structured data using Firecrawl's APIs. It supports both basic content scraping and advanced data extraction based on custom schemas.

Installation

To set up the MCP Firecrawl Server on your system:

  1. Install dependencies:

    npm install
    
  2. Create a .env file in the root directory with the following variables:

    FIRECRAWL_API_TOKEN=your_token_here
    SENTRY_DSN=your_sentry_dsn_here
    
    • FIRECRAWL_API_TOKEN (required): Your Firecrawl API token
    • SENTRY_DSN (optional): Sentry DSN for error tracking and performance monitoring
  3. Start the server:

    npm start
    

    Alternatively, you can set environment variables directly when running the server:

    FIRECRAWL_API_TOKEN=your_token_here npm start
    

Available Tools

The server provides two main tools:

Tool: scrape-website

This tool scrapes a website and returns its content in the requested formats.

Parameters:

  • url (string, required): The URL of the website to scrape
  • formats (array of strings, optional): Array of desired output formats. Supported formats are:
    • "markdown" (default)
    • "html"
    • "text"

Example usage with MCP Inspector:

# Basic usage (defaults to markdown)
mcp-inspector --tool scrape-website --args '{
  "url": "https://example.com"
}'

# Multiple formats
mcp-inspector --tool scrape-website --args '{
  "url": "https://example.com",
  "formats": ["markdown", "html", "text"]
}'

Tool: extract-data

This tool extracts structured data from websites based on a provided prompt and schema.

Parameters:

  • urls (array of strings, required): Array of URLs to extract data from
  • prompt (string, required): The prompt describing what data to extract
  • schema (object, required): Schema definition for the data to extract

The schema definition should be an object where keys are field names and values are types. Supported types are:

  • "string": For text fields
  • "boolean": For true/false fields
  • "number": For numeric fields
  • Arrays: Specified as ["type"] where type is one of the above
  • Objects: Nested objects with their own type definitions

Example usage with MCP Inspector:

# Basic example extracting company information
mcp-inspector --tool extract-data --args '{
  "urls": ["https://example.com"],
  "prompt": "Extract the company mission, whether it supports SSO, and whether it is open source.",
  "schema": {
    "company_mission": "string",
    "supports_sso": "boolean",
    "is_open_source": "boolean"
  }
}'

# Complex example with nested data
mcp-inspector --tool extract-data --args '{
  "urls": ["https://example.com/products", "https://example.com/pricing"],
  "prompt": "Extract product information including name, price, and features.",
  "schema": {
    "products": [{
      "name": "string",
      "price": "number",
      "features": ["string"]
    }]
  }
}'

Troubleshooting

If you encounter issues:

  • Verify your Firecrawl API token is valid
  • Check that the URLs you're trying to scrape are accessible
  • For complex schemas, ensure they follow the supported format
  • Review Sentry logs for detailed error information (if configured)

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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