firecrawl-mcp-server

Drwuu/firecrawl-mcp-server

3.2

If you are the rightful owner of firecrawl-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Firecrawl MCP Server is a self-hosted Model Context Protocol server that enhances AI models with web scraping capabilities.

Tools
3
Resources
0
Prompts
0

Firecrawl MCP Server

NPM Version License: MIT

A Model Context Protocol (MCP) server for self-hosted Firecrawl instances. This server provides AI models like Claude with powerful web scraping capabilities through your local Firecrawl installation.

Features

  • 🕷️ scrape_url: Scrape single web pages and convert to markdown
  • 🌐 crawl_website: Crawl entire websites with customizable options
  • 🔗 extract_links: Extract all links from a webpage
  • 🏠 Self-hosted: Works with your local Firecrawl instance
  • 🔒 Privacy-focused: All data stays on your infrastructure
  • Fast & Lightweight: Built with TypeScript and minimal dependencies

Prerequisites

Quick Start

Installation via NPM

npm install -g firecrawl-mcp-server

Installation via NPX (no install needed)

npx firecrawl-mcp-server

Build from Source

git clone https://github.com/YourUsername/firecrawl-mcp-server.git
cd firecrawl-mcp-server
npm install
npm run build

Usage

With Claude Desktop

Add this to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp-server"],
      "env": {
        "FIRECRAWL_URL": "http://localhost:3002"
      }
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "firecrawl": {
      "command": "firecrawl-mcp-server",
      "env": {
        "FIRECRAWL_URL": "http://localhost:3002"
      }
    }
  }
}

Standalone Usage

# Start the MCP server via stdio
npm start

# Start the HTTP server (for debugging)
npm run start:http

# Development mode with auto-reload
npm run dev

Configuration

Configure the server using environment variables:

VariableDescriptionDefault
FIRECRAWL_URLURL of your Firecrawl instancehttp://localhost:3002

Environment File

Create a .env file in the project root:

FIRECRAWL_URL=http://localhost:3002

Available Tools

scrape_url

Scrape a single webpage and return content in various formats.

Parameters:

  • url (required): The URL to scrape
  • formats (optional): Array of output formats: ["markdown", "html", "rawHtml", "links", "screenshot"]
  • includeTags (optional): HTML tags to include
  • excludeTags (optional): HTML tags to exclude
  • waitFor (optional): Time to wait before scraping (ms)
  • timeout (optional): Request timeout (ms)

Example:

{
  "url": "https://example.com",
  "formats": ["markdown", "links"],
  "excludeTags": ["nav", "footer"]
}

crawl_website

Crawl an entire website starting from a given URL.

Parameters:

  • url (required): The starting URL to crawl
  • includePaths (optional): URL patterns to include
  • excludePaths (optional): URL patterns to exclude
  • maxDepth (optional): Maximum crawl depth (default: 2)
  • limit (optional): Maximum number of pages (default: 10)
  • scrapeOptions (optional): Options for individual page scraping

Example:

{
  "url": "https://docs.example.com",
  "includePaths": ["/docs/*"],
  "maxDepth": 3,
  "limit": 50
}

extract_links

Extract all links from a webpage for discovery purposes.

Parameters:

  • url (required): The URL to extract links from

Example:

{
  "url": "https://example.com"
}

Docker Support

Run the MCP server in a Docker container:

docker build -t firecrawl-mcp-server .
docker run -p 3001:3001 -e FIRECRAWL_URL=http://firecrawl:3002 firecrawl-mcp-server

Docker Compose

version: '3.8'

services:
  firecrawl-mcp:
    build: .
    ports:
      - "3001:3001"
    environment:
      - FIRECRAWL_URL=http://firecrawl:3002
    depends_on:
      - firecrawl

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

# Type checking
npx tsc --noEmit

Troubleshooting

Connection Issues

If you can't connect to Firecrawl:

  1. Verify Firecrawl is running: curl http://localhost:3002/health
  2. Check the FIRECRAWL_URL environment variable
  3. Ensure there are no firewall rules blocking the connection

Claude Desktop Not Detecting Tools

  1. Restart Claude Desktop after modifying the configuration
  2. Check the MCP logs in Claude Desktop (Help > View Logs)
  3. Verify the command path is correct

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This project is licensed under the MIT License - see the file for details.

Related Projects

Support

Acknowledgments

Built with ❤️ by Drwuu

Special thanks to:

  • The Firecrawl team for the excellent scraping engine
  • Anthropic for the Model Context Protocol specification