PyreCrawl
๐ฅ PyreCrawl โ Web Browsing Superpowers for Your AI Agent
One command gives any AI agent the whole web. Scrape, extract, crawl, map, and search โ self-hosted, no API keys, no rate limits, no subscription.
PyreCrawl speaks MCP (Model Context Protocol), the standard tool interface for Claude, Cursor, VS Code, Codex, OpenCode, Hermes, and any MCP-compatible agent.
A smart auto-fallback ladder always picks the cheapest method that succeeds:
fast HTTP
โ (403/503/Cloudflare challenge or empty body)
โผ
stealth browser (real Chromium + Cloudflare solver)
โ (still blocked, or the page needs full JS rendering)
โผ
deep processing (LLM-ready markdown, citations, structured extraction)โก Tools exposed
Tool | What it does |
| Single URL โ LLM-ready markdown |
| Scrape + structured extraction (JsonCss schema) |
| Enumerate all internal URLs |
| Multi-page crawl with path filters + true BFS depth |
| PDF/DOCX/PPTX โ markdown (no browser, optional |
| Web search via DuckDuckGo HTML (no API key) |
| Academic search via arXiv + Crossref (no API key) โ feed |
| Many URLs in ONE call โ parallel, deduped, cache-aware |
| Search โ evidence pack with [n] citations (no LLM synthesis โ your agent does that) |
| Change detection with persisted snapshots + unified diff |
| Persistent browser session (cookies kept) โ login walls, multi-step flows, screenshots |
| Inspect/clear/enable/disable the HTTP response cache |
| Versions + import sanity check |
MCP Resources (read-only state without a tool call):
pyrecrawl://cache/stats ยท pyrecrawl://sessions ยท pyrecrawl://monitors
MCP Prompts (ready-made playbooks): research(topic) ยท rag_ingest(site) ยท watch_page(url)
Env flags
Variable | Default | Effect |
| off |
|
|
| Cache entry lifetime in seconds |
|
| Where monitor snapshots persist |
prefer options: "auto" (default ladder) ยท "fast" (HTTP only) ยท "stealth" (CF bypass) ยท "llm" (deep processing).
๐ Install & Use (one-liner)
1. Install
UV (recommended โ one command, zero Python setup)
UV is a fast Python package manager that handles Python itself โ no need to install Python separately. Get it once:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Then run PyreCrawl directly โ no venv, no pip install, no Python download:
uvx pyrecrawl@latestOr via uv tool install (persistent, recommended for regular use)
uv tool install pyrecrawlOr via pipx (alternative)
pipx install pyrecrawlOr via pip into a venv
pip install pyrecrawl2. One-time browser engines
pyrecrawl setupThis installs Chromium + stealth browser engines (~2 min, one-time).
3. Register with your AI agent
# Auto-detect installed agents and write their MCP configs
pyrecrawl install
# Or target specific agents
pyrecrawl install claude-desktop cursor
# Dry-run to preview what would change
pyrecrawl install --dry-runSupported agents: claude-desktop, claude-code, cursor, vscode, codex, opencode, hermes.
4. Start chatting
After installing + registering, restart your agent (or start a new session). Then ask:
"Scrape https://example.com and summarize it."
The tools appear as mcp_pyrecrawl_scrape, mcp_pyrecrawl_extract, mcp_pyrecrawl_map_site, mcp_pyrecrawl_crawl, mcp_pyrecrawl_search, mcp_pyrecrawl_health.
๐ Manual config (if pyrecrawl install doesn't match your setup)
Claude Desktop
Config file
Linux:
~/.config/Claude/claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pyrecrawl": {
"command": "uvx",
"args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]
}
}
}Claude Code
Config file: project-scoped .mcp.json
{
"mcpServers": {
"pyrecrawl": {
"command": "uvx",
"args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]
}
}
}Cursor
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"pyrecrawl": {
"command": "uvx",
"args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]
}
}
}VS Code / Copilot
Config file: .vscode/mcp.json (project-scoped)
{
"servers": {
"pyrecrawl": {
"command": "uvx",
"args": ["--from", "pyrecrawl", "pyrecrawl", "serve"],
"type": "stdio"
}
}
}Codex CLI
Config file: ~/.codex/config.toml
[mcp_servers.pyrecrawl]
command = "uvx"
args = ["--from", "pyrecrawl", "pyrecrawl", "serve"]OpenCode
Config file: ~/.config/opencode/opencode.json
{
"mcp": {
"pyrecrawl": {
"type": "local",
"command": ["uvx", "--from", "pyrecrawl", "pyrecrawl", "serve"],
"enabled": true
}
}
}Hermes
Config file
Linux/macOS:
~/.hermes/config.yamlWindows:
%LocalAppData%\hermes\config.yaml
mcp_servers:
pyrecrawl:
command: uvx
args:
- --from
- pyrecrawl
- pyrecrawl
- serve
enabled: trueWindows note:
uvxmust be on PATH. If not, use the full path touvx.exe(e.g.C:\Users\<you>\AppData\Local\hermes\bin\uvx.exe).
๐ง How the ladder chooses
PyreCrawl runs each request through three tiers, stopping at the first one that returns a complete, LLM-ready result:
Concern | Fast tier | Stealth tier | Deep tier |
Static HTML page | โ ~200ms | โ | โ |
Cloudflare-protected | โ | โ Turnstile solver | โ |
JS-heavy SPA | โ | โ real Chromium | โ |
Live DOM data (input | โ | โ
| โ |
LLM-ready markdown + citations | โ | โ | โ BM25, fit-markdown |
Structured extraction (CSS schema) | โ | โ | โ |
Deep crawl (BFS/DFS/BestFirst) | โ | โ | โ adaptive |
The agent never has to pick. prefer="auto" does it every call.
Live DOM data with js and wait_for
Some sites keep the data you want in a DOM property (e.g. an <input>'s .value)
that JS writes after an XHR โ it never appears in the serialized HTML. The
scrape tool accepts two stealth-tier params for exactly this:
{
"url": "https://temp-mail.org/id",
"prefer": "stealth",
"wait_for": "document.getElementById('mail').value.includes('@')",
"js": "document.getElementById('mail').value"
}wait_forโ a JS predicate expression polled until truthy (bounded bytimeout). Use it instead of guessing a sleep for anything that arrives asynchronously.jsโ a JS expression evaluated once the page settles; the value comes back inmeta.js_result. Errors are captured inmeta.js_error(the page result is still returned, never a crash).
๐ Compared to Firecrawl (hosted)
Firecrawl | PyreCrawl | |
Cost | Free 1k/mo, then $16โ333/mo | Free, self-hosted |
Local LLM support | โ | โ Ollama / any LLM |
Cloudflare bypass | โ (Fire-Engine, paid) | โ (free, built-in) |
Markdown + BM25 | โ | โ |
Self-host | โ | โ |
Academic paper search | โ | โ
arXiv + Crossref ( |
Hosted search API | โ /search | โ ๏ธ DuckDuckGo HTML + arXiv/Crossref (no key) |
๐ง Development
git clone https://github.com/SanggonBoy/PyreCrawl.git
cd PyreCrawl
uv venv --python 3.12 .venv
source .venv/Scripts/activate # Windows; or .venv/bin/activate on macOS/Linux
uv pip install -e ".[dev]"
python -m playwright install chromium
scrapling installRun tests
python scripts/selfcheck.py # real-network smoke test
python scripts/probe_stdio.py # stdio JSON-RPC probe๐ฆ Publish
Maintainers only:
git tag v0.8.0
git push origin v0.8.0GitHub Actions builds + uploads to PyPI via trusted publishing.
๐ Stay up to date
PyreCrawl checks PyPI on every startup and reports the latest version โ your
MCP agent sees this automatically via the health() tool response and can
notify you inline.
To check manually:
pyrecrawl versionTo upgrade:
pyrecrawl update # runs: uv tool upgrade pyrecrawlGet notified of new releases: click Watch โ Releases only at the GitHub repo to receive email notifications when a new version is published.
๐ Uninstall
# Remove from all agent configs
pyrecrawl uninstall
# Remove the package
uv tool uninstall pyrecrawl๐ก๏ธ License
MIT โ see LICENSE.
๐ Credits
Built on the shoulders of Scrapling and Crawl4AI โ both MIT, both excellent.