Skip to main content

captcha-mcp-test

MCP server for solving captchas via CapMonster Cloud. It is the solve brain: it lists supported captcha types, serves CapMonster's docs, and creates/polls solve tasks against the CapMonster Cloud REST API. It has no browser of its own — pair it with a browser-driving MCP (e.g. mcp-patchright-mainworld) that does the page work (navigation, interaction, reading the live DOM/network, and injecting the solved token back into the page).

Two equivalent implementations live in this repo, same tools/behavior:

  • Python (this directory) — published to PyPI, run with uvx.
  • TypeScript (ts/) — published to npm, run with npx. See ts/README.md.

Quick start (Python / PyPI)

{
  "mcpServers": {
    "capmonster": {
      "command": "uvx",
      "args": ["captcha-mcp-test"],
      "env": { "CM_API_KEY": "YOUR_API_KEY" }
    }
  }
}

uvx runs the published PyPI package with no local clone needed. See mcp.json for a full example that also wires up the patchright companion browser MCP.

For the npm/TypeScript version, see ts/README.md.

Configuration

This server only runs over stdio (the transport MCP clients use to launch it as a subprocess), so there are no HTTP headers to carry a per-request key — set CM_API_KEY in the client's env block (see mcp.json) and every tool call in that session uses it.

Tools

  • get_supported_tasks — list captcha task types CapMonster supports (from the live OpenAPI spec).
  • get_task_parameters(task_type) — required/optional fields, variant notes, and the solution schema for a task type.
  • get_docs(url, offset, limit, section) — fetch a CapMonster doc page (docs.capmonster.cloud/api.capmonster.cloud only), with section-jump and pagination.
  • create_task(task) — submit a captcha task, returns a taskId.
  • get_task_result(task_id) — poll a task once.
  • get_task_result_wait(task_id, timeout_seconds, poll_interval_seconds) — poll a task to completion (preferred over driving the loop yourself).
  • get_actual_user_agent() — fetch a current Windows User-Agent to use as one consistent fingerprint across the browser and the solve task.
  • get_balance() — CapMonster account balance.

Workflow

capmonster_agent/SKILL.md is the step-by-step procedure for analyzing a captcha-protected page and solving it with this server paired with a patchright (or any stateful browser-automation) MCP. capmonster_agent/PROMPT.md is a copy-paste prompt that sets an agent up with both servers (Python/PyPI capmonster server via uvx) and points it at the skill. capmonster_agent/PROMPT_JS.md is the same prompt for the TypeScript/npm capmonster server, run via npx.

Development

python -m venv .venv
.venv\Scripts\activate  # or source .venv/bin/activate on Linux/macOS
pip install -e ".[dev]"
pytest

Metadata

Release files for captcha-mcp-test 0.1.1

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

Source distribution (sdist)

Source distribution for captcha-mcp-test 0.1.1
File Size Uploaded Provenance Actions
captcha_mcp_test-0.1.1.tar.gz 35.0 MB Without provenance Details for captcha_mcp_test-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for captcha-mcp-test 0.1.1
File Interpreter ABI Platform Actions
captcha_mcp_test-0.1.1-py3-none-any.whl Python 3 none any Details for captcha_mcp_test-0.1.1-py3-none-any.whl

Total release size: 35.0 MB

Release files / captcha_mcp_test-0.1.1.tar.gz

Download URL captcha_mcp_test-0.1.1.tar.gz
Size 35.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6dbc47d9f228dbdeb0828582f744bf46ad5c6b7fc1598b75b4277643b5f16e6a
BLAKE2b-256 checksum
How to use checksums
f831cce1f733d1822fb079c39963a23e76b1567fa9b812ed7ac5f088cf4c29cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / captcha_mcp_test-0.1.1-py3-none-any.whl

Download URL captcha_mcp_test-0.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f2e417f84f0483ca5e78376d0f4c87ae3110e0e35e3b6ad5825858c8eea55da
BLAKE2b-256 checksum
How to use checksums
1c8417aa35c7c96382db37b13436305743af30a2689dbaaadaa480965e55d42b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for captcha-mcp-test 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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