@mysten-incubation/suipay-mcp 0.3.0-dev.24 → 0.3.0-dev.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ buyer-funded spend account. The buyer owns the account. The agent holds the
5
5
  delegate key and can spend only under the on-chain grant (recipient bind,
6
6
  per-payment cap, budget).
7
7
 
8
- Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.24` in MCP config for the `latest` dist-tag.
8
+ Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.25` in MCP config for the `latest` dist-tag.
9
9
  `npx -y @mysten-incubation/suipay-mcp@dev` tracks the `dev` prerelease line.
10
10
  `1.0.1` remains on the registry as a historical release; do not install it
11
11
  for new agents.
@@ -13,7 +13,7 @@ for new agents.
13
13
  ## Install
14
14
 
15
15
  ```bash
16
- claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.24
16
+ claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.25
17
17
  ```
18
18
 
19
19
  `@dev` installs the Railway-dev gateway/console defaults. A workspace
@@ -34,11 +34,10 @@ First connection is a spend-account grant plus an agent-held delegate key.
34
34
  2. Persist that delegate key locally at `~/.suipay/credentials.json`
35
35
  (mode `0600`). The process that holds this key is the only process
36
36
  that can settle.
37
- 3. Point MCP at a gateway. Default is Railway **suipay-dev**. Pass
38
- `suipay_login({ target: "local" })` or start the binary with `--local`
37
+ 3. Point MCP at a gateway. Default is Railway **suipay-dev**. Start the binary with `--local`
39
38
  for the laptop stack. Env/CLI fill the process default until a
40
- credential is bound; after login, stored `gatewayUrl` wins. Rebind
41
- with `suipay_login({ target })`.
39
+ credential is bound; after login, stored `gatewayUrl` wins. Use a separate
40
+ `SUIPAY_MCP_PROFILE` for another gateway; a tool argument cannot rebind a key.
42
41
  4. Call `pay` with `maxAmount`. On stdio the grant cap is not a default.
43
42
  An open grant returns the payee and does not sign until a later call
44
43
  names that recipient. When this process holds the grant's key and the
@@ -50,7 +49,8 @@ a browser URL, a SuiPay backend, logs, or a callback payload. Only the
50
49
  public address leaves the local process. `suipay_login` mints or reuses
51
50
  the local version-2 key at `~/.suipay/credentials.json` (mode `0600`) and
52
51
  returns `{SUIPAY_CONSOLE_URL}/connect/agent?port=&delegateAddress=&connectState=&gateway=`
53
- immediately. The owner signs in the browser; the loopback callback persists
52
+ immediately. Open that complete link in your browser (the MCP process does not
53
+ launch a browser or write a temporary launch page). The owner signs in the browser; the loopback callback persists
54
54
  key + gateway URL. Subsequent sessions reuse the file unless the grant is
55
55
  missing, expired, or revoked.
56
56
 
@@ -62,7 +62,7 @@ missing, expired, or revoked.
62
62
  | `pay` | On stdio, `maxAmount` is required. An open grant returns the gateway payee and does not sign until `recipient` names it. Otherwise prepare `spend_account` settlement and settle when this process holds the grant key. POST `json` is the paid body. Optional stdio `file` + `fileField` fill one JSON key from a local file as canonical base64 (Walrus `contentBase64`); requires `SUIPAY_MCP_FILE_ROOT`; hosted `/mcp` refuses `file` |
63
63
  | `receipts` | List settlement receipts, optionally by challenge ID |
64
64
  | `access_context` | Report current session / delegate / policy state (no secret material) |
65
- | `suipay_login` | Mint or reuse the local delegate key and return a clickable console URL (does not wait for the wallet). Default target is Railway suipay-dev; pass `target: "local"` for the laptop stack |
65
+ | `suipay_login` | Mint or reuse the local delegate key and return a clickable console URL (does not wait for the wallet). Uses the process-configured target; start with `--local` for the laptop stack |
66
66
  | `suipay_logout` | Remove local credentials |
67
67
 
68
68
  All tools remain visible before a grant is bound. `pay` and `receipts`
@@ -152,28 +152,30 @@ tool error with a `request.*` code and `nextAction: "fix_request"`.
152
152
 
153
153
  ## Targets
154
154
 
155
- Default is Railway **suipay-dev**. `--local` / `target: "local"` is laptop-only.
155
+ Default is Railway **suipay-dev**. Start with `--local` for the laptop stack.
156
156
 
157
157
  | Target | Console | Gateway | How |
158
158
  | --- | --- | --- | --- |
159
159
  | `dev` (default) | `https://suipay-dev.up.railway.app` | `https://gateway-dev-ba84.up.railway.app` | no flag, or `--dev` |
160
- | `local` | `http://localhost:3000` | `http://127.0.0.1:4340` | `--local` / `-local`, or `suipay_login({ target: "local" })` |
160
+ | `local` | `http://localhost:3000` | `http://127.0.0.1:4340` | `--local` / `-local` |
161
161
 
162
162
  ```bash
163
163
  # Railway suipay-dev (default)
164
- npx @mysten-incubation/suipay-mcp@0.3.0-dev.24
164
+ npx @mysten-incubation/suipay-mcp@0.3.0-dev.25
165
165
 
166
166
  # Laptop stack
167
- npx @mysten-incubation/suipay-mcp@0.3.0-dev.24 --local
167
+ npx @mysten-incubation/suipay-mcp@0.3.0-dev.25 --local
168
168
  ```
169
169
 
170
170
  `SUIPAY_MCP_TARGET=local|dev` selects the same preset. Explicit
171
171
  `SUIPAY_GATEWAY_URL` / `SUIPAY_CONSOLE_URL` fill the process default when no
172
172
  credential is bound yet. After a successful login, `credentials.json`
173
- `gatewayUrl` is the bound gateway: `pay` / `discover` / `suipay_login` without
174
- `target` stay on that binding so a leftover env cannot silently retarget spend.
175
- Rebind with `suipay_login({ target: "dev" | "local" })` (same key, new consent
176
- if that stack has no live grant).
173
+ `gatewayUrl` is the bound gateway: `pay` / `discover` stay on that binding so a
174
+ leftover env cannot silently retarget spend. `suipay_login` refuses a process
175
+ gateway that differs from the stored binding, with or without `target`.
176
+ A `suipay_login({ target })` argument must also match the process gateway.
177
+ To connect another environment, restart with its target and a separate
178
+ `SUIPAY_MCP_PROFILE`; the existing key binding stays unchanged.
177
179
 
178
180
  ### Isolate connection environments
179
181
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "../chunk-DEOKRJ4A.js";
4
+ } from "../chunk-CMHAJWEF.js";
5
5
  import {
6
6
  logError
7
- } from "../chunk-UWD4OSIC.js";
7
+ } from "../chunk-JSJV2KDA.js";
8
8
 
9
9
  // src/bin/suipay.ts
10
10
  main().catch((err) => {
@@ -5,7 +5,7 @@ import {
5
5
  loadMcpConfig,
6
6
  loadPaymentProfile,
7
7
  logError
8
- } from "./chunk-UWD4OSIC.js";
8
+ } from "./chunk-JSJV2KDA.js";
9
9
 
10
10
  // src/index.ts
11
11
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";