Cover image
Try Now
2025-02-13

镜像://github.com/msparihar/mcp-server-firecrawl

3 years

Works with Finder

0

Github Watches

1

Github Forks

0

Github Stars

Firecrawl MCP Server

A Model Context Protocol (MCP) server for web scraping, content searching, site crawling, and data extraction using the Firecrawl API.

Features

  • Web Scraping: Extract content from any webpage with customizable options

    • Mobile device emulation
    • Ad and popup blocking
    • Content filtering
    • Structured data extraction
    • Multiple output formats
  • Content Search: Intelligent search capabilities

    • Multi-language support
    • Location-based results
    • Customizable result limits
    • Structured output formats
  • Site Crawling: Advanced web crawling functionality

    • Depth control
    • Path filtering
    • Rate limiting
    • Progress tracking
    • Sitemap integration
  • Site Mapping: Generate site structure maps

    • Subdomain support
    • Search filtering
    • Link analysis
    • Visual hierarchy
  • Data Extraction: Extract structured data from multiple URLs

    • Schema validation
    • Batch processing
    • Web search enrichment
    • Custom extraction prompts

Installation

# Global installation
npm install -g @modelcontextprotocol/mcp-server-firecrawl

# Local project installation
npm install @modelcontextprotocol/mcp-server-firecrawl

Quick Start

  1. Get your Firecrawl API key from the developer portal

  2. Set your API key:

    Unix/Linux/macOS (bash/zsh):

    export FIRECRAWL_API_KEY=your-api-key
    

    Windows (Command Prompt):

    set FIRECRAWL_API_KEY=your-api-key
    

    Windows (PowerShell):

    $env:FIRECRAWL_API_KEY = "your-api-key"
    

    Alternative: Using .env file (recommended for development):

    # Install dotenv
    npm install dotenv
    
    # Create .env file
    echo "FIRECRAWL_API_KEY=your-api-key" > .env
    

    Then in your code:

    import dotenv from 'dotenv';
    dotenv.config();
    
  3. Run the server:

    mcp-server-firecrawl
    

Integration

Claude Desktop App

Add to your MCP settings:

{
  "firecrawl": {
    "command": "mcp-server-firecrawl",
    "env": {
      "FIRECRAWL_API_KEY": "your-api-key"
    }
  }
}

Claude VSCode Extension

Add to your MCP configuration:

{
  "mcpServers": {
    "firecrawl": {
      "command": "mcp-server-firecrawl",
      "env": {
        "FIRECRAWL_API_KEY": "your-api-key"
      }
    }
  }
}

Usage Examples

Web Scraping

// Basic scraping
{
  name: "scrape_url",
  arguments: {
    url: "https://example.com",
    formats: ["markdown"],
    onlyMainContent: true
  }
}

// Advanced extraction
{
  name: "scrape_url",
  arguments: {
    url: "https://example.com/blog",
    jsonOptions: {
      prompt: "Extract article content",
      schema: {
        title: "string",
        content: "string"
      }
    },
    mobile: true,
    blockAds: true
  }
}

Site Crawling

// Basic crawling
{
  name: "crawl",
  arguments: {
    url: "https://example.com",
    maxDepth: 2,
    limit: 100
  }
}

// Advanced crawling
{
  name: "crawl",
  arguments: {
    url: "https://example.com",
    maxDepth: 3,
    includePaths: ["/blog", "/products"],
    excludePaths: ["/admin"],
    ignoreQueryParameters: true
  }
}

Site Mapping

// Generate site map
{
  name: "map",
  arguments: {
    url: "https://example.com",
    includeSubdomains: true,
    limit: 1000
  }
}

Data Extraction

// Extract structured data
{
  name: "extract",
  arguments: {
    urls: ["https://example.com/product1", "https://example.com/product2"],
    prompt: "Extract product details",
    schema: {
      name: "string",
      price: "number",
      description: "string"
    }
  }
}

Configuration

See configuration guide for detailed setup options.

API Documentation

See API documentation for detailed endpoint specifications.

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Start in development mode
npm run dev

Examples

Check the examples directory for more usage examples:

Error Handling

The server implements robust error handling:

  • Rate limiting with exponential backoff
  • Automatic retries
  • Detailed error messages
  • Debug logging

Security

  • API key protection
  • Request validation
  • Domain allowlisting
  • Rate limiting
  • Safe error messages

Contributing

See CONTRIBUTING.md for contribution guidelines.

License

MIT License - see LICENSE for details.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    4 (1)
    Avatar
    user_SGrexNMh
    2025-04-16

    I've been using the Msparihar_mcp-server-firecrawl extensively, and I must say it has exceeded my expectations. The seamless integration with various services and the efficient performance make it an indispensable part of my workflow. Kudos to MCP-Mirror for developing such a robust and reliable server tool. Highly recommend it to anyone looking for a dependable solution!