# Connect to Wallet passes

Try the browser demo at https://jetskibay.com/chat?server=wallet. Choose **Connect with Jetski Auth**, enter your email, verify the code, set a password, and approve access.

For a direct connection, add `https://todo.jetskibay.com/mcp` as a Streamable HTTP MCP server in an OAuth-capable client:

```sh
claude mcp add --transport http wallet https://todo.jetskibay.com/mcp
```

The server advertises Jetski Auth through protected-resource metadata. The client discovers `https://auth.jetskibay.com/api/auth`, registers dynamically, and uses authorization code with S256 PKCE and `resource=https://todo.jetskibay.com/mcp`. Request the `wallet` scope (and `offline_access` for refresh tokens). No shared API key is needed.

Manage sessions and revoke connections at https://auth.jetskibay.com/. Access tokens expire after ten minutes.

## Create a pass

Call `create_wallet_pass` with:

```json
{
  "name": "Bean & Co loyalty",
  "org_name": "Bean & Co",
  "description": "Ten coffees, one free.",
  "style": "storeCard",
  "logo_text": "Bean & Co",
  "colors": { "background": "#123524", "foreground": "#ffffff", "label": "#ffb020" },
  "fields": {
    "header": [{ "key": "points", "label": "POINTS", "value": "0" }],
    "primary": [{ "key": "member", "label": "MEMBER", "value": "Guest" }],
    "back": [{ "key": "terms", "label": "TERMS", "value": "One stamp per coffee." }]
  },
  "barcode": { "format": "qr", "message": "BEAN-{ref}" },
  "include_qr_code": true
}
```

The result includes `code`, `install_url` and, when requested, `qr_code_svg`. Open the link on an iPhone, or scan the QR, and tap **Add to Apple Wallet**. Each visitor gets their own pass with its own `serial`.

To give one known person a pass with their own values, call `issue_holder_pass` with `code`, `holder_ref` (your id for them) and `fields`, for example `{"points": "3", "member": "Ada"}`. Share the returned `personal_url`.

## Talk to holders

- `send_wallet_push` with `code` and `text` notifies every holder; add `holder` (a serial or `holder_ref`) for one person. Identical text sent twice updates silently.
- `update_wallet_pass` with `code`, `holder` and `holder_fields` changes one holder's values, such as `{"points": "4"}`. Without `holder` it changes the design for everyone. Updates are silent unless `notify` is `true`.
- `get_wallet_pass_activity` lists holders (with `devices`: 0 means the pass was removed) and recent events.
- `revoke_wallet_pass` voids the passes. It cannot be undone.

Field keys must be unique across the pass; `msg` is reserved for pushed messages. Artwork must be HTTPS PNG files under 512 KB.
