Skip to content
CaptchaSonic

AIエージェント・ブラウザ自動化向け

AIエージェント向けCAPTCHAソルバー

LangChain、CrewAI、browser-use、Playwrightのエージェントが captcha に遭遇すると処理が止まります。CaptchaSonicなら、エージェントやMCPクライアントに解決機能を提供し、ブロックされずにタスクを完了させられます。

AIエージェントがブロックされる理由

自律型エージェントは実際のWebを閲覧するため、他の自動化ツールと同じアンチボット対策に直面します。reCAPTCHA、hCaptcha、Cloudflare Turnstile、AWS WAFなどです。実行中にCAPTCHAが出ると処理が途切れ、エージェントは文脈を失い、タスクが失敗します。CAPTCHA解決をエージェントが呼び出せるツールとして扱えば、実行を最後まで続けられます。

LangChainCrewAIbrowser-usePlaywrightPuppeteerSeleniumMCP clientsAutoGen

エージェントのループにCAPTCHA解決を組み込む

CaptchaSonicをモデルが呼び出せるツール/関数として公開するか、ホスト型MCPサーバーに接続してください。ステップがコンテンツの代わりにCAPTCHAを返すと、エージェントはツールを呼び出してトークンを取得し、処理を再開します。人の介入は不要です。

agent_loop.py
from captchasonic import CaptchaSonic
from langchain.tools import tool

solver = CaptchaSonic(api_key="YOUR_API_KEY")

@tool
def solve_captcha(captcha_type: str, website_url: str, website_key: str) -> str:
    """Solve a captcha and return a token the agent can submit."""
    task = solver.create_task(
        type=captcha_type,          # e.g. "ReCaptchaV2" | "Turnstile" | "HCaptcha"
        website_url=website_url,
        website_key=website_key,
    )
    return solver.get_task_result(task.id).token

# Agent loop: detect -> solve -> continue
page.goto(target_url)
if page.locator('iframe[src*="recaptcha"]').count():
    sitekey = page.get_attribute('[data-sitekey]', 'data-sitekey')
    token = solve_captcha("ReCaptchaV2", page.url, sitekey)
    page.evaluate("(t)=>{document.querySelector('#g-recaptcha-response').value=t}", token)
    page.click('button[type=submit]')  # task resumes, no human in the loop

ホスト型MCPサーバー

MCP対応のクライアントを https://mcp.captchasonic.com に、APIキーと合わせて指定するだけで、CAPTCHA解決ツールがすぐに使えます。接続用の追加コードは不要です。設定方法はMCPのドキュメントをご覧ください。

MCP / AIエージェントのドキュメント

エージェントの処理の流れ

01

ブロックを検出

期待したコンテンツではなく、ページがCAPTCHAチャレンジを返したことをエージェントが検知します。

02

解決ツールを呼び出す

CAPTCHAの種類、ページURL、サイトキーを指定してCaptchaSonic(ツールまたはMCP)を呼び出し、トークンをポーリングで取得します。

03

タスクを続行

トークンをページまたはリクエストに挿入し、エージェントが元の目的を再開します。

エージェントに解決機能を

$0.50のボーナスクレジット付きで無料で開始。ホスト型MCPサーバーに加え、Python、Node.js、GoのSDKを提供。

よくある質問

It is an API (and, for CaptchaSonic, a hosted MCP server) that an autonomous agent can call as a tool when it hits a captcha. The agent submits the captcha type, page URL and site key, receives a token, injects it, and continues its task instead of stalling.

Yes. Expose CaptchaSonic as a LangChain/CrewAI tool or a Python/Node.js/Go function, or connect the hosted MCP server. browser-use, Playwright, Puppeteer and Selenium agents call the same solve flow inline.

Point any MCP-compatible client at the hosted CaptchaSonic MCP server (https://mcp.captchasonic.com) and it gains CAPTCHA-solving tools with no glue code. The model decides when to call them during a run. Setup is documented in the MCP docs.

hCaptcha, reCAPTCHA v2, Cloudflare Turnstile, GeeTest, AWS WAF, TikTok, Binance and image/OCR — the same coverage as the rest of the CaptchaSonic API, only charged for successful solves.

Agents browse the live web, so anti-bot systems present the same challenges they show any automation. Without a solve step the agent loses its loop context and the task fails. Adding captcha solving as a callable tool keeps the run going end to end.