PyreCrawl

io.github.SanggonBoy由 GitHub 账号 SanggonBoy 发布v0.8.1更新于 Oct 24, 2026

Web scraping + research toolkit for AI agents: scrape, crawl, monitor URLs with anti-bot bypass.

概览

AI 生成的概览

自托管的网页抓取与研究工具包,让 AI 助手无需 API 密钥即可抓取、爬取、搜索、提取和监控网页。

可以做什么
将单个网址抓取为适合大模型的 Markdown,并自动从普通 HTTP 升级到隐身浏览器,以绕过反爬并渲染 JavaScript 页面,还可在实时页面上执行 JS 表达式或等待条件。按 CSS 模式从页面提取结构化数据,并把 PDF、DOCX、PPTX 文档转换为 Markdown。枚举站点的内部链接,按路径过滤和深度限制爬取多个页面,或在一次并行调用中批量抓取多个网址。通过 DuckDuckGo 搜索网页、通过 arXiv 和 Crossref 搜索学术论文,并执行深度研究流程,返回带编号引用的证据包。监控网址内容变化,保存快照并生成差异对比。
适用场景
当助手需要读取或收集实时网站内容时适用,尤其是位于 Cloudflare 或大量 JavaScript 之后的页面;也适合需要带引用的可重复研究、为知识库批量采集页面,或跟踪某个页面的变化。适合希望自托管而非使用付费托管抓取服务的用户。
运行要求
作为本地 stdio 进程运行,通过 uvx 从 PyPI 包 pyrecrawl 启动;需安装 uv 并加入 PATH。一次性安装命令会安装 Chromium 和隐身浏览器引擎。无需 API 密钥或账户。抓取、搜索和启动时的版本检查需要网络访问。
安装前请注意
服务器启动时每 24 小时发送一次匿名使用统计,包含哈希后的机器标识、版本和操作系统类型;可通过 PYRECRAWL_NO_TELEMETRY 或 DO_NOT_TRACK 关闭。抓取和爬取会访问第三方页面,可能与网站条款或 robots 规则冲突。session 工具会保留 Cookie,可作用于登录墙之后,monitor 会把快照写入本地目录。js 和 wait_for 参数会在页面中执行 JavaScript 表达式。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PyreCrawl,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🔥 PyreCrawl — Web Browsing Superpowers for Your AI Agent

[License: MIT] [MCP] [Python 3.10+] [PyPI] [GitHub stars] [Downloads / 30d] [Active users / 30d]

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

ToolWhat it does
scrape(url, prefer="auto")Single URL → LLM-ready markdown
extract(url, schema)Scrape + structured extraction (JsonCss schema)
map_site(root, include_pattern=None, limit=200)Enumerate all internal URLs
crawl(root, max_pages=5, prefer="auto", include_paths=None, exclude_paths=None, max_depth=0)Multi-page crawl with path filters + true BFS depth
document(url)PDF/DOCX/PPTX → markdown (no browser, optional [docs] extras)
search(query, limit=10)Web search via DuckDuckGo HTML (no API key)
search_papers(query, limit=8, source="arxiv", category=None)Academic search via arXiv + Crossref (no API key) — feed pdf_url into document
batch_scrape(urls[], ...)Many URLs in ONE call — parallel, deduped, cache-aware
deep_research(query, limit=5, scrape_top=3)Search → evidence pack with [n] citations (no LLM synthesis — your agent does that)
monitor(url, action, css_selector=None)Change detection with persisted snapshots + unified diff
session(session, action, ...)Persistent browser session (cookies kept) — login walls, multi-step flows, screenshots
cache(action)Inspect/clear/enable/disable the HTTP response cache
health()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

VariableDefaultEffect
PYRECRAWL_CACHEoff1 = in-memory LRU (128 pages), or a directory path (reserved for disk mode)
PYRECRAWL_CACHE_TTL900Cache entry lifetime in seconds
PYRECRAWL_MONITOR_DIR~/.pyrecrawl/monitorsWhere monitor snapshots persist
PYRECRAWL_NO_TELEMETRYoff1 = disable the anonymous startup ping (also honors DO_NOT_TRACK=1)

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:

bash
# macOS / Linuxcurl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Learn more about UV →

Then run PyreCrawl directly — no venv, no pip install, no Python download:

bash
uvx pyrecrawl@latest
Or via uv tool install (persistent, recommended for regular use)
bash
uv tool install pyrecrawl
Or via pipx (alternative)
bash
pipx install pyrecrawl
Or via pip into a venv
bash
pip install pyrecrawl

2. One-time browser engines

bash
pyrecrawl setup

This installs Chromium + stealth browser engines (~2 min, one-time).

3. Register with your AI agent

bash
# Auto-detect installed agents and write their MCP configspyrecrawl install
# Or target specific agentspyrecrawl install claude-desktop cursor
# Dry-run to preview what would changepyrecrawl install --dry-run

Supported 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."

Available tools:

ToolWhat it does
scrapeFetch a single URL → markdown (auto-escalates past Cloudflare)
extractScrape + structured extraction via CSS schema → JSON
map_siteEnumerate all internal URLs from a root
crawlMulti-page crawl: discover + scrape in bulk
batch_scrapeFetch many URLs in one parallel call
searchWeb search via DuckDuckGo with anti-bot bypass
search_papersAcademic paper search (arXiv / Crossref)
deep_researchSearch + scrape + citations in one call — primary research tool
documentExtract text from PDF/DOCX/PPTX URLs
monitorTrack a URL for content changes over time
sessionPersistent browser session for login walls
cacheInspect or clear the response cache
healthVerify engine availability + version

Plus 3 guided prompts: research, rag_ingest, watch_page.

Quick examples

Ask your agent naturally — no special syntax needed:

You sayAgent uses
"Scrape https://example.com and summarize it"scrape → returns markdown → agent summarizes
"Research Rust memory safety vulnerabilities"deep_research → search + scrape + citations
"Deep research on AI regulation worldwide"deep_research(iterations=3) → multi-pass with refined queries
"Extract all product names and prices from this page"extract → CSS schema → structured JSON
"Crawl https://docs.example.com and give me an overview"crawl → multi-page → summary
"Monitor this page for price changes"monitor → baseline snapshot → periodic diff
"Find papers about transformer attention"search_papers → arXiv results
"What's the current cache hit rate?"cache → stats

🧠 Skills — Maximize Your Agent's Research Quality

PyreCrawl tools give your agent hands (scrape, crawl, search). But the agent still needs a brain — instructions on when to use which tool, how to chain research passes, and what anti-hallucination rules to follow.

That's what PyreCrawl Skills provides.

MCP Tools (this repo)Skills (pyrecrawl-skills)
RoleExecute web operationsTell the agent how to use them
AnalogyHandsBrain
Exampledeep_research(query, iterations=3)"Run 3 passes, check gaps after each, cite everything"
Required?Yes (the engine)Optional (but recommended for research quality)

Quick setup:

bash
# 1. Install the tools (you already have this)uvx pyrecrawl@latest
# 2. Add the research skill to your projectgit clone https://github.com/SanggonBoy/pyrecrawl-skills.git /tmp/pyrecrawl-skillscp /tmp/pyrecrawl-skills/pyrecrawl-research/SKILL.md ./CLAUDE.md  # or .cursorrules / AGENTS.md

Without skills: Your agent has powerful tools but improvises usage. With skills: Your agent follows a proven research protocol with anti-hallucination guardrails.


📚 Manual config (if pyrecrawl install doesn't match your setup)

Claude Desktop

Config file

  • Linux: ~/.config/Claude/claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %AppData%\Claude\claude_desktop_config.json
json
{  "mcpServers": {    "pyrecrawl": {      "command": "uvx",      "args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]    }  }}

Claude Code

Config file: project-scoped .mcp.json

json
{  "mcpServers": {    "pyrecrawl": {      "command": "uvx",      "args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]    }  }}

Cursor

Config file: ~/.cursor/mcp.json

json
{  "mcpServers": {    "pyrecrawl": {      "command": "uvx",      "args": ["--from", "pyrecrawl", "pyrecrawl", "serve"]    }  }}

VS Code / Copilot

Config file: .vscode/mcp.json (project-scoped)

json
{  "servers": {    "pyrecrawl": {      "command": "uvx",      "args": ["--from", "pyrecrawl", "pyrecrawl", "serve"],      "type": "stdio"    }  }}

Codex CLI

Config file: ~/.codex/config.toml

toml
[mcp_servers.pyrecrawl]command = "uvx"args = ["--from", "pyrecrawl", "pyrecrawl", "serve"]

OpenCode

Config file: ~/.config/opencode/opencode.json

json
{  "mcp": {    "pyrecrawl": {      "type": "local",      "command": ["uvx", "--from", "pyrecrawl", "pyrecrawl", "serve"],      "enabled": true    }  }}

Hermes

Config file

  • Linux/macOS: ~/.hermes/config.yaml
  • Windows: %LocalAppData%\hermes\config.yaml
yaml
mcp_servers:  pyrecrawl:    command: uvx    args:      - --from      - pyrecrawl      - pyrecrawl      - serve    enabled: true

Windows note: uvx must be on PATH. If not, use the full path to uvx.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:

ConcernFast tierStealth tierDeep tier
Static HTML page✅ ~200ms——
Cloudflare-protected❌✅ Turnstile solver—
JS-heavy SPA❌✅ real Chromium—
Live DOM data (input .value, JS state)❌✅ js param—
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:

json
{  "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 by timeout). 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 in meta.js_result. Errors are captured in meta.js_error (the page result is still returned, never a crash).

📊 Compared to Firecrawl (hosted)

FirecrawlPyreCrawl
CostFree 1k/mo, then $16–333/moFree, 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 (search_papers)
Hosted search API✅ /search⚠️ DuckDuckGo HTML + arXiv/Crossref (no key)

🔧 Development

bash
git clone https://github.com/SanggonBoy/PyreCrawl.gitcd PyreCrawluv venv --python 3.12 .venvsource .venv/Scripts/activate  # Windows; or .venv/bin/activate on macOS/Linuxuv pip install -e ".[dev]"python -m playwright install chromiumscrapling install

Run tests

bash
python scripts/selfcheck.py        # real-network smoke test (13 tools + engines)python scripts/probe_stdio.py      # stdio JSON-RPC probepython scripts/test_ladder_bug.py  # SPA-shell ladder escalation regressionpython scripts/test_js_eval.py     # stealth js/wait_for params regressionpython scripts/test_scope_selector.py  # crawl css_selector/max_depth wiringpython scripts/test_link_harvest.py    # map/BFS link purity regression

📦 Publish

Maintainers only:

bash
git tag vX.Y.Zgit push origin vX.Y.Z

GitHub 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:

bash
pyrecrawl version

To upgrade:

bash
pyrecrawl update   # runs: uv tool upgrade pyrecrawl

Get notified of new releases: click Watch → Releases only at the GitHub repo to receive email notifications when a new version is published.


[!NOTE] PyreCrawl sends one anonymous usage ping per 24 h at server startup — see Privacy for exactly what's sent and how to opt out.

🔒 Privacy — anonymous usage ping

PyreCrawl phones home once per 24 h with a tiny anonymous ping when the MCP server starts, so we can count real users (DAU/MAU) instead of raw downloads.

Sent (4 fields, ~100 bytes)Never sent
Hashed machine id (SHA-256 of hostname+MAC — not reversible)Your IP (not stored)
PyreCrawl versionAny URL you scrape
Python versionAny page content or search queries
OS family (windows / linux / darwin)Anything else

Client code: src/pyrecrawl/telemetry.py (~90 lines, stdlib only) · Collector: workers/telemetry/ — a self-hostable Cloudflare Worker + D1, no third-party analytics service.

Opt out any time:

bash
export PYRECRAWL_NO_TELEMETRY=1   # or the industry-standard DO_NOT_TRACK=1

📜 Uninstall

bash
# Remove from all agent configspyrecrawl uninstall
# Remove the packageuv tool uninstall pyrecrawl

🛡️ License

MIT — see LICENSE.

来源:README.md,提交 657ad65

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.8.1最新Sep 22, 2026
  2. v0.8.0Sep 19, 2026
  3. v0.7.5Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分