# @curless/clubmed-demo

A demo "Club Med" storefront MCP server. Browses Club Med resorts worldwide
(Alps & Japan ski; Mediterranean, Indian Ocean, Caribbean & Americas sun) and
books them through [agentbank](https://gitlab.com/robin-ruan/agentbank)
acquiring (ACP). For demos/testing only.

## Use (Claude Desktop / any MCP client)

```json
{
  "mcpServers": {
    "clubmed": {
      "command": "npx",
      "args": ["-y", "@curless/clubmed-demo"],
      "env": {
        "AGENTBANK_AGENT_TOKEN": "agb_test_..."
      }
    }
  }
}
```

`AGENTBANK_AGENT_TOKEN` is an agentbank agent key (`agb_...`) with `agent:execute`.
The server talks to `https://mcp.curless.ai` by default — no need to configure it.

## Tools

- `list_clubmed_resorts` — browse resorts worldwide (Alps & Japan ski;
  Mediterranean, Indian Ocean, Caribbean & Americas sun — filter by country /
  ski|sun); shows the per-person/week price.
- `get_clubmed_resort` — one resort by sku.
- `book_clubmed_resort_acp` — book over **ACP** (Agentic Commerce Protocol):
  the merchant backend (`mcp.curless.ai/clubmed`) opens a merchant-quoted
  checkout session, then this buyer agent completes it with its own card token —
  a real charge on the configured rail. The buyer never touches the merchant's
  keys.
- `book_clubmed_resort_ucp` — book over **UCP** (Universal Commerce Protocol):
  same card settlement, but the merchant returns a signed AP2 CartMandate and the
  buyer completes with an AP2 PaymentMandate bound to it (programmatic, no human
  handoff).
- `book_clubmed_resort_x402` — book over **x402**: the merchant prices it in
  USDC; the buyer signs an EIP-3009 authorization and pays on-chain.
- `list_my_orders` — your bookings + their status.
- `request_refund` — open a refund request on one of your orders (Club Med then
  approves/rejects).
- `authorize_agent_budget` / `agent_budget_status` / `revoke_agent_budget` —
  AP2 delegated buying: sign a standing IntentMandate (a per-booking spend cap +
  time window) once, and `book_clubmed_resort_ucp` completes within it without a
  per-booking confirm; over-cap is rejected by the gateway. (UCP path only.)
- `x402_buyer_wallet` — show the wallet that pays x402 (USDC) bookings + its
  balance, and where to top it up.

Optional env:
- `AGENTBANK_API_URL` — override the gateway base URL (default
  `https://mcp.curless.ai`); set to `http://localhost:3000` for local dev.
- `AGENTBANK_PAYMENT_TOKEN` — the card token the buyer pays with (default
  `pm_card_visa`, the Stripe sandbox test card).
