Captcha Mcp

io.github.zekebuilds-lab由 GitHub 帳號 zekebuilds-lab 發布v0.1.1更新於 Oct 24, 2026

Charge AI agents per-call without accounts. PoW solve = free tier, Lightning = paid tier.

發布方自己的服務:captcha.cc Human Verification

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,發放工作量證明或閃電網路付費挑戰,讓助理從 PowForge 驗證碼後端取得短期存取權杖。

可以做什麼
申請新的工作量證明謎題,回傳其 id、salt、難度與簽章。提交解出的 nonce,換取五分鐘有效的簽章存取權杖。查詢後端健康狀態、累計統計與付款端點中繼資料。可選擇以 HTTP 方式執行,提供健康檢查與事件串流端點,取代 stdio。
適用情境
當你希望助理不需帳號、電子郵件或 API 金鑰就能通過 PowForge 的工作量證明或閃電網路門檻,或在本機測試自架的驗證碼後端時使用。
執行需求
透過 npx 在本機執行,需要 Node.js;不需安裝、設定或 API 金鑰。環境變數 CAPTCHA_URL 指定後端,預設指向本機位址,正式使用需改為公開的 PowForge 端點。需要能連線該後端的網路。
安裝前請注意
付費方案會花費真實資金:每次呼叫 3 sats,透過閃電網路支付,助理可能產生費用。解出的挑戰與權杖會傳送到所設定的後端,預設為第三方服務。權杖有效期短,應由伺服器端驗證,而非直接信任代理提交的權杖。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Captcha Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@powforge/captcha-mcp

Your MCP server returns 429 when agents pound it. captcha-mcp makes them earn their next call instead. Hand the agent a proof-of-work puzzle (free, ~5s of CPU) or a 3-sat Lightning invoice — both are machine-readable backoff signals an autonomous caller can satisfy without an account, email, or API key.

Three tools over stdio or HTTP. Stdlib only. No signup, free fallback, self-hosted, no revenue share.

Why not 429?

429 Too Many Requests is the wrong shape for the agent era. Three patterns recur across MCP server reports:

  • Agent frameworks treat 429 as a connection failure. They retry immediately, often with exponential backoff that is still too aggressive, and amplify the overload that triggered the limit in the first place.
  • There is no per-caller signal. A 429 fires for the bucket, not the agent. One noisy caller gets every other caller throttled, and the server has no way to ask the noisy one to slow down specifically.
  • Retry-After is advisory and frequently ignored. Agents do not consistently parse it, do not consistently respect it, and have no incentive to wait — the cost of retrying is zero.

captcha-mcp replaces the 429 with a 402-style challenge. The next call costs the caller something (CPU seconds or 3 sats). That cost is per-caller, machine-readable, and self-throttling — an agent that cannot solve the puzzle cannot flood the endpoint.

Quickstart

bash
npx -y @powforge/captcha-mcp

No install, no config, no API key. The server starts on stdio and waits for an MCP client.

To wire it into Claude Code, Cursor, or any MCP-compatible host, add to your config:

json
{  "mcpServers": {    "powforge-captcha": {      "command": "npx",      "args": ["-y", "@powforge/captcha-mcp"]    }  }}

Or run npx @powforge/captcha-mcp --install to print the config block.

What it does

Wraps the PowForge pow-captcha service (captcha.powforge.dev) as three MCP tools:

ToolPurpose
challengeRequest a fresh proof-of-work puzzle. Returns {id, salt, difficulty, signature}.
verifySubmit a solved nonce. Returns a 5-minute HMAC-signed access token.
statusServer health, lifetime stats, L402 endpoint metadata.

The free tier costs the agent ~5-10 seconds of CPU time (SHA-256, default 14 leading zero bits). The paid tier costs 3 sats over Lightning via L402 (RFC 7235 + bolt11 invoice in WWW-Authenticate).

Why this and not OAuth, API keys, or Stripe

ApproachPer-call costAccount requiredSelf-hostedAgent-friendly
API keys$0yesn/ano
OAuth$0yesn/ano
Stripe meteringhigh overheadyesn/ano
Managed MCP auth platform100–2000 satsnonoyes
PoW + L402 (this)seconds or 3 satsnoyesyes

Agents do not have email addresses. They do not click confirmation links. They do not enter credit cards. PoW + Lightning is the only auth primitive that works for fully autonomous callers.

Managed MCP auth platforms work, but they charge 100–2000 sats per call on vendor infrastructure — your revenue flows through their rails. This package runs on your server, your Lightning node, your keys. You keep the sats.

Configuration

Set CAPTCHA_URL to point at a different captcha backend. Default is http://localhost:3077 so you can run the full stack locally for development. Production deployments point it at https://captcha.powforge.dev.

bash
CAPTCHA_URL=https://captcha.powforge.dev npx @powforge/captcha-mcp

HTTP Streamable transport

Hosted MCP clients (Smithery, browser-based hosts) need HTTP, not stdio. Pass --http or set HTTP_MODE=1:

bash
HTTP_MODE=1 PORT=3200 npx @powforge/captcha-mcp# ornpx @powforge/captcha-mcp --http

The server then listens on:

EndpointMethodPurpose
/mcpPOSTSingle JSON-RPC request, single JSON-RPC response. Notifications return 202.
/mcpGETSSE stream for server-pushed notifications (kept open with a 25s heartbeat).
/healthGETLiveness probe — returns {ok, server, transport}. Not part of MCP.

Stateless. No session ids. CORS open (Access-Control-Allow-Origin: *) so browser clients work. Stdio mode is unchanged and remains the default — npx @powforge/captcha-mcp with no flag still talks JSON-RPC over stdin/stdout.

Smoke test the HTTP transport:

bash
HTTP_MODE=1 PORT=3200 node src/server.js &curl -X POST http://localhost:3200/mcp \  -H "Content-Type: application/json" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}'

Returns {jsonrpc:"2.0", id:1, result:{protocolVersion:"2024-11-05", capabilities:{tools:{}}, serverInfo:{...}}}.

Local development

Clone the captcha widget repo or run the public service. The MCP server only needs HTTP access to the captcha endpoints listed under status.

bash
git clone https://github.com/zekebuilds-lab/captcha-mcpcd captcha-mcpnode src/server.js

It prints ready to stderr and waits for JSON-RPC on stdin.

Smoke-test the protocol manually:

bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}' | node src/server.js

You should see a JSON response with serverInfo: { name: "@powforge/captcha-mcp", version: "0.2.5" }.

Token verification from your own backend

When an agent submits a token to your service, verify it without trusting the agent:

bash
curl -X POST https://captcha.powforge.dev/api/token/verify \  -H "Content-Type: application/json" \  -d '{"token":"<token-from-verify-tool>"}'

Returns {valid: true, method, issued_at, expires_at} or {valid: false, reason}.

Related packages

How this compares to other MCP agent-auth primitives

The gate-the-MCP-server space is filling up. Here is the honest landscape, ranked by how directly each tool overlaps with what captcha-mcp does.

ToolPayment railAuth modelSelf-hostFree PoW tierNo account to pay
PayGatedStripe creditsAPI key + OAuth 2.1 + PKCE + M2Myes (MIT)nono (Stripe customer record per caller)
APortnone disclosedW3C verifiable creds, pre-tool hookdesign-partnernon/a (audits, does not charge)
AgentSignnone disclosedEd25519 signed passport + trust gateunknownnon/a
x402-mcpUSDC on-chainwallet signatureyesnono (needs funded wallet)
Managed MCP auth (Auth0 for AI, MintMCP)SaaSOAuth 2.0 / SAML / SSOnonono
captcha-mcp (this)Lightning (L402)PoW gate + L402 skip + free-tieryesyesyes

PayGated is the closest collision. Same "monetize MCP tools per call" pitch, same self-host + open-source posture, but it settles on Stripe. That means you need a Stripe account in good standing (KYC, a bank, a supported country) to collect, and every caller needs a Stripe customer record before it can pay you a cent. captcha-mcp's differentiator is the no-account path: a non-US agent author pays 3 sats per call in about 200ms with no KYC, or solves a free PoW puzzle if it will not pay at all.

APort and AgentSign sit at a different layer. They record who used a tool under what authority; they do not price the call. They compose with a gate like this one rather than replace it.

None of them price the act of interacting. Every other row assumes the caller is already an authorized identity and meters or audits after that. The PoW tier here is the only mechanism in the table that puts a cost on the interaction itself, not on the identity of the actor. That is the position this package defends.

A longer breakdown against x402-mcp, @agentauth/mcp, and Cloudflare ARC/ACT is at powforge.dev/mcp/compare/x402-mcp.

License

MIT

來源:README.md,提交 25c4750

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Captcha 整合