Getting Started
Connect your MCP client, confirm the account connection, and run a live image-recognition task. For supported services and the complete core tool list, see Tools & Coverage.
1. Install the core server
Check “Requires: Python” on the PyPI package page and use a Python interpreter that satisfies it. Run these commands in the Python environment your MCP client will use. The latest release installs as a standalone package. If you are upgrading, you can skip the separate capsolver-core installation step from the older guide.
python -m pip install --upgrade capsolver-mcp
python -m pip show capsolver-mcp
python -m capsolver_mcp --helpCompare the installed version shown by the second command with the latest release on PyPI. If they differ, check your Python version and package index. The third should print the command-line options. If you use uvx, run uvx --upgrade capsolver-mcp --help to refresh the cached package and check its entry point.
2. Connect your client
For clients that accept an mcpServers object, add the entry below. Set command to the absolute path of the Python executable used in section 1. On macOS, Linux, or Windows, run python -c "import sys; print(sys.executable)" in that environment to find the path. Replace YOUR_API_KEY in your local client settings with your CapSolver API key.
{
"mcpServers": {
"capsolver": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["-m", "capsolver_mcp"],
"env": {
"CAPSOLVER_API_KEY": "YOUR_API_KEY"
}
}
}
}To use uvx, set command to uvx and args to ["capsolver-mcp"]. On Windows, use forward slashes or escape each backslash in a JSON or double-quoted TOML path.
Claude Desktop and Cursor
Add the service configured above in the client’s MCP settings, save, and reconnect. The core tool list should include get_account_balance and list_task_types.
VS Code
Open the MCP settings for the extension you use, such as Copilot or Claude. Select local STDIO and enter the Python path, arguments, and environment variable from the configuration above. Configuration files and top-level fields vary by extension. VS Code MCP configuration reference
Codex
Add the following entry to your project’s .codex/config.toml. Replace the path and key, open the trusted project, and start a new chat. Use /mcp to see the service. Keep API keys in private client settings. If this project file is shared or tracked by Git, configure the server in your private Codex configuration instead.
[mcp_servers.capsolver]
command = "/absolute/path/to/.venv/bin/python"
args = ["-m", "capsolver_mcp"]
[mcp_servers.capsolver.env]
CAPSOLVER_API_KEY = "YOUR_API_KEY"3. Confirm the connection
Send this prompt to check the connection without creating a paid task:
List the task types supported by CapSolver, look up the inputs and result fields for
ImageToTextTask, and check the account connection. For the account check, report only the connection status and execution mode.
If the catalog appears, the client is connected to the MCP server. A balance response with ok: true and execution_mode: provider also confirms live account access. A zero balance still means the connection works, but a paid task needs available credit.
| Ask your client | Expected result |
|---|---|
| “Use the CapSolver balance tool and tell me only whether the connection works.” | get_account_balance returns ok: true, execution_mode: provider, and a numeric account.balance. In offline mode, the execution mode is offline_simulated. |
“What inputs does ImageToTextTask require, and which field contains the result?” | The client calls get_task_schema and shows the inputs and result structure. This lookup does not submit a task. |
| “Read the text in this test image.” | Once you supply the image, the client can submit an ImageToText task. For state: ready, read the common module’s text from solution.text. For processing, keep the task_id and wait for the result. |
After a wait timeout, keep checking the original task_id. If the connection drops during submission before a task ID arrives, look up the request using the request_id you saved. For a web test, ready means CapSolver produced a result. Check the website’s confirmation or application response to see whether it accepted the submission.
4. Run a real image-recognition task
Save the image below and attach it to your chat. This example submits a live OCR task through the core server and uses account credit.
Use CapSolver’s
ImageToTextTaskwith the common module to read the attached image. Use the image contents as input and return the execution mode and recognized text.
For the supplied test image, the expected live response is execution_mode: provider, state: ready, and solution.text: "57382". If the client cannot read the attachment, give it an image file it can access. The body field takes the Base64-encoded image contents.
5. Add a browser service (optional)
For a request such as “Read the digits in this test image,” the core server is sufficient. Add a separate browser server when you need to inspect page state, fill in a result, or check a submission on a website you own or have permission to test.
python -m pip install --upgrade "capsolver-mcp[browser]"
python -m playwright install chromiumRegister the browser service as a second MCP entry. For clients that accept mcpServers, the combined configuration is:
{
"mcpServers": {
"capsolver": {
"command": "/absolute/path/to/.venv/bin/python",
"args": [
"-m",
"capsolver_mcp"
],
"env": {
"CAPSOLVER_API_KEY": "YOUR_API_KEY"
}
},
"capsolver-browser": {
"command": "/absolute/path/to/.venv/bin/python",
"args": [
"-m",
"capsolver_mcp.browser_server"
]
}
}
}Use the Python interpreter where you installed the browser dependencies. Only the core server needs the CapSolver API key. Reconnect the client and confirm that it can discover both services.
You can also use the Patchright server with Google Chrome and the Node.js version specified in the linked setup guide. Enabling its optional CapSolver workflow adds tools to the native browser toolset. Choose the browser service that fits your client. Browser service setup
For a browser task, check the page after applying the result. A returned solution is not the same as acceptance by the target website.
6. Other startup modes
Local desktop clients usually start the core server over STDIO. To start it manually, run python -m capsolver_mcp. The process waits for MCP requests on standard input.
| Mode | Command |
|---|---|
| Local STDIO (default) | python -m capsolver_mcp |
| Offline simulation without an API key | python -m capsolver_mcp --offline |
| Local Streamable HTTP | python -m capsolver_mcp --transport streamable-http --host 127.0.0.1 --port 8000 |
| Local SSE | python -m capsolver_mcp --transport sse --host 127.0.0.1 --port 8000 |
7. Upgrade from an earlier release
Back up your client configuration, then run the installation command in section 1 in the intended Python environment. If your existing entry launches capsolver-mcp and uses env.CAPSOLVER_API_KEY, you can keep it. If it uses CAPSOLVER_API_KEY_FILE, replace that setting with the key value in env.CAPSOLVER_API_KEY. Remove —mode compatibility if it appears in a pilot configuration.
| Legacy tool | Current equivalent |
|---|---|
get_balance | The alias still works. Read the balance from account.balance. |
get_supported_captchas | Use list_task_types to find a type and get_task_schema to inspect its parameters. |
solve_captcha | Use create_task. If processing continues, retrieve the result using the returned task_id. |
detect_captchas | Use browser_detect_captchas on the independent browser server. |
solve_on_page | Update scripts that used this single call. The browser now reads the page, the core processes the task, and the client checks the outcome on the page. |
Restart the client, open a new chat, and confirm that the core tool list includes get_account_balance and list_task_types. Use the balance check in section 3 to verify the connection. Upgrade and rollback guide
Need help?
Open Troubleshooting for installation, account, validation, timeout, and browser issues.