Skip to content
CaptchaSonic

AI Agents & MCP

Use CaptchaSonic from any AI agent — Claude Code, Cursor, Windsurf, Antigravity, n8n — through the hosted MCP server at mcp.captchasonic.com, the local npx server, or the SDK directly.

CaptchaSonic is agent-native. Any AI agent can solve CAPTCHAs through our MCP server, available two ways:

  • Hosted: https://mcp.captchasonic.com with your API key as a bearer token. Nothing to install. Recommended.
  • Local: npx -y @captchasonic/mcp-server over stdio, for clients that only support local servers.

Both expose the same five tools: solve_token_captcha, solve_image_captcha, get_task_result, get_balance and list_captcha_types. Start with the MCP Get Started guide for every client, or read the per-agent notes below. If your agent can't speak MCP, call the direct SDK instead.

Golden Path for Agents

Drop this into any agent and it can solve CAPTCHAs in one round trip:

# Claude Code (or any MCP client): add the hosted server once
claude mcp add --transport http captchasonic https://mcp.captchasonic.com --header "Authorization: Bearer sonic_xxx"
# Or, with no MCP — the same lifecycle via curl (replace TASK_ID after createTask):
curl -s https://api.captchasonic.com/createTask -H 'content-type: application/json' -d '{"apiKey":"sonic_xxx","task":{"type":"AntiTurnstileTaskProxyLess","websiteURL":"https://example.com","websiteKey":"0x4AAAAAAA..."}}'
curl -s https://api.captchasonic.com/getTaskResult -H 'content-type: application/json' -d '{"apiKey":"sonic_xxx","taskId":"TASK_ID"}'

TIP

Point an agent at MCP for AI Agents. It explains how to find sitekeys, pick the right tool and submit the token, so the agent can work without further instructions.


Claude Code

Add the hosted server:

claude mcp add --transport http captchasonic https://mcp.captchasonic.com --header "Authorization: Bearer sonic_xxx"

Prefer running it locally? claude mcp add captchasonic --env SONIC_API_KEY=sonic_xxx -- npx -y @captchasonic/mcp-server gives you the same tools over stdio.

For guided workflows install the official CaptchaSonic skill plugin. It bundles three Claude skills and connects the hosted MCP server using the SONIC_API_KEY environment variable. Export your key, start Claude Code, then run:

/plugin marketplace add Captcha-Sonic/Agent-skills
/plugin install captchasonic

Three skills then walk the agent through the common workflows:

  • captchasonic-setup — first-time MCP setup and verification.
  • captchasonic-solve — solve any CAPTCHA type with step-by-step guidance.
  • captchasonic-balance — check account balance and credit status.

TIP

Use get_balance (or the captchasonic-balance skill) as a guard before a batch of solves so the agent can stop early if credits run low.


Antigravity

Register CaptchaSonic in Antigravity's MCP configuration as a local stdio server:

{
  "mcpServers": {
    "captchasonic": {
      "command": "npx",
      "args": ["-y", "@captchasonic/mcp-server"],
      "env": { "SONIC_API_KEY": "sonic_xxx" }
    }
  }
}

Reload Antigravity's MCP servers and the CaptchaSonic tools appear in the agent's tool list.


Cursor

Open Settings → MCP (or edit ~/.cursor/mcp.json) and add the hosted server:

{
  "mcpServers": {
    "captchasonic": {
      "url": "https://mcp.captchasonic.com",
      "headers": { "Authorization": "Bearer sonic_xxx" }
    }
  }
}

Windsurf

Open Settings → Cascade → MCP Servers (or edit ~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "captchasonic": {
      "serverUrl": "https://mcp.captchasonic.com",
      "headers": { "Authorization": "Bearer sonic_xxx" }
    }
  }
}

Generic MCP

Any MCP client that supports remote servers: use https://mcp.captchasonic.com with Streamable HTTP transport and an Authorization: Bearer sonic_xxx header. VS Code, Codex and Gemini CLI configs are in the Get Started guide.

Clients that only run local servers take the standard stdio block (see Run locally):

{
  "mcpServers": {
    "captchasonic": {
      "command": "npx",
      "args": ["-y", "@captchasonic/mcp-server"],
      "env": { "SONIC_API_KEY": "sonic_xxx" }
    }
  }
}

n8n

CaptchaSonic has a verified n8n community node (n8n.io listing) that wraps 20+ captcha types into drag-and-drop workflow nodes. It works both as a standalone node and as a tool for n8n's AI Agent node.

→ Full n8n Integration Guide — step-by-step installation, credential setup, 4 workflow recipes, per-captcha-type configuration, error handling patterns, and troubleshooting.

Quick install: Settings → Community Nodes → install n8n-nodes-captchasonic → create CaptchaSonic credential with your API key → done.


Without MCP (direct SDK)

If your agent can't use MCP, call the SDK directly. A token-style CAPTCHA is a single function call.

result = solver.solve_turnstile(
    website_url="https://example.com",
    website_key="0x4AAAAAAA...",
    proxy="http://user:pass@host:port",  # optional
)
token = result["token"]

See the Python SDK and Node.js SDK pages for the full method list, or the REST API reference for the raw three-call lifecycle.