402cron

السجل الرسمي الذكاء الاصطناعي والوكلاء

Paid cron for AI agents: we call your https URL on schedule, signed. No account, paid with x402.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http 402cron 'https://402cron.com/mcp'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "402cron": {
            "type": "http",
            "url": "https://402cron.com/mcp"
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. 402cron — cron for AI agents, paid per delivery
  2. Links
  3. Further reading
  4. Pricing
  5. How it works
  6. What your endpoint receives
  7. Retries and pausing
  8. Limits
  9. Examples
  10. Use it from an MCP client
  11. Guarantee
  12. License

402cron — cron for AI agents, paid per delivery

402cron calls your https endpoint on a cron schedule, signs every request, and retries what fails. An agent can set it up on its own: no account, no card, no human in the loop. Payment is x402 — USDC on Base — and the only identity is the wallet that paid.

This repository holds documentation and runnable examples. The service runs at https://402cron.com; its source code is not published.

Further reading

Pricing

PackPriceDeliveriesPer delivery
trial$0.0220$0.001
starter$12,000$0.0005
month$2550,000$0.0005

The balance counts deliveries, not money, and never expires. Each delivery attempt uses one credit, so a failing delivery costs at most three. Current prices: https://402cron.com/api/pricing.

How it works

  1. Buy. GET https://402cron.com/buy/trial answers 402 with the price in the PAYMENT-REQUIRED header. Pay with any x402 client. The receipt carries your management token, shown once.
  2. Register. POST /api/destinations with {"url": "https://your.host/hook"} returns the destination id and its signing secret, shown once.
  3. Verify. Call POST /api/destinations/{id}/verify. We POST a challenge to your URL and your endpoint echoes it back. The permission then covers that path and everything below it.
  4. Schedule. POST /api/tasks with {"name", "url", "cron", "body"}. The response shows the next three runs.

Management calls take Authorization: Bearer <token>. Lost the token? Buy again from the same wallet with ?rotate=1; the old token stops working.

What your endpoint receives

Three kinds of requests arrive at the same URL. X-402cron-Event tells them apart:

X-402cron-EventWhenSignedYour endpoint should
verifyonce, when you call /verifynoanswer with the X-402cron-Challenge value as the body, within 5 s
deliveryon schedule, on retries, and when you call /runyescheck the signature and answer 2xx within 2 s
task_pausedonce, when a task pausesyesread reasonCode, fix the cause, POST the resume URL

The signature is X-402cron-Signature: sha256=<hex>, an HMAC-SHA256 keyed with your signing secret over the bytes of:

{X-402cron-Timestamp}\n{X-402cron-Delivery-Id}\n{X-402cron-Attempt}\n{METHOD}\n{path+query}\n{raw body}

The event label is not signed: branch on it, but trust what the signature covers. Delivery is at least once — the same X-402cron-Delivery-Id can arrive twice, so treat a repeat as already handled. Deliveries also carry X-402cron-Task-Id and X-402cron-Deliveries-Left.

Retries and pausing

  • A timeout or an unreachable host is retried: up to 3 attempts, 60 s and 120 s apart.
  • A 4xx or 5xx is your server's answer, so it is not retried.
  • 3 failed attempts, 20 refusals in a row, or 10 server errors in a row pause the task. You get one task_paused notice; resuming is one call.

Limits

  • cron: 5 fields, always UTC, one minute at the finest. Names (MON-FRI, JAN) and macros (@daily, @hourly, …) work; anything unsupported is refused with a code that says why.
  • Destinations must be https://.
  • Body up to 64 KB, custom headers up to 8 KB.

All limits: https://402cron.com/docs?section=limits

Examples

FolderWhat it isRun
receiver/nodea destination endpoint, no dependenciesSECRET_402CRON=… node server.mjs
receiver/pythonthe same, standard library onlySECRET_402CRON=… python server.py
clientbuy a trial with x402, register, verify, schedulenpm install, then DRY_RUN=1 node buy-and-schedule.mjs

Both receivers answer the challenge, verify signatures, drop duplicate deliveries and log pause notices. The client reads the price from the PAYMENT-REQUIRED header like any standard x402 client, caps what it may spend (MAX_USD, default $0.05), and with DRY_RUN=1 signs without paying anything. On Windows PowerShell, set variables with $env:SECRET_402CRON="…" first.

Use it from an MCP client

Claude Code:

claude mcp add --transport http 402cron https://402cron.com/mcp --header "Authorization: Bearer <token>"

Other clients: add a remote (streamable HTTP) server at https://402cron.com/mcp with the same header. get_pricing, get_docs and get_service_status work without a token. There is no purchase tool on purpose: pay over plain HTTP, because a signed payment should not travel through a model's context.

Guarantee

We guarantee that we tried to deliver your task — not what someone else's server does with it. Full terms: https://402cron.com/terms

License

The examples in this repository are MIT-licensed — see LICENSE.

الأسئلة الشائعة

ما هو 402cron؟

Paid cron for AI agents: we call your https URL on schedule, signed. No account, paid with x402.

كيف أثبّت 402cron؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http 402cron 'https://402cron.com/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج 402cron إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل 402cron مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون 402cron؟

ينشره 402cron. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.