AI agents can now browse, fill forms, scrape and run end-to-end tests on their own. Then they hit a Cloudflare "Just a moment..." page or a Turnstile widget, and the run stops. The agent cannot click a checkbox that is designed to detect automation, and it has no way to buy its way past one.
The NSLSolver MCP server fixes that. It plugs the NSLSolver API into any Model Context Protocol client, so the agent can call a solver the same way it calls a file-system or browser tool. This guide covers the setup, what the agent receives, and the few rules that make the tokens and cookies actually work.
Short version: install the server with one npx command, add your API key, and your agent gets six tools for Turnstile, Cloudflare Challenge, reCAPTCHA v3, Kasada, Akamai and your balance. Copy-paste configs for every client are on the MCP setup page.
Why agents get stuck on captchas
Bot walls are built to stop exactly what an agent is: software driving a browser or an HTTP client. Turnstile scores the browser environment, Cloudflare Challenge issues a cf_clearance cookie only to clients that pass its checks, Kasada and Akamai require signed sensor payloads, and reCAPTCHA v3 grades the session silently.
An agent can recognise these pages, but it cannot pass them by itself. What it can do is call a tool. Once a solver is available as an MCP tool, the agent detects the wall, sends the site key and URL to NSLSolver, and gets back a token, cookies or headers to continue with.
What the MCP server is
The Model Context Protocol (MCP) is the open standard that AI clients such as Claude Code, Claude Desktop, Cursor, VS Code and Windsurf use to talk to external tools. A server describes its tools, their inputs and what they do; the client shows them to the model, and the model decides when to call them.
nslsolver-mcp is the official server for NSLSolver. It is open source (MIT), published on npm, runs locally over stdio, and only talks to api.nslsolver.com with your API key. It has no state, no telemetry and no other network access.
Install it in Claude Code, Claude Desktop or Cursor
You need Node.js 18 or newer and an NSLSolver API key. Your key is active as soon as you sign up, and verifying your email adds 100 free solves. In Claude Code, a single command registers the server:
# Claude Code: one command, available in every project
claude mcp add nslsolver -e NSLSOLVER_API_KEY=YOUR_API_KEY -- npx -y nslsolver-mcp
# check it is connected
claude mcp listJSON config for other clients
Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json) and Windsurf (~/.codeium/windsurf/mcp_config.json) all accept the same block. VS Code uses a "servers" key and can prompt for the key so it is never written to disk; that variant is on the setup page.
{
"mcpServers": {
"nslsolver": {
"command": "npx",
"args": ["-y", "nslsolver-mcp"],
"env": { "NSLSOLVER_API_KEY": "YOUR_API_KEY" }
}
}
}The tools your agent gets
Each tool maps to one NSLSolver service and includes instructions for the model: where to find the site key, which inputs are required, and how to use the result.
| Tool | Returns | Avg. time | Per 1,000 |
|---|---|---|---|
| solve_turnstile | token | ~250 ms | $0.80 |
| solve_cloudflare_challenge | cf_clearance + user_agent | ~2.5 s | $1.00 |
| solve_recaptcha_v3 | token | ~4.5 s | $1.00 |
| solve_kasada | x-kpsdk-* headers | ~6 s | $1.50 |
| solve_akamai | _abck + session cookies | ~9 s | $2.00 |
| get_balance | balance, CPM limits | instant | free |
Only successful solves are billed. Validation errors, 429 and 503 responses cost nothing.
What a call looks like
Ask in plain language, for example: "Get a Turnstile token for https://example.com/login, the sitekey is 0x4AAAAAAA..." or "This page shows Just a moment..., get a cf_clearance through my proxy http://user:pass@1.2.3.4:8080". The agent picks the tool, and the result comes back as JSON it can use in its next request:
// solve_turnstile result returned to the agent
{
"success": true,
"type": "turnstile",
"token": "0.AkBr7...",
"cost": 0.0008
}
// solve_cloudflare_challenge result
{
"success": true,
"type": "challenge",
"cookies": { "cf_clearance": "abc123..." },
"user_agent": "Mozilla/5.0 ...",
"cost": 0.001
}Three rules that make the results work
- Replay cookies with the same proxy and User-Agent. cf_clearance and the Akamai cookies are bound to the exit IP and the browser identity they were minted with. The challenge tool returns the user_agent to reuse.
- Use tokens quickly, and only once. A Turnstile token expires after about 300 seconds and is single-use, so the agent should solve right before it submits.
- Match the widget exactly. If the Turnstile widget sets data-action or data-cdata, or the site calls grecaptcha.execute with an action, pass the same value. A mismatch makes the site reject an otherwise valid token.
Keep costs and usage under control
Every solve is a paid call, so treat the tools like any other side effect. The server tells the model this and marks the tools as non-idempotent, and clients such as Claude Code ask for approval before running them unless you allow them.
get_balance is free and shows the balance and the captchas-per-minute limit before a large run. Rate-limited and temporarily failing calls are retried twice with backoff, and timeouts are never retried, so a single prompt never pays twice for the same solve.
Finally, use the solver only where you are allowed to automate: your own sites, QA environments, and sites whose terms permit it.