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:
hostandportare constructor parameters oncreate_server()(forwarded toFastMCP), 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/mcp-capsolver.git
cd mcp-capsolver
uv sync --all-extras # or: pip install -r requirements-dev.txt
uv run pytest # run tests
uv run ruff check src tests # lint
License
ISC
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capsolver_mcp-0.1.0.tar.gz.
File metadata
- Download URL: capsolver_mcp-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23132f2e1850df95d60275564cc35b32977fa74d580b072cf54cd6643a7f1d37
|
|
| MD5 |
32dc6c31efa8305f4a61353e36ed1530
|
|
| BLAKE2b-256 |
7cbe671a6c49b90e8ecd00fd13178a51e47406702fe9a3dc75cae98bcfcd05bb
|
File details
Details for the file capsolver_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: capsolver_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63483b5cc1ad89812344b77b28031709297e43208d10abdc8f9bff83afee8902
|
|
| MD5 |
6a45219e30535b3062f0333ce90aae60
|
|
| BLAKE2b-256 |
62e5e9dfbba3739b3153c6580f2387b8b7f8b26db673a255849f1aeaf27fd8d5
|