Firecrawl MCP Multiple Keys
A Firecrawl MCP server with built-in support for multiple API key rotation, enabling web search, scraping, crawling, extraction, and more via MCP clients.
README
Firecrawl MCP Multiple Keys
A Firecrawl MCP server with built-in support for multiple API keys. It exposes Firecrawl's web search, scraping, crawling, extraction, browser interaction, monitoring, and research tools to OpenCode and other MCP clients.
This fork is useful when you want one local Firecrawl MCP server that rotates across a pool of API keys instead of configuring several separate MCP server entries.
Highlights
- Local
stdioMCP server by default - Optional Streamable HTTP transport for hosted or local HTTP usage
- Multi-key rotation with
FIRECRAWL_API_KEYS - Single-key fallback with
FIRECRAWL_API_KEY - Process-local round-robin key selection
- Retry/failover across pooled keys for retryable Firecrawl errors where safe
- Firecrawl cloud and self-hosted API support
- TypeScript source bundled with
tsup
Requirements
- Node.js 22 or newer
- pnpm
- One or more Firecrawl API keys
- OpenCode or another MCP-compatible client
Install
git clone https://github.com/AdvaitR7/firecrawl-mcp-multiple-keys.git
cd firecrawl-mcp-multiple-keys
pnpm install
pnpm run build
The build creates dist/index.js. MCP clients should run that file with Node.
Configure API Keys
For multiple keys, set FIRECRAWL_API_KEYS as a comma-separated or whitespace-separated list:
FIRECRAWL_API_KEYS=firecrawl_key_1,firecrawl_key_2
For a single key, set FIRECRAWL_API_KEY:
FIRECRAWL_API_KEY=firecrawl_key_1
FIRECRAWL_API_KEYS takes precedence over FIRECRAWL_API_KEY unless FIRECRAWL_OAUTH_TOKEN is set.
Key Rotation Behavior
At startup, the server loads FIRECRAWL_API_KEYS into a process-local key pool. Each request that uses the pool starts with the next key in sequence.
request 1 -> key 1
request 2 -> key 2
request 3 -> key 1
request 4 -> key 2
For retryable failures such as 429, 5xx, timeout, or network errors, supported read-style operations can try remaining keys in the current cycle. Mutating operations are more conservative to avoid duplicate jobs.
Header credentials and FIRECRAWL_OAUTH_TOKEN bypass the environment key pool.
OpenCode Setup
Build the project first:
pnpm install
pnpm run build
Add a local MCP entry to your OpenCode config. Use an absolute path to dist/index.js.
Multi-key configuration:
{
"mcp": {
"firecrawl": {
"type": "local",
"command": ["node", "/absolute/path/to/firecrawl-mcp-multiple-keys/dist/index.js"],
"enabled": true,
"timeout": 30000,
"environment": {
"FIRECRAWL_API_KEYS": "firecrawl_key_1,firecrawl_key_2"
}
}
}
}
Single-key configuration:
{
"mcp": {
"firecrawl": {
"type": "local",
"command": ["node", "/absolute/path/to/firecrawl-mcp-multiple-keys/dist/index.js"],
"enabled": true,
"timeout": 30000,
"environment": {
"FIRECRAWL_API_KEY": "firecrawl_key_1"
}
}
}
}
Restart OpenCode after changing MCP configuration.
Environment Variables
| Variable | Required | Description |
|---|---|---|
FIRECRAWL_API_KEYS |
No | Comma- or whitespace-separated API keys for round-robin rotation |
FIRECRAWL_API_KEY |
No | Single Firecrawl API key fallback |
FIRECRAWL_OAUTH_TOKEN |
No | Static Firecrawl OAuth access token for stdio usage |
FIRECRAWL_API_URL |
No | Custom Firecrawl API URL for self-hosted instances |
HTTP_STREAMABLE_SERVER |
No | Set to true to use Streamable HTTP transport |
SSE_LOCAL |
No | Set to true to use local HTTP stream behavior |
CLOUD_SERVICE |
No | Set to true for hosted cloud-service behavior |
PORT |
No | HTTP transport port, default 3000 |
HOST |
No | HTTP transport host, default localhost outside cloud mode |
Transport Modes
By default, the server starts on stdio:
FIRECRAWL_API_KEYS=firecrawl_key_1,firecrawl_key_2 node dist/index.js
For local Streamable HTTP transport:
HTTP_STREAMABLE_SERVER=true FIRECRAWL_API_KEY=firecrawl_key_1 node dist/index.js
Direct terminal execution of the stdio server will wait for MCP protocol input. For normal usage, run it through OpenCode or another MCP client.
Tools
Core Firecrawl Tools
| Tool | Description |
|---|---|
firecrawl_scrape |
Scrape a single URL with markdown, JSON, HTML, screenshots, or other formats |
firecrawl_map |
Discover URLs on a website |
firecrawl_search |
Search the web, news, images, GitHub, research, or PDFs |
firecrawl_search_feedback |
Send feedback for a previous Firecrawl search result |
firecrawl_feedback |
Send generic endpoint feedback for scrape, parse, map, or search jobs |
firecrawl_crawl |
Crawl multiple pages from a site or section |
firecrawl_check_crawl_status |
Check an existing crawl job status |
firecrawl_extract |
Extract structured data from one or more URLs |
firecrawl_agent |
Start an autonomous web research agent job |
firecrawl_agent_status |
Poll an agent job until completion |
firecrawl_interact |
Interact with a web page in a browser session |
firecrawl_interact_stop |
Stop an interaction session |
firecrawl_parse |
Parse uploaded or local documents, including PDFs |
Monitor Tools
| Tool | Description |
|---|---|
firecrawl_monitor_create |
Create a recurring monitor for pages or searches |
firecrawl_monitor_list |
List monitors |
firecrawl_monitor_get |
Get one monitor by ID |
firecrawl_monitor_update |
Update monitor settings |
firecrawl_monitor_delete |
Delete a monitor |
firecrawl_monitor_run |
Trigger a monitor check immediately |
firecrawl_monitor_checks |
List historical monitor checks |
firecrawl_monitor_check |
Inspect one monitor check and its page diffs |
Research Tools
| Tool | Description |
|---|---|
firecrawl_research_search_papers |
Search research papers by topic |
firecrawl_research_inspect_paper |
Fetch metadata for one paper |
firecrawl_research_related_papers |
Expand from seed papers through citation graph similarity |
firecrawl_research_read_paper |
Read relevant full-text passages for one paper |
firecrawl_research_search_github |
Search GitHub issues, pull requests, and readmes |
Development
Install dependencies:
pnpm install
Build:
pnpm run build
Test:
pnpm test
Lint:
pnpm run lint
Format:
pnpm run format
Run the compiled stdio server:
FIRECRAWL_API_KEYS=firecrawl_key_1,firecrawl_key_2 pnpm start
Security
Never put real Firecrawl API keys in source files, README examples, screenshots, issues, or commits. Keep keys in your MCP client environment config, shell environment, or a local .env file that is not committed.
If a key is exposed, revoke it in Firecrawl and create a replacement key.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。