MCP reCAPTCHA Solver for AI Agents: Setup and Integration

Ethan Collins
How to use CapSolver
13-Aug-2026
TL;DR
- An mcp recaptcha solver uses
solve_captchawhen the reCAPTCHA type, page URL, and public site key are known; browser mode can usedetect_captchasorsolve_on_page. - The MCP service must expose only the documented five CapSolver tools, and the agent layer covers reCAPTCHA v2, reCAPTCHA v3 including Enterprise, and Turnstile.
- The protected application still decides whether a returned token is accepted; a tool result is not a business-success signal.
- A changed action, stale page, missing site key, unsupported type, or repeated challenge should stop the autonomous branch.
Introduction
An mcp recaptcha solver is most useful when a permitted AI-agent task already knows what reCAPTCHA it encountered and needs a structured recovery call. CapSolver exposes the official solve_captcha tool through capsolver-mcp, while detect_captchas and solve_on_page support browser-driven recovery. The integration should preserve the page URL, reCAPTCHA version, site key, browser session, and authorized action as one checkpoint. It should also stop rather than guess when any input changes. This tutorial uses only current names from CapSolver's AI documentation and limits agent capability to reCAPTCHA v2, reCAPTCHA v3 including Enterprise, and Cloudflare Turnstile. Use the pattern only for lawful, reasonable, responsible work on systems and data you are authorized to access.
Decide Between Token Mode and Browser Mode
Token mode is the simpler mcp recaptcha solver path. The client asks solve_captcha to solve a known type using the page URL and site key. Browser mode lets detect_captchas inspect a page or lets solve_on_page run detection, solving, and fill-back in the live Playwright context.
The CapSolver AI-agent architecture describes this recovery boundary. The core SDK modes explain solve, detect, get_captcha_info, and solve_on_page. The reCAPTCHA v2 client model documents the public site key and response lifecycle, while the reCAPTCHA v3 action model explains that site owners validate actions and scores on their backend.
Use one checkpoint record
Store the approved hostname, URL, reCAPTCHA version, site key, expected action, browser context ID, and a one-attempt counter outside the model transcript. The output of the mcp recaptcha solver should be a redacted terminal state such as RESUME, REJECTED, or REVIEW, not a reusable token in conversational memory.
Install and Register the MCP Service
Use the official package sequence:
bash
pip install git+https://github.com/capsolver-ai/capsolver-core.git
pip install git+https://github.com/capsolver-ai/capsolver-mcp.git
Then configure the MCP client to launch capsolver-mcp with CAPSOLVER_API_KEY in its environment. The MCP service configuration documents the JSON block and the exact tools. A connected mcp recaptcha solver must reveal solve_captcha, detect_captchas, solve_on_page, get_balance, and get_supported_captchas. Stop if any name is missing or if an unexpected tool appears.
The agent tools reference shows how the same capability maps through get_all_tools and create_executor when a team owns the function-calling loop. This makes MCP and custom agent integrations consistent without inventing method names.
Call the reCAPTCHA Tool With Verified Inputs
The safest tool demonstration is the documented natural-language form because the MCP server publishes its own input schema to the client:
text
Use the CapSolver solve_captcha tool for the reCAPTCHA v2 on
https://staging.example.org/login using the public site key 6Lc...
Return only a redacted success state and request identifier to the agent.
The inputs are the type, authorized page URL, and public site key. The tool output contains the solution data defined by the installed server. Trusted browser or application code must consume it immediately and verify the original action. The stop conditions are missing parameters, a different hostname, a v3 action mismatch, expired authorization, or one failed attempt. The MCP reCAPTCHA example for Cursor offers a client-specific sibling pattern, while the general MCP CAPTCHA workflow covers service discovery.
Redeem Your CapSolver Bonus Code
Boost your automation budget instantly!
Use bonus code CAP26 when topping up your CapSolver account to get an extra 5% bonus on every recharge — with no limits.
Redeem it now in your CapSolver Dashboard
Validate the Protected Action in the Same Session
An mcp recaptcha solver succeeds only when the original permitted task reaches its expected state. For reCAPTCHA v2, that may be a staging form confirmation. For reCAPTCHA v3, it is the protected action accepted under the site owner's policy. Do not move a result between hosts, sessions, actions, or accounts.
The reCAPTCHA token-invalid troubleshooting flow helps isolate bad parameters and stale context. If the service connects but tools fail, use the MCP server error checklist before changing application logic.
Record only evidence needed for review
Log the approved hostname, challenge version, selected tool, start and finish time, terminal status, and a request identifier. Do not log credentials, cookies, or raw solution values. The W3C Trace Context standard provides a useful correlation model, and the OWASP logging principles help minimize sensitive data.
Test Failure States Before Production
Test an invalid site key, wrong reCAPTCHA version, changed action, expired page, missing browser dependency, repeated challenge, and rejected application response. Every failure should terminate the mcp recaptcha solver branch with REVIEW after one attempt. A positive test should prove the same browser context finishes the original action and that the agent receives only the terminal state.
Conclusion
A dependable mcp recaptcha solver is a narrow sequence: discover the official MCP tools, bind verified reCAPTCHA inputs to one authorized checkpoint, call the appropriate tool once, and validate the protected action in the same session. Do not let the model expand scope or interpret uncertainty as permission. Teams implementing permitted agent workflows can use CapSolver as the reCAPTCHA recovery infrastructure.
FAQ
Can an mcp recaptcha solver handle reCAPTCHA v3?
Yes. Current CapSolver AI documentation covers reCAPTCHA v2 and v3, including Enterprise. The protected application still owns action and acceptance policy.
Should the agent call solve_captcha or solve_on_page?
Use solve_captcha when type, URL, and site key are known. Use browser tools when detection and fill-back must occur in the live page context.
Can the MCP tool result be reused on another page?
No. Bind it to the authorized URL, browser session, and protected action, then consume it immediately.
How many automatic attempts should an MCP reCAPTCHA solver make?
Use one bounded attempt. A repeat challenge, changed input, or rejected application state should move to review.
Compliance Disclaimer: The information provided on this blog is for informational purposes only. CapSolver is committed to compliance with all applicable laws and regulations. The use of the CapSolver network for illegal, fraudulent, or abusive activities is strictly prohibited and will be investigated. Our captcha-solving solutions enhance user experience while ensuring 100% compliance in helping solve captcha difficulties during public data crawling. We encourage responsible use of our services. For more information, please visit our Terms of Service and Privacy Policy.
More

How to Install CapSolver MCP from the Official MCP Registry
Find CapSolver MCP in the Official MCP Registry, install version 0.1.3 with uvx or pip, configure a local client, and verify the stdio tools.

Khadija Santos
18-Sep-2026

Pydantic AI CAPTCHA Tools: Typed Inputs and Solver Results
Add CAPTCHA tools to Pydantic AI using the official CapSolver adapter, test tool execution locally, and handle typed inputs and structured solver results.

Khadija Santos
18-Sep-2026

MCP vs CLI for AI Agents: Context Cost and Failure Handling
Compare MCP and CLI interfaces for AI agents across tool discovery, context cost, security, debugging, failure handling, and hybrid architecture.

Nikolai Smirnov
18-Sep-2026

How to Handle Multiple CAPTCHA Widgets in AI Browser Agents
Handle multiple CAPTCHA widgets on one page with explicit form ownership, solver parameters, result routing, and checks for the intended AI agent action.

Lucas Mitchell
15-Sep-2026

CapSolver MCP Server Is Now Available for AI Agents
Install CapSolver MCP Server from PyPI and give compatible AI agents five tools for authorized CAPTCHA handling through the Model Context Protocol.

Sora Fujimoto
11-Sep-2026

AI Agents vs Scripts: How to Choose for Web Automation
Choose between AI agents, scripts, and hybrid web automation by task uncertainty, testability, cost, and the controls needed for reliable execution.

Lucas Mitchell
11-Sep-2026


