Skip to main content

capsolver-mcp

MCP Server for CapSolver — expose captcha-solving capabilities to AI agents via the Model Context Protocol.

See the capsolver-ai-hub repo for integration examples and the full documentation.

For detailed MCP client setup (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and more), see docs/mcp-integration.md.

Install

pip install capsolver-mcp
pip install capsolver-mcp[browser]   # with Playwright support (for detect/solve_on_page)

All tools read the API key from the environment:

# bash / zsh
export CAPSOLVER_API_KEY="your-capsolver-api-key"

# PowerShell
$env:CAPSOLVER_API_KEY = "your-capsolver-api-key"

# cmd
set CAPSOLVER_API_KEY=your-capsolver-api-key

Usage

CLI

# stdio (default — for local MCP clients like Claude Desktop)
capsolver-mcp

# SSE (for remote / HTTP access)
capsolver-mcp --transport sse --host 0.0.0.0 --port 8000

# Streamable HTTP (MCP 2025-03-26 spec)
capsolver-mcp --transport streamable-http --host 0.0.0.0 --port 8000

CLI options

capsolver-mcp [OPTIONS]

  --transport {stdio,sse,streamable-http}
                              Transport protocol (default: stdio)
  --host HOST                 Bind host for SSE/HTTP transports (default: 127.0.0.1)
  --port PORT                 Bind port for SSE/HTTP transports (default: 8000)
  --api-key KEY               API key (fallback: CAPSOLVER_API_KEY env)
  --name NAME                 Server name (default: capsolver)

Programmatic

from capsolver_mcp.server import create_server

server = create_server(
    api_key="your-key",       # or set CAPSOLVER_API_KEY env var
    server_name="capsolver",  # name advertised to MCP clients
    host="127.0.0.1",         # bind host for SSE / HTTP transports
    port=8000,                # bind port for SSE / HTTP transports
)
server.run(transport="sse")   # or "stdio" or "streamable-http"

Note: host and port are constructor parameters on create_server() (forwarded to FastMCP), matching the MCP Python SDK 1.x API.

Configure in Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "capsolver": {
      "command": "capsolver-mcp",
      "env": {
        "CAPSOLVER_API_KEY": "your-key"
      }
    }
  }
}

Available tools

Tool Browser? Description
solve_captcha No Solve a captcha by type + site params (token mode)
detect_captchas Yes Scan a page URL and list present captcha types
solve_on_page Yes Detect + solve + autofill all captchas on a page
get_balance No Check account balance and packages
get_supported_captchas No List all supported captcha types and handlers

Browser-based tools (detect_captchas, solve_on_page) require the browser extra:

pip install capsolver-mcp[browser]
playwright install chromium

Development

git clone https://github.com/capsolver-ai/capsolver-mcp.git
cd capsolver-mcp
uv sync --all-extras          # or: pip install -r requirements-dev.txt
uv run pytest                 # run tests
uv run ruff check src tests   # lint

License

MIT

Release files for capsolver-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capsolver-mcp 0.1.2
File Size Uploaded
capsolver_mcp-0.1.2.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capsolver-mcp 0.1.2
File Interpreter ABI Platform
capsolver_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size:27.9 kB

Release files / capsolver_mcp-0.1.2.tar.gz

Download URL capsolver_mcp-0.1.2.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f24933070d85419e90db65f13858e150f48c25e3d39ce7abffa2bf780df977cb
BLAKE2b-256 checksum
How to use checksums
acd0489ad820c88bf95f59c4e5dc14483ce082ca9116316b9f6577b66782cb77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / capsolver_mcp-0.1.2-py3-none-any.whl

Download URL capsolver_mcp-0.1.2-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bbfa800421f4a215a00b7a1a377ca984b67e6c35c0326b621bfb3bcca54c903
BLAKE2b-256 checksum
How to use checksums
a7abe0c8090b878ae0f9d1a88d3aad9d17932df95246777b8d7d228058d9e6c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page