Firecrawl MCP — Web Scraping Server for AI Agents
Official Firecrawl MCP server for AI agents to scrape, crawl, and extract structured data from any website. Supports batch scraping, search, and markdown extraction. 15,000+ stars.
What it is
Firecrawl MCP is the official Model Context Protocol server for Firecrawl, a web scraping and crawling platform. It exposes Firecrawl capabilities as MCP tools that AI agents can call directly. Agents can scrape single pages, crawl entire sites, extract structured data, and search the web without custom scraping code.
This server targets developers building AI agents that need real-time web data. Whether your agent researches competitors, monitors prices, or gathers training data, Firecrawl MCP handles the scraping layer.
How it saves time or tokens
Without Firecrawl MCP, an agent must parse raw HTML, handle JavaScript rendering, manage rate limits, and deal with anti-bot measures. Firecrawl abstracts all of that into clean markdown or structured JSON output. The estimated token cost is around 2,500 tokens per session, but the time saved on manual scraping setup is significant. Batch scraping handles multiple URLs in one call.
How to use
- Get a Firecrawl API key from firecrawl.dev.
- Configure the MCP server in your Claude Desktop or agent config.
- The agent can now call scraping tools like
scrape_url,crawl_url,search, andextract.
{
"mcpServers": {
"firecrawl": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": {
"FIRECRAWL_API_KEY": "your-api-key"
}
}
}
}
Example
Once configured, an agent can scrape a page:
# Agent calls the scrape_url tool
result = await mcp.call('firecrawl', 'scrape_url', {
'url': 'https://example.com/pricing',
'formats': ['markdown', 'structured_data']
})
# Result contains clean markdown and extracted data
print(result['markdown']) # Clean text without HTML noise
print(result['structured_data']) # Extracted pricing tables
Batch scraping multiple URLs:
result = await mcp.call('firecrawl', 'batch_scrape', {
'urls': [
'https://example.com/page1',
'https://example.com/page2',
'https://example.com/page3'
],
'formats': ['markdown']
})
Related on TokRepo
- Web scraping tools — More scraping and data extraction tools
- MCP integrations — Agent tool integrations
Common pitfalls
- A Firecrawl API key is required. The free tier has rate limits that may not suit high-volume crawling.
- JavaScript-heavy single-page applications may require the
wait_forparameter to ensure content loads before extraction. - Batch scraping is asynchronous. For large batches, you need to poll for completion rather than expecting immediate results.
- Structured data extraction works best when you provide a schema describing what fields to extract.
- Some websites block automated access. Firecrawl handles many anti-bot measures, but heavily protected sites may still return incomplete data.
- Review the official documentation before deploying to production to ensure compatibility with your specific environment and requirements.
Frequently Asked Questions
Firecrawl MCP can return content as clean markdown, raw HTML, structured data (JSON), or screenshots. Markdown is the most token-efficient format for feeding content to LLMs. Structured data extraction lets you define a schema for specific fields.
Firecrawl offers a free tier with limited credits. For production use or high-volume scraping, a paid plan removes rate limits and adds features like priority processing and higher concurrency.
Yes. The crawl_url tool follows links from a starting URL and scrapes multiple pages. You can set depth limits, URL filters, and maximum page counts to control the crawl scope.
Firecrawl uses headless browsers to render JavaScript before extracting content. This means single-page applications and dynamically loaded content are captured correctly, unlike simple HTTP scrapers.
Yes. Add the MCP server configuration to your Claude Desktop settings file. Once configured, Claude can call Firecrawl tools directly during conversations to fetch and analyze web content.
Citations (3)
- Firecrawl MCP GitHub— Firecrawl MCP server for AI agent web scraping
- Firecrawl Documentation— Firecrawl web scraping and crawling platform
- Anthropic MCP Docs— Model Context Protocol server specification