Agent-ready release. cloudscraper.js can now be driven by AI agents, keeps solved sessions hot, and is safe to install in CI/Docker.
Highlights
- Reusable hot sessions via
createScraper()backed by a long-lived Python daemon — repeated requests skip re-solving the Cloudflare challenge. - AI-agent interfaces (closes #1): an MCP server (
cloudscraper-mcp) withfetch_protected_url/get_cookies/solve_challenge, a LangChainDynamicStructuredTool, and function-calling JSON Schemas. - HTML → Markdown output (
format: "markdown") — what LLMs actually want. - Security: removed the privileged
postinstall(no moresudo/ Homebrew /curl | bashonnpm install) — safe for CI, Docker and serverless. - Robust NDJSON IPC (replaces the fragile positional stdout parsing), full HTTP methods, plus
proxy/retries/rateLimitPerHost/timeoutMs. - ~84% test coverage, GitHub Actions CI (Node 22/24), and Architecture Decision Records.
Full changelog: https://github.com/maarkN/cloudscraper.js/blob/main/CHANGELOG.md