captchaai-mcp
v1.1.0Official MCP server for CaptchaAI — expose token-mode and optional Playwright browser CAPTCHA solving to AI agents.
Official Model Context Protocol (MCP) server for CaptchaAI, built with FastMCP and backed by the official captchaai Python SDK. Exposes token-mode (pure API, no browser required) tools by default, plus optional browser-mode Playwright tools (pip install "captchaai-mcp[browser]") for automatic CAPTCHA detection, extraction, solving, and injection on live URLs. Install directly from PyPI with pip or run via uvx:
Summary extracted from the README.
CaptchaAI MCP Server
Official Model Context Protocol (MCP) server for CaptchaAI, built with FastMCP and backed by the official captchaai Python SDK.
Exposes token-mode (pure API, no browser required) tools by default, plus optional browser-mode Playwright tools (pip install "captchaai-mcp[browser]") for automatic CAPTCHA detection, extraction, solving, and injection on live URLs.
- Website: https://captchaai.com/
- API Documentation: https://docs.captchaai.com/
- MCP Client Integration Guide: docs/mcp-integration.md (Claude Code, OpenAI Codex, Cursor, Claude Desktop, VS Code, Windsurf, Antigravity)
- Repository: https://github.com/CaptchaAI/captchaai-mcp
Tools
| Tool | Description | API Key Needed |
|---|---|---|
get_supported_captchas |
List the 8 token-mode CAPTCHA types with required/optional arguments and proxy/UA notes | No |
get_threads |
Get account thread usage (threads, working_threads, free_threads) |
Yes |
get_balance |
Get account balance string (balance) |
Yes |
solve_captcha |
Solve a CAPTCHA in token mode and return task_id, solution, and user_agent |
Yes |
get_captchas_params (optional [browser]) |
Open a URL in Playwright Chromium and extract CaptchaParams for every detected CAPTCHA |
Yes |
solve_url (optional [browser]) |
Open a URL in Playwright Chromium, detect, solve, and optionally inject (autofill) CAPTCHAs |
Yes |
Supported captcha_type Values
recaptcha_v2(supportsinvisible=Trueandenterprise=True)recaptcha_v3(requiresaction; supportsenterprise=Trueandmin_score)turnstilecloudflare_challenge(requiresproxy+proxytype("HTTP"or"HTTPS"); returnsuser_agent)geetest(requiresgt+challenge; returns{challenge, validate, seccode})captchafox(requiresproxy+proxytype("HTTP"or"HTTPS"); returnsuser_agent)friendly_captchalemin(requirescaptcha_id+div_id; returns{answer, challenge_uuid})
Installation
Install directly from PyPI with pip or run via uvx:
pip install captchaai-mcp
# Optional: enable browser-mode tools (get_captchas_params, solve_url)
pip install "captchaai-mcp[browser]"
playwright install chromium
Or run from a local clone:
git clone https://github.com/CaptchaAI/captchaai-mcp.git
cd captchaai-mcp
uv sync
Set your API key:
export CAPTCHAAI_API_KEY="YOUR_32_CHAR_API_KEY"
Running
# STDIO (default — for Claude Desktop, Cursor, Windsurf, etc.)
uvx captchaai-mcp
# or from source:
uv run captchaai-mcp
# Streamable HTTP (serves at http://127.0.0.1:8000/mcp)
uvx captchaai-mcp --transport streamable-http --host 127.0.0.1 --port 8000
[!NOTE] Prefer
CAPTCHAAI_API_KEYin the environment over--api-keyon multi-user hosts so the key is not visible in process listings. When using--transport streamable-http, bind to loopback or place it behind an authenticating TLS reverse proxy.
MCP Client Configuration
See the full MCP Client Integration Guide for step-by-step setup with Claude Code, OpenAI Codex CLI, Cursor, Claude Desktop, VS Code, Windsurf, and Antigravity.
Using uvx (recommended):
{
"mcpServers": {
"captchaai": {
"command": "uvx",
"args": ["captchaai-mcp"],
"env": {
"CAPTCHAAI_API_KEY": "YOUR_32_CHAR_API_KEY"
}
}
}
}
Or from a local checkout:
{
"mcpServers": {
"captchaai": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/captchaai-mcp",
"captchaai-mcp"
],
"env": {
"CAPTCHAAI_API_KEY": "YOUR_32_CHAR_API_KEY"
}
}
}
}
Development & Tests
# Run MCP server tests
uv run pytest -q
# Inspect the MCP server manifest
uv run fastmcp inspect src/captchaai_mcp/server.py:create_server
License
MIT — see LICENSE.