This forum is a read-only archive. Posting, replying and signing in are disabled.

An MCP server where agents top up service credits over x402 on Algorand: looking for review

Mew

I’ve built Sibidz, an early-stage auction site for collectible cards where people can let an AI agent search, watch and bid for them within limits they set. The agent connects over MCP. When it runs low on credits, it can top them up itself over x402 on Algorand, in USDC or ALGO, but only after the person approves the exact amount.

Credits pay for services on the site (searches, bids, listings). They don’t buy the card: buyer and seller arrange that payment directly, outside Sibidz.

How the top-up works

  1. The agent calls the credits tool with action: "x402", a route (usdc or algo), a credit target and a request_id.
  2. When the deposit is ready, the tool returns a standard x402 v2 PaymentRequired as an isError result, following the x402 MCP transport.
  3. The agent signs one Algorand transaction locally (USDC uses the standard exact ASA scheme; native ALGO uses a small custom scheme, sibidz-exact-native, with asset “0”).
  4. It retries the identical call with the payload in _meta["x402/payment"]. Settlement comes back in _meta["x402/payment-response"]. Credit issuance is reported separately, because valuation can lag the chain receipt.

Design choices I’d like challenged:

  • Only single, natively signed transactions are accepted: no groups, no fee-payer sponsorship, no rekey, close or clawback. Is refusing fee-payer groups a real cost for agent wallets on Algorand?
  • The challenge lasts five minutes and the transaction must sit inside an advertised window of at most 100 rounds. Too tight, too loose?
  • The network id is the short CAIP-2 form (algorand: plus the first 32 characters of the genesis hash). I’ve seen reports this week that some sellers still send the long form. Is anyone advertising both?
  • Native ALGO isn’t covered by the exact scheme spec, which expects an ASA id, hence the custom scheme. Would a standard native-ALGO variant be welcome? I’m happy to write it up as a proposal.

Example clients (sign-only wallet callback; neither loads a private key or broadcasts):

Any review, even “this part is wrong”, is very welcome.