Skip to content

MCP Tools Reference

Every tool the CaptchaSonic MCP server exposes — parameters, supported CAPTCHA types, answer formats and errors.

The hosted server (https://mcp.captchasonic.com) and the local package (@captchasonic/mcp-server) expose the same five tools. Solves are billed to your API key at normal API prices; failed and timed-out solves are refunded.

Solve token CAPTCHA

solve_token_captcha

Solves a token CAPTCHA on a web page and waits for the token (usually 5–60 seconds). Clients that support progress notifications see "Solving… Ns" updates while it runs.

ParameterTypeDescription
typestringOne of the token types below.
website_urlstringFull URL of the page with the CAPTCHA.
website_keystringSitekey from the page: data-sitekey, the render= parameter, or GeeTest captchaId (v4) / gt (v3). Required for most types.
proxystringOptional. Solve through your proxy, e.g. http://user:[email protected]:8080. Omit to solve without one.
metadataobjectOptional extra challenge data, e.g. { "rqdata": "…" } for enterprise pages or { "gt": "…", "challenge": "…" } for GeeTest v3.
task_timeoutintegerOptional. Seconds the solver may take, 60–120 (default 120).
wait_for_resultbooleanOptional, default true. false returns a task_id immediately; fetch the token with get_task_result.
typeCAPTCHARequiredPrice
recaptcha_v2reCAPTCHA v2 (checkbox, invisible)website_url, website_key$0.0005
recaptcha_v3reCAPTCHA v3website_url, website_key$0.001
turnstileCloudflare Turnstilewebsite_url (sitekey recommended)$0.0005
cloudflare_challengeCloudflare challenge page (cf_clearance)website_url$0.0005
popularcaptchaPopularCaptcha / hCaptcha-stylewebsite_url, website_key$0.0025
geetestGeeTest v3 / v4website_url, website_key$0.0005
mtcaptchaMTCaptchawebsite_url, website_key$0.0005

Result

{
  "task_id": "9f2c4e1a7b3d5c60",
  "status": "ready",
  "token": "0.Zm9vYmFy…",
  "user_agent": "Mozilla/5.0 …",
  "cookies": { "cf_clearance": "…" }
}

Submit token with the page's form field (g-recaptcha-response, cf-turnstile-response, h-captcha-response, …). For cloudflare_challenge, set the returned cookies and send requests with the same user_agent (and the same proxy, if you used one). If the result is "status": "processing", call get_task_result with the task_id.

Solve image CAPTCHA

solve_image_captcha

Solves an image or audio CAPTCHA and returns the answer immediately.

ParameterTypeDescription
typestringOne of the image types below.
imagesstring[]Challenge images in order (1–50): raw base64, data: URLs, or public http(s) URLs. Max 5 MB each and about 7.8 MB for all images and examples together.
questionstringThe prompt exactly as shown, e.g. Select all images with a bus.
question_typestringpopularcaptcha_image only: objectClassify, objectClick, objectDrag, objectTag, grid, bbox, bboxdd.
examplesstring[]Up to 3 reference images, e.g. the slider piece.
website_urlstringOptional page URL; improves some solvers.
module, numeric, case_sensitive, max_lengthOCR options.
typeCAPTCHARequiredquestionAnswer
popularcaptcha_imagePopularCaptcha / hCaptcha-style imageimages, questionThe prompt; set question_type if knownClassify: boolean per image. Click: {x,y} points per image. Drag: {start,end} per image.
recaptcha_v2_imagereCAPTCHA v2 gridimages, questionTarget, e.g. traffic lights, or a /m/ codeOne 3x3/4x4 grid image: 0-based indices of matching tiles. Separate tiles: boolean per tile.
geetest_imageGeeTest nine-grid, click, slide, matchimages, questiongeetest_nine:<prompt>, geetest_click:<prompt>, geetest_slide (piece in examples), matchNine: boolean per cell. Click: click coordinates. Slide: [x, y] offset. Match: two cell indices.
aws_waf_imageAWS WAF gridimages, questione.g. Choose all the chairs0-based indices of matching tiles.
tiktok_imageTikTok whirl, slide, clickimages, questiontiktok_whirl, tiktok_slide (both need examples), tiktok_clickSolver answer (rotation / offset / clicks) in a one-element list.
binance_imageBinance grid, slideimages, questionbinance_grid:<target>, binance_slide (piece in examples)Grid: matching tiles. Slide: [x, y] offset.
tencent_imageTencent grid, click, slideimagestencent_grid:<target>, tencent_click (needs examples), tencent_slide (default)Grid/click: {sol: [[x, y]…], size}. Slide: [x, y] with size.
prosopo_imageProsopo / Procaptchaimages, questionThe promptMatching grid cells.
slide_imageGeneric sliderimages—[x, y] offset. Background first, piece second (or in examples).
ocrText imageimages—One string per image.
mtcaptcha_imageMTCaptcha textimages—One string per image.
audioAudio challengeimages (the audio file)—Transcribed text.

Every result includes answer_format, a plain-language description of how to apply answers.

Get task result

get_task_result

ParameterTypeDescription
task_idstringtask_id from solve_token_captcha.

Returns the same shape as solve_token_captcha. Results expire a few minutes after they are ready.

Get balance

get_balance

No parameters. Returns balance_usd and the active plan with its limits.

List CAPTCHA types

list_captcha_types

No parameters. Works without an API key on the local server (the hosted server needs a key to connect). Returns every supported type with required fields, answer format and price. Agents call it when they are unsure which type to use.

Errors

Errors come back as tool errors with a code and a next step, for example:

ERROR_ZERO_BALANCE: CaptchaSonic API error 10
The account has no balance. Top up at https://my.captchasonic.com.
CodeMeaning
ERROR_KEY_DOES_NOT_EXISTAPI key missing, wrong or revoked.
ERROR_ZERO_BALANCETop up your balance.
ERROR_CAPTCHA_UNSOLVABLECould not be solved; load a fresh challenge and retry. Refunded.
ERROR_CAPTCHA_TIMEOUTNot solved within task_timeout. Refunded.
ERROR_MISSING_REQUIRED_FIELDSA required parameter for this type is missing.
ERROR_DAILY_LIMIT_EXCEEDED, ERROR_MINUTE_LIMIT_EXCEEDEDPlan limits reached.
ERROR_SERVICE_UNAVAILABLEBusy; retried automatically, then reported.

The hosted server also returns HTTP 401 when the Authorization header is missing and 429 when a key sends more than 120 MCP requests per minute (every tool call and connection setup counts).