Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

One-time licenses instead of per-call fees: shipping a paid MCP server with x402

说明与用途

作者使用x402和Base主网实现了一个一次性许可证的MCP服务器,取代了按调用计费,简化了每天使用几次工具的支付流程。

问题

Per-call billing for MCP servers creates a subscription‑like experience for tools used a few times a day, making micropayments cumbersome.

结果

The MCP server successfully implements a one‑time license model, reducing payment friction for users and demonstrating that x402 can support license‑based billing.

工作流

  • 1. Client requests /api/comprar and receives a 402 response with payment details.
  • 2. Client pays via an x402‑capable facilitator and retries with an X-PAYMENT header.
  • 3. Server verifies payment, mints a license token, and returns it in a JSON response.
  • 4. Client includes the x-license header on subsequent MCP calls.
  • 5. Server validates the license hash stored in KV and enforces a 200‑call/month limit per license.

证据

Everyone writing about paid MCP servers right now is charging per call.

来源

a one-time 5 USDC payment on Base mainnet.

来源

The license travels as a plain header on every MCP call: x-license: ct_...

来源

Store only the hash. The KV namespace never sees the license token, only sha256(token).

来源

Cap heavy buyers in the product, not in the contract. 200 calls per month per license.

来源

  • 记录日期: 2026-11-01T09:43:43.484Z