Configure a local CapSolver MCP service in AionUI and apply bounded recovery to authorized web tasks without Playwright.
An authorized AionUI web task can stop when a CAPTCHA appears or mistake a challenged response for valid data. This repository connects AionUI to CapSolver through the official local MCP service, permits one recovery attempt, and stops on denied targets, tool errors, repeated challenges, or an exhausted budget.
AionUI launches the official capsolver-mcp command over stdio. The dependency-free Python code models the recovery decision boundary; it is not another MCP server and does not automate a browser.
- Official AionUI
mcpServersstdio configuration. - Host allowlist and one-attempt default.
- Explicit completed, denied, tool-error, persistent-challenge, and budget states.
- Offline unit tests and deterministic smoke example.
AionUI loads config/aionui.mcp.json, starts the service, and discovers its tools. A challenge from an authorized task enters RecoveryPolicy; only an allowlisted host may call the MCP tool. A successful normalized outcome resumes once; every other outcome stops.
AionUI task → challenge → allowlist → MCP tool → resume once or stop
Install AionUI, Python 3.11+, and the packages in the official CapSolver MCP installation guide.
python -m pip install -e .
python -m unittest discover -s tests -v
python scripts/smoke_test.pyAdd config/aionui.mcp.json through AionUI MCP management and run its connection test. The file follows the official AionUI MCP configuration guide. Replace YOUR_API_KEY only in local configuration.
from aionui_recovery import RecoveryPolicy, ToolOutcome
p = RecoveryPolicy({"qa.example.test"})
decision = p.begin("https://qa.example.test/checkpoint")
if decision.action == "call_mcp_tool":
decision = p.finish(ToolOutcome(True, True))Do not guess tool names, fields, or arguments; use the current schema exposed by the installed official service.
call_mcp_tool: authorized recovery attempt 1 of 1
completed: challenge cleared; task may resume once
Controlled QA on owned hosts, explicitly authorized RPA, and local configuration testing with mock outcomes.
config/ contains the AionUI config; src/ the recovery state machine; tests/ unit tests; and scripts/ the smoke test.
Tests cover success, denial, tool errors, persistent challenges, attempt exhaustion, and the exact stdio configuration.
Use the official absolute-Python command form if capsolver-mcp is not on PATH. If AionUI reports a connection failure or empty tool list, stop and verify installed versions. Never invent fields or automatically expand the attempt budget.
Use only public data, systems you own, or explicitly authorized targets. Keep a narrow allowlist, one-attempt default, reasonable rate limits, minimal collection, short retention, and visible stop reasons. Never use private or restricted data, credentials, access-control evasion, unbounded collection, or unauthorized access. For personal, financial, health, or employment data, require written authorization, minimization, access controls, and a retention schedule; stop if any control is absent.
See contribution guidelines. Preserve offline tests, bounded recovery, and official-source requirements.
See security policy. Never include keys, browser sessions, cookies, or captured responses in issues.
This AionUI-specific configuration and recovery controller is technically distinct from a generic MCP server and stops clearly when recovery is unsafe or unsuccessful with CapSolver.
Developer sharing CapSolver integration examples.