Prerequisites
- Python 3.10+
ANTHROPIC_API_KEYFIRECRAWL_API_KEY— free tier at firecrawl.dev
Build it
1
Install and set both keys
2
Fail loudly when the key is missing
Because the key is part of the URL, a missing environment variable produces the URL
https://mcp.firecrawl.dev/None/v2/mcp and a confusing connection error. Check for it up front:3
Write a prompt that prefers scraping over crawling
Left alone, a model asked about a site will reach for the broadest tool available. This prompt pushes it toward the cheap one and forbids answering from memory:
4
Build the agent
5
Scrape one page and ask for quotes
The complete script
Which Firecrawl tool for which job
The order matters when you write the task:
map then scrape is usually both cheaper and more accurate than crawl, because you choose which pages get read.
Pairing it with search
Firecrawl reads pages well but finding the right page is a different job. A common two-stage setup gives the finder and the reader their own servers:Next
- Firecrawl via swarms-tools — the crawl-a-site tool without MCP.
- Authentication patterns — all five ways a server can take a credential.