SP

sanggonboy/pyrecrawl

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 2 forks 质量 82 趋势 18MIT

AI代理的网页浏览超能力——一台MCP服务器,用于抓取、爬取、提取、绘制、搜索、批处理、研究和监控网络。自托管,无API密钥。免费Firecrawl替代方案。

概览

抓取、提取、爬取、映射和搜索——自托管,无API密钥,无速率限制,无订阅。 PyreCrawl 支持(模型上下文协议),这是 Claude、Cursor、VS Code、Codex、OpenCode、Hermes 及任何兼容 MCP 代理的标准工具界面。 A总是选择最便宜且成功的方法: (无工具调用的只读状态):pyrecrawl://cache/stats ·pyrecrawl://sessions ·pyrecrawl://monitors (现成战术手册):研究(主题)·rag_ingest(网站)·watch_page(网址) 偏好选项:“自动”(默认梯级)·“快速”(仅HTTP)·“隐匿”(CF绕过)·“LLM”(深度处理)。 UV 是一个快速的 Python 包管理器,能处理 Python 本身——无需单独安装 Python。只下载一次: 然后直接运行 PyreCrawl——不使用 venv,不安装 pip 安装,不下载 Python:

概述(AI 翻译)

一个命令就能让任何AI代理掌握整个网络。 抓取、提取、爬行、绘制地图和搜索—— 自托管,没有API密钥,没有速率限制,没有订阅。

PyreCrawl 使用 MCP(模型上下文协议),这是 Claude 的标准工具接口, 光标、VS Code、Codex、OpenCode、Hermes 以及任何兼容 MCP 的代理。

智能自动备用梯总是选择最便宜且有效的方法:

⚡ 工具暴露

工具 它的作用
scrape(url, prefer="auto") 单一URL→LLM兼容的标记下载
extract(url, schema) 抓取 + 结构化提取(JsonCss 模式)
map_site(root, include_pattern=None, limit=200) 枚举所有内部网址
crawl(root, max_pages=5, prefer="auto", include_paths=None, exclude_paths=None, max_depth=0) 多页爬行,带路径滤波器+真实BFS深度
document(url) PDF/DOCX/PPTX → 折扣(无浏览器,可选 [docs] 附加内容)
search(query, limit=10) 通过DuckDuckGo HTML进行网页搜索(无API密钥)
search_papers(query, limit=8, source="arxiv", category=None) 通过arXiv + Crossref进行学术检索(无API密钥)——将pdf_url输入到document
'batch_scrape(urls[], …

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🔥 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
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
在 GitHub 查看完整 README

安装

uvx --from pyrecrawl pyrecrawl serve
新手?先看 mcpskill.org 教程 →

配置

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