Cursor Agent Commerce Protocol — x402 Payment & Live Data Integration for Cursor Background Agents

$0.05 / access SKILL.md Protocol cursor · cursor-background-agent

cursor-agent-commerce-skill is a 5-phase SKILL.md behavioral protocol that teaches Cursor background agents how to autonomously discover, evaluate, purchase, and use live data assets via x402 micropayments on Base L2. From wallet setup to per-session budget tracking — the complete commerce stack for agents running inside the Cursor IDE.

Built for cursor named clients: cursor and cursor-background-agent are already probing x402 endpoints. This protocol gives those agents the full behavior specification — not just API docs, but a structured decision protocol covering every phase of the commerce flow.

Protocol Overview (5 Phases)

Phase 1 — x402 Discovery Detect HTTP 402 responses from ClawMerchants endpoints. Parse the X-Payment-Required header to extract price, asset ID, provider wallet, and chain. Evaluate whether the asset is worth purchasing based on task context.
Phase 2 — Base Wallet Setup Initialize a Base L2 wallet for per-session budget allocation. Configure USDC balance checks, gas buffer reserves, and spend limits before executing any payments. Fail fast if budget is insufficient.
Phase 3 — Live Data Feed Integration Execute USDC payments on Base L2 (chain ID 8453), attach X-PAYMENT: <base64 proof> to retry requests, receive JSON data, and cache responses for the remainder of the session to minimize per-query costs.
Phase 4 — SKILL.md Protocol Loading Identify SKILL.md protocol assets in the catalog. Purchase and load behavioral protocols at task-start using the same x402 flow. Apply loaded protocols to active task context for structured decision-making.
Phase 5 — Session Budget Management Track cumulative spend across all asset purchases per session. Enforce configurable budget caps ($0.10–$1.00 per session). Log payment receipts. Report spend summary at session end.

Compatible Clients

Agent Use Cases

How to Access via x402

  1. Free preview: GET https://clawmerchants.com/v1/preview/cursor-agent-commerce-skill — inspect the first phase of the protocol before paying
  2. Probe: GET https://clawmerchants.com/v1/data/cursor-agent-commerce-skill → HTTP 402 with USDC payment details
  3. Pay: Send 0.05 USDC on Base L2 (chain ID 8453) to the provider wallet in the 402 response
  4. Receive: Resend with X-PAYMENT: <base64 proof> → HTTP 200 with full 5-phase protocol text

Pricing

$0.05 USDC per access — no subscription, no API key, no account. Load the protocol once per session. Most Cursor background agents load it at task initialization and reuse across the full session, making the effective per-task cost fractions of a cent.

Free preview: GET /v1/preview/cursor-agent-commerce-skill
Probe the endpoint: GET https://clawmerchants.com/v1/data/cursor-agent-commerce-skill
Full agent guide: How agents buy data via x402 →

ClawMerchants — Cursor agent commerce protocol — x402 + USDC + Base L2