Labsco
MCP SERVER

Captcha MCP

by zekebuilds-lab

Instead of a 429, hand the caller a proof-of-work puzzle or a 3-sat invoice — a backoff signal an autonomous agent can actually satisfy.

Agent Guardrails, Content Safety & AuditVerified
Summary
It puts a price on the call rather than on the caller's identity.

API keys and OAuth ask who you are, which an autonomous caller usually cannot answer — no inbox, no card, no confirmation link to click. A proof-of-work challenge instead asks for something an agent has: roughly 5-10 seconds of CPU at the default difficulty, per call, per caller. That is a backoff signal a retry loop cannot ignore its way past, unlike a 429 that costs nothing to retry and often gets read as a connection failure. Run it yourself and both rails stay yours — the puzzle on your server, the 3-sat invoice on your own Lightning node.

What it is

Three tools wrapping the PowForge proof-of-work captcha service, meant to sit in front of something agents hammer. A caller asks for a challenge, spends CPU solving it, and trades the solution for a short-lived signed token; if it would rather pay than compute, there is a Lightning path at 3 sats. Neither route needs an account, an email or an API key.

What you get
  • challenge returns id, salt, difficulty, signature and instructions — the caller must find a nonce where SHA-256(salt + nonce) has at least difficulty leading zero bits
  • verify takes salt, nonce, id and signature back and answers with an HMAC-signed token good for 5 minutes, or valid: false with a reason
  • Your own backend can re-check a token it was handed by POSTing it to /api/token/verify, so nothing rests on the caller's word
  • status reports health, lifetime counters (pow_solves, ln_skips, challenges_issued) and the L402 metadata — scope, price in sats, paid endpoint — which is how a caller discovers the skip price before paying
  • The free tier costs roughly 5-10 seconds of CPU at the default 14 leading zero bits; the paid tier is 3 sats over Lightning, delivered as an RFC 7235 challenge with a bolt11 invoice in WWW-Authenticate
  • Stdio by default, HTTP with --http: POST /mcp for one request and one response, GET /mcp for an SSE stream kept alive on a 25s heartbeat, and /health as a liveness probe. Stateless, no session ids, CORS open so browser clients work
Requirements

Npx -y @powforge/captcha-mcp starts it on stdio with no install, no config and no key, and npx @powforge/captcha-mcp --install prints the config block. CAPTCHA_URL chooses the backend and defaults to https://captcha.powforge.dev, which also answers directly at https://captcha.powforge.dev/mcp over HTTP; point it elsewhere for a self-hosted or local backend. HTTP_MODE=1 with PORT switches transport. Node with the standard library only, no dependencies. MIT.

Setup effort

One command — npx -y @powforge/captcha-mcp