rea-captcha

io.github.masakaai由 GitHub 帳號 masakaai 發布v0.3.1更新於 Oct 24, 2026

Safe same-session CAPTCHA handoff and fresh-evidence resume for Browser Use and Playwright agents.

發布方自己的服務:captcha.cc Human Verification

已驗證STDIO僅桌面瀏覽器自動化安全與監控

概覽

AI 產生的概覽

一個本機 stdio MCP 伺服器,在代理既有的瀏覽器工作階段中偵測 CAPTCHA 驗證挑戰,協調授權完成或人工接手,然後恢復原任務。

可以做什麼
分析並檢查偵測到的驗證挑戰及其策略判定(captcha_analyze、captcha_inspect)。在既有瀏覽器中執行策略授權的完成動作,並等待新的驗證證據(captcha_complete)。將挑戰交由人工處理並等待喚醒訊號(captcha_handoff、captcha_wait)。取得新的伺服器驗證證據後恢復同一任務(captcha_resume)。無狀態模式僅分析證據,不控制瀏覽器。
適用情境
當 Browser Use 或 Playwright 代理在自有或明確授權的網站上執行任務途中遇到 CAPTCHA,且希望不重啟任務、在同一瀏覽器工作階段內完成阻擋與恢復時使用。
執行需求
透過 npx(Node.js)以 stdio 伺服器在本機執行,僅限桌面端。同工作階段的瀏覽器操作需要設定指向代理既有瀏覽器的 Playwright/CDP 轉接器,並以 agent-config 指令產生主機設定。無狀態模式不需要瀏覽器。
安裝前請注意
僅供自有或明確授權的工作流程使用;它不會繞過正式環境的互動式防護,供應商自動化僅在具備文件化的非正式測試金鑰時才被接受。captcha_complete 會在瀏覽器中執行動作並提交至驗證端點。選用的本機 OCR 預設關閉,需明確設定,且其預測結果不可信。核准安裝提示前請確認固定的 npm 套件版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 rea-captcha,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

rea-captcha

Keep Browser Use tasks alive through CAPTCHA handoff.

[npm] [CI] [Live demo] [license]

Translations English · العربية · Deutsch · Ελληνικά · Español · فارسی · Français · Bahasa Indonesia · Italiano · 日本語 · 한국어 · Polski · Português (Brasil) · Русский · ไทย · Türkçe · Українська · Tiếng Việt · 简体中文 · 繁體中文

Install · Live demo · Demo evidence · How it works · MCP catalog · Cases · Architecture

When a Browser Use task hits a CAPTCHA halfway through, rea-captcha keeps the block and recovery inside the browser session the agent already owns. It detects supported verification challenges, coordinates an authorized action or human handoff, requires fresh server-validated evidence, and then returns control to the same task. It ships a TypeScript SDK, local stdio MCP server, browser-use plugin, Vercel-compatible Agent Skill, and optional authorized-origin local OCR.

Official source: install from masakaai/rea-captcha and npm package rea-captcha. The project has no hosted solver, telemetry, stealth claim, or dependency on Jet Browser. It reuses the agent's existing browser; the provider examples use documented non-production credentials only.

[Four same-session verification demos: reCAPTCHA, Turnstile, hCaptcha, and an owned image/text flow]

Run the four live verification cases

If this fixes a handoff you have actually hit, a star helps other Browser Use builders find it.

What the demo proves

These are complete agent-driven protected-action flows, not DOM-only fixtures. Each run detects a challenge, performs the authorized browser interaction in the same page, submits to the real validation boundary, observes fresh passed evidence, verifies the session cookie, and resumes the same controller. Google reCAPTCHA v2, Cloudflare Turnstile, and hCaptcha use their documented test modes plus vendor Siteverify endpoints; the owned image/text case uses an explicitly authorized local path and local server validation.

The first three cases load vendor-hosted JavaScript and accept the protected action only after the server receives success: true from the vendor verification endpoint. They use the vendors' documented non-production credentials: Google test keys, Cloudflare dummy keys, and hCaptcha test keys.

sh
npm run demo:web       # interactive local demonpm run test:web-demo  # all four live validation paths

Install

Browser Use

Install the version-aligned Python adapter from the verified release wheel:

sh
python -m pip install 'rea-captcha[browser-use] @ https://github.com/masakaai/rea-captcha/releases/download/v0.3.1/rea_captcha-0.3.1-py3-none-any.whl'

Attach the handoff guard to the Agent that already owns the browser session:

python
from rea_captcha import ChallengePlugin
challenge = ChallengePlugin(mode="local", human_handoff=True)await challenge.attach(agent)

The plugin borrows the agent's current BrowserSession; it does not launch or replace the browser. See the Browser Use handoff guide and complete example.

CI installs the supported Browser Use dependency and exercises the adapter against real Agent / BrowserSession pause-resume contracts; see the integration test.

MCP and coding agents

For local, stateless evidence analysis:

sh
npx [email protected] mcp --stateless

Stateless mode does not control a browser. Same-session actions require a configured Playwright/CDP adapter; generate a host configuration with npx [email protected] agent-config --agent mcp-json.

Or ask Codex, Claude Code, Cursor, or another coding agent to wire the correct path for the project:

text
Install rea-captcha in this project and connect it to the browser session this agent already uses.

How it works

[rea-captcha lifecycle: inspect evidence, apply policy, perform an authorized agent action in the same browser session, verify fresh clearance, and resume the same task]

MCP and coding agents

The official Registry entry is io.github.masakaai/rea-captcha and launches the zero-configuration stdio server through npm:

sh
npx [email protected] mcp --stateless

Review the pinned package version and approve npm's install prompt only when it matches the release you intend to run. The command does not suppress that prompt.

It exposes six tools: captcha_analyze, captcha_inspect, captcha_complete, captcha_handoff, captcha_wait, and captcha_resume. captcha_complete performs only a policy-authorized action in the configured existing browser and waits for fresh validation evidence. See the tool catalog for inputs and lifecycle semantics.

For a stateful local session, run setup and print a host configuration:

sh
npx rea-captcha agent-config --agent codexnpx rea-captcha agent-config --agent mcp-json

rea-captcha adds verification intelligence and bounded completion actions; it does not replace an agent's navigation tools. Both integrations must refer to the same browser session.

Hermes Agent users can inspect the Portable Agent Plugins v1 package. Its catalog-safe default is stateless evidence analysis; same-session browser actions still require an explicit stateful rea-captcha configuration.

TypeScript SDK

ts
import { ChallengeController, ChallengePolicy } from 'rea-captcha';import { PlaywrightChallengeAdapter } from 'rea-captcha/playwright';
const authorizedOrigin = 'https://fixture.example';const controller = new ChallengeController({  browser: new PlaywrightChallengeAdapter({    id: 'checkout',    page,    agentActions: {      authorizedOrigins: [authorizedOrigin],      allowProviderTestAutomation: true,      submitSelector: 'button[type="submit"]'    }  }),  policy: new ChallengePolicy({    authorizedOrigins: [authorizedOrigin],    allowProviderTestAutomation: true  })});
const inspection = await controller.inspect();if (inspection.policy.decision === 'agent-action' || inspection.policy.decision === 'local-processing') {  await controller.complete({ timeoutMs: 30_000 });  await controller.resume();} else if (inspection.policy.decision === 'human-handoff') {  const handoff = await controller.handoff({ taskId: 'checkout-run-42' });  await controller.wait({ timeoutMs: 120_000 });  await controller.resume({    taskId: 'checkout-run-42',    handoffId: handoff.handoff.id  });}

The controller borrows page; it does not create or close the browser. Human completion is a wake-up signal, not proof of success: the handoff identity is bound to the task, existing tab/session, and gate generation, and the controller still requires fresh evidence before consuming it once.

Browser providers

The recommended cross-agent provider is a browser already exposing CDP:

json
{  "version": 1,  "sessions": {    "local-chrome": {      "adapter": "playwright-cdp",      "endpoint": "http://127.0.0.1:9222",      "allowProviderTestAutomation": true,      "submitSelector": "button[type=submit]",      "authorizedOrigins": ["https://fixture.example"]    }  }}

Generic Playwright Page, Playwright-over-CDP, browser-use, and optional Jet Browser managed/standalone adapters are implemented. Jet Browser must be selected explicitly and is neither installed nor started by the default path. Configuration examples and provider boundaries are documented in architecture and cases.

browser-use and local OCR

The Python adapter is not published on PyPI yet, so an unqualified pip install rea-captcha will not work. The pinned wheel is built from the v0.3.1 tag, smoke-tested in GitHub Actions, and attached to the corresponding release.

For agent-driven completion, point rea-captcha's Playwright/CDP session at the same existing browser used by browser-use. The MCP lifecycle detects the block, performs an authorized action, verifies the result, and returns control without replacing the browser or task context.

The Python plugin shown in Install remains a lightweight detection and manual-recovery fallback for browser-use integrations that do not expose a compatible CDP action surface.

Local ddddocr is an optional primitive only for simple image/text challenges on an exact authorized origin. It is disabled unless both allowLocalImageText and authorizedOrigins are configured. No model weights are redistributed, and an OCR prediction remains untrusted evidence.

What is implemented

  • Evidence detection for reCAPTCHA, hCaptcha, Turnstile, GeeTest, DataDome, PerimeterX, AWS WAF, image/text inputs, and generic verification pages.
  • Deterministic states with bounded timeout, cancellation, and fresh-evidence resume checks.
  • Six stdio MCP tools, CLI/MCP parity, TypeScript SDK, browser-use hooks, and a Vercel-compatible Agent Skill.
  • Borrowed Playwright/CDP sessions plus optional Jet Browser adapters.
  • Local JSONL events with explicit ownership and no telemetry.
  • npm Trusted Publishing/provenance workflow and GitHub OIDC publication to the official MCP Registry.

Documentation

Community

Ask integration questions and share same-session agent examples in GitHub Discussions. For real-time chat, join the MASAKA Discord and use the dedicated #rea-captcha channel. Use GitHub Issues for reproducible bugs and follow the private security policy for vulnerabilities. Never post browser profiles, cookies, challenge tokens, API keys, or private page evidence.

Scope and disclaimer

rea-captcha is for owned or explicitly authorized workflows. Provider automation is accepted only when the adapter confirms the vendor's documented non-production test key. It does not bypass production interactive protection. Commercial solver APIs, credential transfer, stealth claims, and automatic completion of third-party production challenges are outside scope.

Inspired by morluto/rea.

License

Core code and integrations are MIT licensed. Optional dependencies and model artifacts keep their own terms; see Third-party notices and model licenses.

來源:README.md,提交 1df0d2c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

5
  1. v0.3.1最新Oct 16, 2026
  2. v0.3.0Oct 16, 2026
  3. v0.2.4Oct 16, 2026
  4. v0.2.3Oct 15, 2026
  5. v0.2.1Oct 14, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Captcha 整合