Skip to main content
Add Firecrawl’s search, scrape, crawl, and browser tools to OpenAI Codex CLI via MCP.

Quick Setup

1. Get Your API Key

Sign up at firecrawl.dev/app and copy your API key.

2. Add Firecrawl to Codex

Codex reads MCP server config from ~/.codex/config.toml. Add the Firecrawl server:
[mcp_servers.firecrawl]
command = "npx"
args = ["-y", "firecrawl-mcp"]

[mcp_servers.firecrawl.env]
FIRECRAWL_API_KEY = "fc-YOUR-API-KEY"
Replace fc-YOUR-API-KEY with your Firecrawl API key.

3. Start Codex

codex
Codex discovers the Firecrawl tools on launch. Confirm they are loaded:
/mcp
You should see firecrawl listed with tools like firecrawl_search, firecrawl_scrape, firecrawl_crawl, and firecrawl_extract.

Quick Demo

Try these prompts:
Search the web for the latest Next.js App Router release notes and summarize.
Scrape https://docs.firecrawl.dev and list the top-level sections.
Crawl https://example.com and save the markdown for every page under /blog.

Remote Hosted URL (no Node.js required)

If you prefer not to run npx locally:
[mcp_servers.firecrawl]
url = "https://mcp.firecrawl.dev/fc-YOUR-API-KEY/v2/mcp"

Troubleshooting

  • Codex doesn’t see the tools — run codex --version to confirm you’re on a version with MCP support, then restart the CLI after editing config.toml.
  • spawn npx ENOENT — install Node.js 18+ and ensure npx is on your PATH, or switch to the remote hosted URL above.
  • 401 / invalid key — regenerate an API key at firecrawl.dev/app/api-keys.