browser-use Integration
Solve CAPTCHAs in browser-use agents — Cloudflare Turnstile, reCAPTCHA, hCaptcha. MCP tool or direct API.
The Problem
browser-use agents hit Cloudflare challenges, reCAPTCHA, and hCaptcha walls that block automation cold. Even the CLI running headless Chromium gets flagged by bot detection — stealth plugins and residential proxies don't help.
This isn't a niche issue. It's the #1 blocker for browser-use in production:
Method 1: MCP Integration
RECOMMENDEDbrowser-use has native MCP support. Register the GateSolve MCP server as a tool, and your agent can call solve_captcha whenever it hits a challenge — no extra code needed.
npm install -g @gatesolve/mcp-serverfrom browser_use import Agent, Browser
from browser_use.mcp.controller import register_mcp_tools
tools = Tools()
mcp = await register_mcp_tools(
tools.registry, "npx", ["@gatesolve/mcp-server"]
)
agent = Agent(
task="Navigate to site and solve any CAPTCHAs",
llm=llm,
browser=browser,
tools=tools,
)
await agent.run()
await mcp.cleanup()How it works: The agent discovers the solve_captcha tool via MCP. When it encounters a CAPTCHA on any page, it extracts the site key and type, calls the tool, and injects the token — all autonomously. No polling loop, no manual extraction.
Method 2: Direct API
For CLI users or custom scripts that don't use MCP, call the GateSolve API directly with the Python SDK:
pip install gatesolvefrom gatesolve import GateSolve
gs = GateSolve(api_key="gs_your_key")
result = gs.solve(
url="https://example.com",
type="turnstile",
sitekey="0x4AAAA...",
)
# Inject result.token into the page via browser-use CLI
print(result.token)Supported types: turnstile recaptcha-v2 recaptcha-v3 hcaptcha
Get Started
Get a free API key
Sign up at gatesolve.dev — 100 free solves, no credit card.
Install
# MCP integration (recommended)
npm install -g @gatesolve/mcp-server
# Python SDK (direct API)
pip install gatesolveRun your agent
Your browser-use agent will automatically solve CAPTCHAs when it encounters them. No manual intervention needed.