Repository navigation
v0.5.0 — works with claude.ai's new MCP version, wallet-signed spending grants, and a cart per conversation
CredentAgent lets an AI agent act for someone — buy something, pass an age check — only after that person proves it with a credential from their phone wallet. This release makes the reference store work with the newest version of MCP (the protocol AI apps like claude.ai use to talk to tools), lets a phone wallet sign spending permissions, and fixes a shared-cart leak in multi-server deployments.
Upgrading from 0.4 — three changes to know about
- The storefront now uses the MCP SDK v2 packages (
@modelcontextprotocol/server,/node,/express, and/ext-apps2) instead of@modelcontextprotocol/sdk. If you run the store withcreateStorefront()andstore.listen(), there is nothing to do. If you connectstore.mcpServer()to a transport yourself, it is now a v2McpServer— use the v2 transports. Requires Node.js 20+ andzod4.2+. - Spending grants now need a wallet signature by default. A grant's approve link opens a signing step on the phone, and the grant only becomes spendable once the wallet signs its exact limits. To keep the old click-to-approve page, pass
signing: "page"when you create the grant. - Carts on MCP 2026-07-28, and in
statelessMcpmode, are keyed by a cart id. Those connections have no session, so the store hands out acartIdwith the first cart-related result, and every later cart call passes it back. Claude and the built-in product picker do this for you; a custom client should passcartIdalong too.
What's new
- Works with MCP's July 2026 version (2026-07-28) — the version claude.ai now uses — on the same
/mcpendpoint as before; apps on the older version keep working unchanged. A spending grant's follow-up questions use the new protocol's built-in "I need more information" answer when the app supports it. - Each conversation gets its own cart in
statelessMcpmode. Previously, a store runningstatelessMcp: true(the multi-server mode for hosts like Vercel) gave every shopper the same cart. If you deploy withstatelessMcp, upgrade. With a sharedstorage, a conversation's cart now follows it from server to server. - Wallet-signed spending grants. The phone wallet signs the grant's limits (budget, per-purchase cap, what it may buy) before the agent can spend anything.
- Grants pinned to one product. Tell the store what you want in your own words ("black court sneakers, size 10"); it asks follow-up questions until the product is exact, and the grant can buy that product and nothing else.
- Grants that say what they can't buy. Before you approve, the page shows what the grant can't buy yet and lets you fix it — for example, prove your age so age-restricted items become buyable, or show a loyalty card for a discount on every purchase.
- Grant cards. A spending grant now appears as a visual card in the conversation instead of a sentence.
list-productsand batch lookups. Agents can read the catalog as plain data (filter, search, page through it) and look up several products in one call.redisStorage.fromEnv()reads the standard Vercel KV or Upstash environment variables, so one server file runs in memory locally and on shared storage when deployed.- The gate can identify itself to the wallet (
readerIdentity), so the wallet no longer warns that the website asking for the data is unknown.
Fixes
- Placing an order the server can't find is now refused, instead of reporting "✓ Order placed" for a purchase that never happened.
- When an order is refused at payment, the page tells the buyer why and what to do, instead of showing a row of green checkmarks.
- The payment rail uses the fingerprint (hash) method the wallet actually used when it checks that the wallet approved the exact amount, and explains a failed check in plain words.
What this release does not change
The credential checks still don't verify who issued a credential. Age and loyalty checks report trust_level: "presence-only-demo": they enforce that the right claim is disclosed and bound to this request, but a self-made credential would pass. Wallet-signed grants report "device-signed": the signature is real, but the wallet's key isn't anchored to a trusted issuer. Treat both as demos, not safety controls. No real money moves on the demo payment rails.
Full list of changes: v0.4.0...v0.5.0