Captcha solver
for AI agents
An agent that meets a challenge stalls silently. Expose solving as a tool and the block becomes one more deterministic call.
Paste this into your coding agent
Claude Code, Cursor, Codex, Copilot or Windsurf: the prompt asks for your API key, adds the MCP server, wires a solve helper into your project and checks it end to end.
Set up CaptchaNo (https://captchano.com) in this project so captchas no longer block our browser automation. Read the full setup guide first and follow it: https://captchano.com/agents/setup.md In short: 1. Ask me for a CaptchaNo API key (it starts with "cn-"; I can create one at https://captchano.com/dashboard/keys). Never hardcode, print, log or commit it. Store it as CAPTCHANO_API_KEY in the project's git-ignored .env or secret store. 2. If you support MCP, add the CaptchaNo MCP server for yourself: command "npx -y captchano-mcp", env CAPTCHANO_API_KEY and CAPTCHANO_MAX_SPEND_USD=1.00 (in Claude Code: claude mcp add captchano -e CAPTCHANO_API_KEY=<key> -e CAPTCHANO_MAX_SPEND_USD=1.00 -- npx -y captchano-mcp). 3. If this codebase drives a browser or HTTP client (Playwright, Puppeteer, Selenium, Scrapy, requests...), add one small solveCaptcha helper that calls POST https://api.captchano.com/v1/solve?wait=60 with the bearer key, and inject the returned token the way the guide shows. Reuse the project's existing HTTP client and style. 4. Verify: check the balance (get_balance tool or GET /v1/balance), then do the one-solve end-to-end check in the guide (it solves the reCAPTCHA on https://captchano.com/tools/captcha-demo and confirms Google accepts the token). Supported: reCAPTCHA v2/v3/Enterprise, Cloudflare Turnstile, DataDome (needs our own proxy), GeeTest v3/v4, Yandex SmartCaptcha and image captchas. Failed solves are not billed. Only automate sites we own or are allowed to automate. Tell me what you changed when you are done.
Full guide the agent follows: captchano.com/agents/setup.md
Setup, typed responses and per-solve cost visibility.
Setup, typed responses and per-solve cost visibility.
Setup, typed responses and per-solve cost visibility.
Setup, typed responses and per-solve cost visibility.
Setup, typed responses and per-solve cost visibility.
Setup, typed responses and per-solve cost visibility.
Why agents stall on captchas
A script fails loudly when it meets a challenge. An agent fails quietly, and that is worse.
Nothing in a typical agent toolset can solve an image grid or a session-graded challenge, so the agent is stuck on the page.
Models invent a plausible next step and report progress they never made. The failure is silent.
An agent that keeps reloading a challenged page spends tokens and time without getting closer to the goal.
Give the agent a solver tool
- 01Wrap the API as a tool
One function that takes type, sitekey and URL and calls /v1/solve?wait=60.
- 02Keep the key out of the prompt
Read it from the environment inside the tool, so the model never sees it.
- 03Return a typed result
The token, the user agent used and the cost, so the agent can submit and account for spend.
- 04Bound the loop
Cap solves or spend per run so a confused agent cannot loop on a page.
What the tool returns
Every response carries the token or cookie, the user agent it was produced with and the cost of the solve. The agent can replay the user agent on submission, and a supervisor can stop the run when spend passes a threshold. Request shapes for every challenge type are in the API reference.
No SDK required
CaptchaNo is a plain REST API, so every framework guide above is a few lines of your own code rather than a package you have to trust. That also means the same tool works in any framework we have not written a guide for.
AI agent captcha FAQ
Can an AI agent solve captchas by itself?
Sometimes it can click a checkbox, but it cannot reliably answer image challenges, and automated browsers are shown them more often. A solver tool turns the challenge into one deterministic call the agent can branch on.
Which agent frameworks are supported?
Any framework that can call an HTTP API. We have guides for MCP, LangChain, Browser Use, the OpenAI Agents SDK, CrewAI and n8n, and the same pattern works elsewhere.
Is there a CaptchaNo MCP server?
Yes. captchano-mcp is an open-source (MIT) MCP server you run with npx -y captchano-mcp. It reads your API key from the environment, never from the model, and supports an optional spend cap. It is listed in the official MCP Registry.
How do I stop an agent overspending?
Every result includes its cost. Keep a running total in the tool or the run context and refuse further solves past a budget.
Is it allowed to let agents solve captchas?
It depends on the site and the task. Agents acting on your own accounts, testing your own systems or collecting data the site permits are the intended uses. Read the target's terms first.
Guides that help
Ready to build?
Start with a free 7-day trial of the Hobby plan, then pay per successful solve or keep the plan as your traffic grows. Cancel before the trial ends and you pay nothing.