Firecrawl MCP
Firecrawl MCP Server is a web scraping MCP server enabling discovery, extraction, and batch scraping with automatic retries and rate limiting. It integrates with Firecrawl for efficient multi-page research, search, and content extraction.
How to Install and Use Firecrawl MCP
Firecrawl MCP is a powerful Model Context Protocol server that helps you scrape and crawl websites easily. Below, you will learn step-by-step how to install it and set it up with clear examples. Let's get started.
Running with npx
One of the easiest ways to use Firecrawl MCP is by running it with npx, a tool that comes with Node.js. First, you need your Firecrawl API key. You can get this by creating an account at firecrawl.dev.
Once you have your API key, open your terminal and run this command, replacing fc-YOUR_API_KEY with your actual key:
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp
This will start the Firecrawl MCP server immediately without installing anything globally.
Manual Installation
If you want to install Firecrawl MCP globally on your computer, use npm, the Node package manager. This lets you run the server anytime without typing the full command:
npm install -g firecrawl-mcp
After that, you can start the server by typing:
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY firecrawl-mcp
Again, replace fc-YOUR_API_KEY with your personal Firecrawl API key.
Running Firecrawl MCP on Cursor
Cursor is a tool that supports using Firecrawl MCP directly. To add Firecrawl MCP to Cursor version 0.48.6 or later:
- Open Cursor Settings.
- Click on Features > MCP Servers.
- Choose "+ Add new global MCP server".
- Paste this code, making sure to insert your Firecrawl API key where it says
YOUR-API-KEY:
{
"mcpServers": {
"firecrawl-mcp": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": {
"FIRECRAWL_API_KEY": "YOUR-API-KEY"
}
}
}
}
This connects Firecrawl MCP with Cursor so you can use its web scraping features easily.
Important Environment Variables to Set
To make Firecrawl MCP work, you need to provide the API key. Here’s the main environment variable you need:
FIRECRAWL_API_KEY: Your Firecrawl API key. This is required for using the cloud API (default usage).
Optionally, if you have a self-hosted Firecrawl server, set:
FIRECRAWL_API_URL: The URL of your self-hosted Firecrawl API.
Optional Settings for Better Control
Firecrawl MCP supports retry and credit monitoring settings. You can customize them by setting these environment variables:
export FIRECRAWL_RETRY_MAX_ATTEMPTS=5 # Number of retries (default is 3)
export FIRECRAWL_RETRY_INITIAL_DELAY=2000 # Delay before retry in ms (default 1000)
export FIRECRAWL_RETRY_MAX_DELAY=30000 # Max delay between retries in ms (default 10000)
export FIRECRAWL_RETRY_BACKOFF_FACTOR=3 # Backoff multiplier (default 2)
export FIRECRAWL_CREDIT_WARNING_THRESHOLD=2000 # Warning credit level (default 1000)
export FIRECRAWL_CREDIT_CRITICAL_THRESHOLD=500 # Critical credit level (default 100)
These settings help avoid rate limits and monitor your API credit use.
Example: Running Firecrawl MCP Locally Using Streamable HTTP
If you want to run Firecrawl MCP as a local HTTP server, use this command instead of the default:
env HTTP_STREAMABLE_SERVER=true FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp
The server will be available at:
http://localhost:3000/mcp
Summary
To start using Firecrawl MCP quickly:
- Get your Firecrawl API key from firecrawl.dev.
- Run with npx:
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY npx -y firecrawl-mcp
- Or install globally:
npm install -g firecrawl-mcp
env FIRECRAWL_API_KEY=fc-YOUR_API_KEY firecrawl-mcp
Optionally, configure retry and credit settings to control performance and monitor usage. For more advanced setups, integrate with tools like Cursor or run a local HTTP server.
This simple guide should get you up and running with Firecrawl MCP so you can start scraping and crawling websites with ease.