Drwuu/firecrawl-mcp-server
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.
Firecrawl MCP Server
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
- Node.js 18.0.0 or higher
- A running Firecrawl instance (local or remote)
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:
| Variable | Description | Default |
|---|---|---|
FIRECRAWL_URL | URL of your Firecrawl instance | http://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 scrapeformats(optional): Array of output formats:["markdown", "html", "rawHtml", "links", "screenshot"]includeTags(optional): HTML tags to includeexcludeTags(optional): HTML tags to excludewaitFor(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 crawlincludePaths(optional): URL patterns to includeexcludePaths(optional): URL patterns to excludemaxDepth(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:
- Verify Firecrawl is running:
curl http://localhost:3002/health - Check the
FIRECRAWL_URLenvironment variable - Ensure there are no firewall rules blocking the connection
Claude Desktop Not Detecting Tools
- Restart Claude Desktop after modifying the configuration
- Check the MCP logs in Claude Desktop (Help > View Logs)
- Verify the
commandpath is correct
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
This project is licensed under the MIT License - see the file for details.
Related Projects
- Firecrawl - The web scraping engine
- Model Context Protocol - The MCP specification
- Claude Desktop - Anthropic's desktop application
Support
Acknowledgments
Built with ❤️ by Drwuu
Special thanks to:
- The Firecrawl team for the excellent scraping engine
- Anthropic for the Model Context Protocol specification