Firecrawl Agent MCP Server
Enables AI-powered web data extraction and research through Firecrawl's Agent API. Autonomously searches, navigates, and scrapes websites to gather structured data without requiring specific URLs.
README
Firecrawl Agent MCP Server
A Model Context Protocol (MCP) server that provides AI-powered web data extraction and research capabilities through Firecrawl's Agent API.
Features
🤖 AI Agent Mode: Let the agent autonomously search, navigate, and gather data from complex websites 🔍 Web Search: Search and scrape multiple results at once 📄 Single Page Scraping: Extract content from specific URLs 📊 Structured Data: Define JSON schemas for type-safe data extraction 💰 Cost Control: Set maximum credit limits per request ⚡ Async Jobs: Start long-running tasks and poll for results
What is Firecrawl Agent?
Firecrawl Agent is a magic API that:
- No URLs Required: Just describe what you need via prompt
- Autonomous Navigation: Searches and navigates deep into sites to find your data
- Parallel Processing: Processes multiple sources simultaneously for faster results
- Structured Output: Returns data in your specified JSON schema format
Perfect for:
- Research tasks across multiple websites
- Extracting structured data (company info, pricing, contacts)
- Finding hard-to-reach information
- Competitive analysis and market research
Installation
1. Clone or Copy Files
cd firecrawl-agent-mcp
2. Install Dependencies
npm install
3. Configure API Key
Copy the example environment file and add your Firecrawl API key:
cp .env.example .env
Edit .env and add your API key:
FIRECRAWL_API_KEY=fc-YOUR_API_KEY_HERE
Get your API key from: https://www.firecrawl.dev/
4. Build the Server
npm run build
Configuration in Claude Code
Add the Firecrawl Agent MCP server to your Claude Code configuration:
Option 1: Edit .claude/settings.json
{
"mcpServers": {
"firecrawl-agent": {
"command": "node",
"args": ["/absolute/path/to/firecrawl-agent-mcp/dist/server.js"],
"env": {
"FIRECRAWL_API_KEY": "fc-YOUR_API_KEY_HERE"
}
}
}
}
Option 2: Use .mcp.json in Project Root
{
"mcpServers": {
"firecrawl-agent": {
"command": "node",
"args": ["./firecrawl-agent-mcp/dist/server.js"],
"env": {
"FIRECRAWL_API_KEY": "fc-YOUR_API_KEY_HERE"
}
}
}
}
Available Tools
agent_execute
Execute the AI agent synchronously (waits for completion).
Use when: You need immediate results for research tasks.
Parameters:
prompt(required): Describe what data you want to extracturls(optional): Specific URLs to search (otherwise searches web)schema(optional): JSON schema for structured outputmaxCredits(optional): Maximum credits to spend
Example:
{
"prompt": "Find the founders and founding year of Anthropic",
"schema": {
"type": "object",
"properties": {
"founders": { "type": "array", "items": { "type": "string" } },
"founded": { "type": "number" }
}
}
}
agent_start
Start an agent job asynchronously (returns job ID immediately).
Use when: You have long-running research tasks and want to poll for results.
Parameters: Same as agent_execute
Returns: Job ID to use with agent_status
agent_status
Check the status of an asynchronous agent job.
Parameters:
jobId(required): Job ID fromagent_start
Returns: Current status, progress, and results if completed
scrape
Scrape a single URL without AI agent capabilities.
Use when: You just need to extract content from one specific page.
Parameters:
url(required): URL to scrapeformats(optional): Output formats (markdown,html,rawHtml,links,screenshot)onlyMainContent(optional): Extract only main content (default: true)includeTags(optional): HTML tags to includeexcludeTags(optional): HTML tags to excludewaitFor(optional): Wait time for JS rendering (ms)timeout(optional): Request timeout (ms)
search
Search the web and scrape multiple results.
Use when: You want to find and extract data from multiple sources at once.
Parameters:
query(required): Search querylimit(optional): Maximum number of results (default: 5)formats(optional): Output formats for each result
Usage Examples
Example 1: Research Company Information
// Ask Claude Code:
"Use Firecrawl Agent to find information about Anthropic's founding team"
// Claude will call:
agent_execute({
prompt: "Find the founders of Anthropic and when the company was founded",
schema: {
type: "object",
properties: {
founders: {
type: "array",
items: { type: "string" }
},
founded: { type: "number" },
description: { type: "string" }
}
}
})
Example 2: Extract Pricing Information
// Ask Claude Code:
"Get pricing information for Claude API"
// Claude will call:
agent_execute({
prompt: "Extract all pricing tiers and costs for Claude API",
urls: ["https://www.anthropic.com/pricing"]
})
Example 3: Competitive Analysis
// Ask Claude Code:
"Compare the features of the top 5 AI coding assistants"
// Claude will call:
agent_execute({
prompt: "Find and compare features of top AI coding assistants: GitHub Copilot, Cursor, Claude Code, Tabnine, and Codeium",
schema: {
type: "object",
properties: {
tools: {
type: "array",
items: {
type: "object",
properties: {
name: { type: "string" },
features: { type: "array", items: { type: "string" } },
pricing: { type: "string" }
}
}
}
}
}
})
Example 4: Long-Running Research
// Ask Claude Code:
"Start a deep research job on quantum computing breakthroughs in 2024"
// Claude will call:
const job = await agent_start({
prompt: "Research all major quantum computing breakthroughs and papers published in 2024"
})
// Then poll for status:
const status = await agent_status({ jobId: job.jobId })
Cost Management
Firecrawl Agent uses dynamic billing based on task complexity:
- Simple extractions: Fewer credits
- Complex research: More credits
Control costs using:
{
prompt: "Your task",
maxCredits: 100 // Limit spending to 100 credits
}
Development
Watch Mode
npm run dev
Run Directly
npm start
SSE Transport Mode
For HTTP-based communication:
npm run start:sse
Troubleshooting
"FIRECRAWL_API_KEY environment variable is required"
Make sure you've:
- Created a
.envfile with your API key - Or configured the env variable in your Claude Code settings
"HTTP 401: Unauthorized"
Your API key is invalid. Get a new one from https://www.firecrawl.dev/
"HTTP 429: Too Many Requests"
You've hit rate limits. Wait a moment and try again, or upgrade your Firecrawl plan.
Tools not showing up in Claude Code
- Make sure you've built the server:
npm run build - Check that the path in your MCP configuration is correct
- Restart Claude Code after configuration changes
Learn More
- Firecrawl Agent Documentation
- Firecrawl API Reference
- MCP Protocol Specification
- Introducing Firecrawl Agent Blog Post
License
MIT
Support
For issues with:
- This MCP server: Open an issue in this repository
- Firecrawl API: Contact Firecrawl support
- Claude Code: Visit https://github.com/anthropics/claude-code
Built with ❤️ using the Model Context Protocol
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。