@zktx.io/sui-mcp 0.6.2 → 0.7.0
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 +13 -12
- package/dist/adapters/adapterPromptSurfaces.js +1 -1
- package/dist/core/read/deepbookReadHelpers.js +1 -1
- package/dist/core/read/readResponseGuidance.js +6 -6
- package/dist/core/session/settingsFileProtocol.js +1 -1
- package/dist/mcp/prompts.js +10 -4
- package/dist/mcp/resources.js +1 -1
- package/dist/mcp/server.js +2 -2
- package/dist/mcp/serverInfo.js +13 -12
- package/dist/mcp/toolNames.js +46 -46
- package/dist/mcp/tools/action/prepareSuiActionReview.js +4 -4
- package/dist/mcp/tools/read/deepbookReadTools.js +1 -1
- package/dist/mcp/tools/read/index.js +2 -2
- package/dist/mcp/tools/read/readToolHelpers.js +1 -1
- package/dist/mcp/tools/read/serverStatusTools.js +4 -5
- package/dist/mcp/tools/read/transactionActivityTools.js +3 -3
- package/dist/mcp/tools/session/walletConnectionTools.js +5 -5
- package/dist/mcp-app/account.html +1 -1
- package/dist/mcp-app/chart.html +1 -1
- package/dist/mcp-app/connect.html +1 -1
- package/dist/mcp-app/receipt.html +1 -1
- package/dist/mcp-app/review.html +1 -1
- package/dist/mcp-app/settings.html +1 -1
- package/dist/runtime/application.js +2 -2
- package/dist/runtime/config.js +3 -6
- package/dist/runtime/localSettingsService.js +4 -4
- package/dist/runtime/shared/control.js +2 -2
- package/dist/runtime/smokeMainnetRead.js +18 -18
- package/dist/runtime/smokeReview.js +7 -7
- package/dist/runtime/start.js +1 -1
- package/docs/AGENT_BEHAVIOR.md +78 -77
- package/docs/LOCAL_DB_ARCHITECTURE.md +5 -7
- package/docs/MCP_SETUP.md +76 -73
- package/docs/MCP_TOOLS.md +103 -102
- package/docs/SDK_API.md +8 -5
- package/docs/SIGNABLE_ADAPTER_CONTRACT.md +6 -6
- package/docs/TRANSACTION_ACTIVITY_LOG.md +7 -7
- package/docs/UTILITY_INDEX.md +59 -59
- package/docs/WALLET_CONNECTION.md +6 -5
- package/package.json +1 -1
- package/protocols/deepbook-margin.md +1 -1
- package/protocols/deepbook-v3.md +2 -2
|
@@ -96,7 +96,7 @@ WAL mode can create companion files next to the main database, such as `sui-mcp.
|
|
|
96
96
|
- `local_settings`: allowlisted local settings. The current key set is `suiGrpcUrl` and `suiGraphqlUrl`, stored as JSON-encoded text and applied after restart.
|
|
97
97
|
- `coin_metadata_cache`: account-independent positive cache for Sui coin metadata used only to format wallet balance display amounts. Rows are keyed by normalized coin type and verified mainnet chain identifier, expire after 24 hours, and are excluded from local data export/import. Read or write failures for this cache block affected wallet unit reads with `metadata_cache_unavailable`; they are not reported as unavailable token decimals.
|
|
98
98
|
|
|
99
|
-
The following live session tables hold runtime session state in the shared database so
|
|
99
|
+
The following live session tables hold runtime session state in the shared database so the shared backend can serve cards and sessions created by participating clients (see [Shared local server](#shared-local-server)):
|
|
100
100
|
|
|
101
101
|
- `live_review_sessions`: the live review session record — status, bound
|
|
102
102
|
account, preparation/connection revision, current attempt reference,
|
|
@@ -228,7 +228,7 @@ All state-writing MCP callers use this owner, including reads that save activity
|
|
|
228
228
|
|
|
229
229
|
### Read cards
|
|
230
230
|
|
|
231
|
-
`live_read_cards` owns the card kind (account, receipt, chart, connect or
|
|
231
|
+
`live_read_cards` owns the card kind (account, receipt, chart, connect, review or settings), permission hash, backend owner, revision, original/accepted input, state/reason and saved result or scoped workflow operation reference. Business request status is not copied into a separate card state machine. Admission and result writes use conditional updates. Expiry is applied by the backend to unsubmitted input; a View timer only requests state. Frame recreation and chat navigation perform no close transition. The backend rejects late writes after local data replacement or owner changes, and recovery closes unfinished cards without repeating their source query.
|
|
232
232
|
|
|
233
233
|
The same record contains a model-safe result and, for receipts, separately validated UI-only input values and PTB display data. They are projections of one source read. They are not activity evidence or serialized signing material. Public saved resources exclude the private partition, and product backups exclude card records and permission hashes entirely.
|
|
234
234
|
|
|
@@ -302,8 +302,7 @@ an approved address in the sole unexpired connection, with no pending connection
|
|
|
302
302
|
operation. Missing source IDs remain valid historical/import data but require
|
|
303
303
|
explicit selection before current default use. Eligibility is derived at the
|
|
304
304
|
database evaluation time and published to cards as `usableConnectionId` and
|
|
305
|
-
`assetReadAccount`; Views do not recount recorded connections.
|
|
306
|
-
table or expiry writer. Stored status, disconnection outcomes and historical
|
|
305
|
+
`assetReadAccount`; Views do not recount recorded connections. Stored status, disconnection outcomes and historical
|
|
307
306
|
account records retain their separate meanings.
|
|
308
307
|
The store reads the current run's private supervisor snapshot inside evaluation
|
|
309
308
|
and immediate admission. Missing inspection does not mean an empty service.
|
|
@@ -486,7 +485,7 @@ NDJSON event logs remain optional audit/debug logs. They are not the product act
|
|
|
486
485
|
|
|
487
486
|
Raw session tokens are not stored in SQLite. Live session records store token hashes for validation; this private state is separate from activity evidence and product backups. The activity-store evidence input types do not accept session token material, and review evidence JSON is checked with the same forbidden-field-name policy used for MCP output. Transaction bytes, signatures, serialized signing material, token-hash/session-token-like fields, seeds, mnemonics, and private-key-like field names are rejected before write. External proposal ingestion also rejects recognized Sui private-key strings, valid English BIP39 mnemonic phrases, obvious sensitive markers, and suspicious raw secret-like payloads before storing the sanitized requested intent. Generic asset metadata such as token symbols remains allowed.
|
|
488
487
|
|
|
489
|
-
The local settings table is not a secret store. It stores only allowlisted local preferences such as the Sui mainnet gRPC and GraphQL endpoints. It must not store database paths, tokens, credentials, private keys, mnemonics, seeds, or arbitrary API keys. Environment overrides such as `
|
|
488
|
+
The local settings table is not a secret store. It stores only allowlisted local preferences such as the Sui mainnet gRPC and GraphQL endpoints. It must not store database paths, tokens, credentials, private keys, mnemonics, seeds, or arbitrary API keys. Environment overrides such as `SUI_MCP_GRPC_URL` and `SUI_MCP_GRAPHQL_URL` can temporarily supersede stored endpoints without mutating the database.
|
|
490
489
|
|
|
491
490
|
Review intent capture follows one adapter convention: if an adapter wants the original requested intent materialized for activity queries, it must place that object at `ActionPlan.adapterData.requestedIntent`. The full `plan_json` remains the canonical action plan, and `intent_json` is only the query-friendly copy of that adapter-supplied intent.
|
|
492
491
|
|
|
@@ -498,7 +497,6 @@ address withdrawals, gas reservations, and their observed balance/epoch facts.
|
|
|
498
497
|
They are deeply copied and revalidated before admission, and are excluded from
|
|
499
498
|
public backup.
|
|
500
499
|
|
|
501
|
-
|
|
502
|
-
removes private material; a new review recomputes it. Historical public reviews,
|
|
500
|
+
Owner recovery removes private material; a new review recomputes funding proof. Historical public reviews,
|
|
503
501
|
admitted request facts, chain results and backup remain readable. Reading history
|
|
504
502
|
does not re-query funding or confer new signing authority.
|
package/docs/MCP_SETUP.md
CHANGED
|
@@ -6,7 +6,7 @@ It does not define tool field contracts or response wording. Use `docs/MCP_TOOLS
|
|
|
6
6
|
|
|
7
7
|
The README keeps only the short entry path; client-specific setup, restart behavior, and troubleshooting live here.
|
|
8
8
|
|
|
9
|
-
These instructions target `@zktx.io/sui-mcp@0.
|
|
9
|
+
These instructions target `@zktx.io/sui-mcp@0.7.0`. Package installation requires
|
|
10
10
|
that exact version to be published; use the developer checkout instructions when
|
|
11
11
|
it is not available. A repository rename or local build does not publish the
|
|
12
12
|
package. Changing client settings or rebuilding files does not replace an
|
|
@@ -52,7 +52,7 @@ They do not require wallet connection.
|
|
|
52
52
|
|
|
53
53
|
This placeholder is only the sender value required by DeepBook SDK simulation reads. It is not a user's wallet, signing authorization, or fake user liquidity.
|
|
54
54
|
|
|
55
|
-
Reads that require a connected default account use `
|
|
55
|
+
Reads that require a connected default account use `session_open_wallet_connection_card`. Tools with an `account` input also accept an explicit Sui address without a wallet connection.
|
|
56
56
|
|
|
57
57
|
## Developer Checkout Setup
|
|
58
58
|
|
|
@@ -130,7 +130,7 @@ per-client configuration below, which give the exact `command` and `args`.
|
|
|
130
130
|
|
|
131
131
|
The npm package for this release is `@zktx.io/sui-mcp`. The commands below
|
|
132
132
|
require the requested version to be published; confirm it with
|
|
133
|
-
`npm view @zktx.io/sui-mcp@0.
|
|
133
|
+
`npm view @zktx.io/sui-mcp@0.7.0 version` before switching. Both installation
|
|
134
134
|
methods start the same `sui-mcp` stdio MCP server. Use a local checkout when
|
|
135
135
|
working on a version that has not been published.
|
|
136
136
|
|
|
@@ -180,7 +180,7 @@ npm install -g @zktx.io/sui-mcp@latest
|
|
|
180
180
|
|
|
181
181
|
The unscoped npm package `sui-mcp` is unrelated and can provide the same global
|
|
182
182
|
command name. Always install the full `@zktx.io/sui-mcp` package and verify
|
|
183
|
-
`
|
|
183
|
+
`read_get_server_status.packageName` after starting it. If another installation
|
|
184
184
|
owns the global command, use the scoped `npx` configuration instead.
|
|
185
185
|
|
|
186
186
|
The per-client sections below use the `npx` form. To use a global install
|
|
@@ -198,7 +198,7 @@ data directory, backups and private WalletConnect store. Use the same directory
|
|
|
198
198
|
and review port in every participating client. Stop the participating MCP
|
|
199
199
|
connections and wait for the shared backend to exit, update
|
|
200
200
|
the installed package or configured version, then reopen them and check
|
|
201
|
-
`
|
|
201
|
+
`read_get_server_status` in each client. The package name, version and server
|
|
202
202
|
name must match the intended installation. Updating the package does not
|
|
203
203
|
replace a backend that is already running.
|
|
204
204
|
|
|
@@ -228,15 +228,15 @@ If a transaction request is in progress, inspect its state and coordinate a safe
|
|
|
228
228
|
restart first. A previous wallet pairing can remain in the wallet app; remove
|
|
229
229
|
an unwanted pairing there rather than assuming new local storage disconnected it.
|
|
230
230
|
|
|
231
|
-
Replace the old registration instead of adding a second one. Use
|
|
232
|
-
`sui-mcp`
|
|
233
|
-
command arguments.
|
|
234
|
-
|
|
231
|
+
Replace the old registration instead of adding a second one. Use
|
|
232
|
+
`sui-mcp` as the default registration name and select `@zktx.io/sui-mcp@0.7.0`
|
|
233
|
+
in its command arguments. A client-defined alias does not change the package,
|
|
234
|
+
server identity or permissions. Remove obsolete runtime environment overrides. If you set
|
|
235
235
|
`SUI_MCP_DATA_DIR`, choose a new empty directory; never point it at another
|
|
236
236
|
package's database or private WalletConnect store. Keep the same new directory
|
|
237
237
|
and `SUI_MCP_REVIEW_PORT` in every participating client.
|
|
238
238
|
|
|
239
|
-
After restarting the clients, call `
|
|
239
|
+
After restarting the clients, call `read_get_server_status` in each. Check
|
|
240
240
|
`packageName`, `version` and `serverName`: they must identify the intended npm
|
|
241
241
|
package and version, with `serverName` equal to `sui-mcp`. Open a new management
|
|
242
242
|
card and confirm the new empty wallet state. This check does not require signing
|
|
@@ -447,29 +447,29 @@ Restart Cursor after changing `mcp.json`. Cursor MCP logs are available from the
|
|
|
447
447
|
|
|
448
448
|
After the MCP server is connected:
|
|
449
449
|
|
|
450
|
-
1. Call `
|
|
450
|
+
1. Call `read_get_server_status` and record `packageName`, `version`, `evidencePolicy.version`, `network`, and `implementedToolsCount` before running evidence-policy checks. Use the returned numeric `implementedToolsCount` field instead of hand-counting the tool array.
|
|
451
451
|
2. Use wallet-free read tools directly when you need market context:
|
|
452
|
-
- `
|
|
453
|
-
- `
|
|
454
|
-
- `
|
|
455
|
-
- `
|
|
456
|
-
- `
|
|
457
|
-
- `
|
|
458
|
-
3. For wallet-account reads, call `
|
|
459
|
-
4. Use the internal Connect card in
|
|
452
|
+
- `read_list_deepbook_pools`
|
|
453
|
+
- `read_list_deepbook_tokens`
|
|
454
|
+
- `read_get_deepbook_mid_price`
|
|
455
|
+
- `read_inspect_deepbook_orderbook`
|
|
456
|
+
- `read_quote_deepbook_action`
|
|
457
|
+
- `read_quote_deepbook_display_amount`
|
|
458
|
+
3. For wallet-account reads, call `session_open_wallet_connection_card`.
|
|
459
|
+
4. Use the internal Connect card in an MCP Apps-capable client and explicitly choose the connection operation.
|
|
460
460
|
5. Scan the card’s pairing QR in a Sui mainnet wallet and approve the connection. This is not approval of a transaction.
|
|
461
461
|
6. Read or wait on the returned cardId. A card that still needs a selection does not have a pending pairing. Select an approved account explicitly if the wallet provides several.
|
|
462
|
-
7. Call `
|
|
462
|
+
7. Call `session_get_interaction_status` to check the connection and available default asset account. `account_get_active_account` separately reports the stored selection.
|
|
463
463
|
Then call the read tool that matches the user's request:
|
|
464
|
-
- `
|
|
465
|
-
- `
|
|
466
|
-
- `
|
|
467
|
-
- `
|
|
468
|
-
- `
|
|
469
|
-
- `
|
|
464
|
+
- `read_summarize_wallet_assets` for balances.
|
|
465
|
+
- `read_classify_wallet_assets` for coin-balance roles.
|
|
466
|
+
- `read_preview_intent_evidence` for natural-language USD-denominated coverage or settlement-asset balance-total evidence.
|
|
467
|
+
- `read_summarize_deepbook_account_inventory` for DeepBook manager or pool-account inventory.
|
|
468
|
+
- `read_summarize_sui_activity_scan` for a live bounded activity summary.
|
|
469
|
+
- `read_summarize_sui_function_activity_scan` for sent transactions that called one full function target.
|
|
470
470
|
If the selected tool accepts `account` and the user supplied a Sui address, pass it instead of starting wallet connection. DeepBook account inventory has no explicit address input.
|
|
471
|
-
8. For local review evidence, use `
|
|
472
|
-
9. For local endpoint settings or local data controls, ask your AI client to call `
|
|
471
|
+
8. For local review evidence, use `read_list_review_activity`, `read_summarize_review_funnel`, or `read_get_review_session_detail`.
|
|
472
|
+
9. For local endpoint settings or local data controls, ask your AI client to call `settings_create_local_settings_session`, then use the internal card controls. Setting changes apply after restart.
|
|
473
473
|
|
|
474
474
|
## Wallet Connection Boundary
|
|
475
475
|
|
|
@@ -504,9 +504,13 @@ failure. No read, timeout or reopened frame initiates another restart.
|
|
|
504
504
|
|
|
505
505
|
If Settings or the parent service cannot be reached, fully quit all apps using
|
|
506
506
|
Sui MCP, then reopen them. Closing a peer or window can leave the owner alive.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
507
|
+
Stop the participating MCP connections and wait for the shared parent backend
|
|
508
|
+
to exit before applying stored endpoint or installation changes. Client disable
|
|
509
|
+
and refresh controls can be used when they release every participating process;
|
|
510
|
+
otherwise fully quit the apps. Closing a peer or window alone can leave the
|
|
511
|
+
owner running. Reopen the connections and verify the intended server identity.
|
|
512
|
+
Restart connection service replaces only the SDK child and does not apply parent
|
|
513
|
+
configuration.
|
|
510
514
|
|
|
511
515
|
Restarting does not cancel a transaction on Sui or confirm remote disconnection.
|
|
512
516
|
Check retained connections in your wallet app. Saved results and the known
|
|
@@ -516,8 +520,8 @@ is resent automatically. Normal initialization is not a failure warning.
|
|
|
516
520
|
|
|
517
521
|
All clients sharing a data folder must use the same package release. Private
|
|
518
522
|
parent/child and peer authentication bind that package identity; there is no
|
|
519
|
-
separate internal API or database version counter.
|
|
520
|
-
starting the
|
|
523
|
+
separate internal API or database version counter. Stop the old MCP connections and confirm the backend has exited before
|
|
524
|
+
starting the updated installation; an incompatible owner is refused.
|
|
521
525
|
The runtime checks the current product and private SDK storage structures directly; neither has a separate numeric version.
|
|
522
526
|
|
|
523
527
|
Review requires an explicit card action and individual wallet approval. The
|
|
@@ -528,7 +532,7 @@ Receipt and Chart do not sign or submit.
|
|
|
528
532
|
|
|
529
533
|
## Internal read cards
|
|
530
534
|
|
|
531
|
-
Ask the AI client to show an account asset card, a transaction result card, or a DeepBook USDC chart. The corresponding tools are `
|
|
535
|
+
Ask the AI client to show an account asset card, a transaction result card, or a DeepBook USDC chart. The corresponding tools are `ui_open_account`, `ui_open_receipt`, and `ui_open_chart`. Claude Desktop and Codex desktop use their internal MCP Apps view. A client without that UI receives `ui_unavailable`; ordinary read tools still provide evidence.
|
|
532
536
|
|
|
533
537
|
A card accepts one read selection. Moving between chats or recreating its frame does not close valid unsubmitted input. After the server accepts the selection or its input period expires, the original input stays closed. Request a new card for a different selection. A server restart ends unfinished cards without repeating their queries; completed results remain readable. If a reply is lost, use the same card’s saved-state recovery before starting another request. These read cards do not connect a wallet, sign or submit transactions. Cards do not provide clipboard or copy-button features.
|
|
534
538
|
|
|
@@ -573,7 +577,7 @@ Settings validation rules:
|
|
|
573
577
|
- Restoring or resetting can delete records whose transaction results were not confirmed and cannot cancel a transaction on Sui. It remains blocked while a wallet/transaction response is pending or the initial transaction-result waiting period has not ended, including after automatic result checks are stopped.
|
|
574
578
|
- Choose Download backup in Local records once. Sui MCP prepares and checks the backup internally, then asks the app to save it. There is no separate Create backup step. For supported downloads, the app controls the destination and Sui MCP keeps no permanent extra copy; Suggested file name is not a confirmed save path.
|
|
575
579
|
- If the download function explicitly reports that it is unsupported, the same backup is saved in `<SUI_MCP_DATA_DIR>/backups/` instead. Backup saved shows its actual Folder and File name. This file remains after restarting or replacing local data; temporary cleanup does not delete it. This choice depends on the function response, not the app name. Other errors do not silently change the destination.
|
|
576
|
-
- If an earlier attempt may already have saved a copy, Save a local copy asks for that decision explicitly. Retry save is available only after a
|
|
580
|
+
- If an earlier attempt may already have saved a copy, Save a local copy asks for that decision explicitly. Retry save is available only after a local save failure recorded as `not_published`. While saving or checking an uncertain result, Check status checks the same request without creating another file.
|
|
577
581
|
- An accepted download request does not prove that the file was saved. If delivery fails or cannot be confirmed, Retry download sends the same snapshot while its thirty-minute transfer period remains open. An unconfirmed earlier request may already have saved a copy. Cancel download stops further transfer and cleans the temporary snapshot; it does not close a save dialog or delete a saved file. Reopening a card never starts another download automatically.
|
|
578
582
|
- The thirty-minute transfer period starts when the snapshot is ready and is not extended by reads or retries. App acknowledgment, cancellation, expiry, server restart or local-data replacement ends private retention. A local save admitted before the deadline finishes its file work and records the result before cleanup; a restart can verify an already published file but never create a missing one. If temporary cleanup cannot be confirmed, Check status checks that same request without creating or downloading another backup. Existing saved local backup files are left intact. A backup larger than the 16 MiB restore limit is identified as such and is not silently truncated.
|
|
579
583
|
- Import accepts only the current backup format and required field structure. Required settings and activity fields must be present; missing fields are not filled from defaults.
|
|
@@ -582,18 +586,18 @@ Settings validation rules:
|
|
|
582
586
|
- A custom gRPC endpoint must be an `http` or `https` URL with an explicit port and no credentials, path, query string, or fragment.
|
|
583
587
|
- A custom GraphQL endpoint must be an `https` URL with no credentials, query string, or fragment.
|
|
584
588
|
- The runtime verifies custom endpoints report the expected Sui mainnet chain identifier before saving them, including when an endpoint comes from an imported local data backup. The GraphQL endpoint is also verified lazily on first Sui activity tool use after process start.
|
|
585
|
-
- Endpoint changes apply after
|
|
589
|
+
- Endpoint changes apply after the shared parent server exits and restarts; use the connection stop/reopen procedure above.
|
|
586
590
|
|
|
587
591
|
## Advanced Runtime Settings
|
|
588
592
|
|
|
589
|
-
`
|
|
593
|
+
`SUI_MCP_GRPC_URL` and `SUI_MCP_GRAPHQL_URL` are advanced temporary overrides for operators and smoke tests. They win over the stored local setting for the current process and do not mutate SQLite:
|
|
590
594
|
|
|
591
595
|
```bash
|
|
592
|
-
|
|
596
|
+
SUI_MCP_GRPC_URL="https://fullnode.mainnet.sui.io:443" node /absolute/path/to/sui-mcp/dist/runtime/start.js
|
|
593
597
|
```
|
|
594
598
|
|
|
595
599
|
```bash
|
|
596
|
-
|
|
600
|
+
SUI_MCP_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" node /absolute/path/to/sui-mcp/dist/runtime/start.js
|
|
597
601
|
```
|
|
598
602
|
|
|
599
603
|
Use this only when you need a one-run override or need to recover from a stored custom endpoint that no longer starts.
|
|
@@ -662,17 +666,17 @@ See [Utility Index](UTILITY_INDEX.md#release-package-check) for prerequisites.
|
|
|
662
666
|
|
|
663
667
|
## Mainnet Read Smoke
|
|
664
668
|
|
|
665
|
-
Run this
|
|
669
|
+
Run this optional manual check when a release or provider diagnosis needs mainnet read evidence; it is not a mandatory predecessor of `release:check`. Normal setup does not require setting `SUI_MCP_GRPC_URL`; this environment variable is an operator override for the smoke process.
|
|
666
670
|
|
|
667
671
|
```bash
|
|
668
|
-
export
|
|
669
|
-
export
|
|
670
|
-
export
|
|
671
|
-
export
|
|
672
|
-
export
|
|
673
|
-
# Optional: export
|
|
674
|
-
# Optional: export
|
|
675
|
-
# Optional: export
|
|
672
|
+
export SUI_MCP_GRPC_URL="https://fullnode.mainnet.sui.io:443"
|
|
673
|
+
export SUI_MCP_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
|
|
674
|
+
export SUI_MCP_SMOKE_ADDRESS="0x..."
|
|
675
|
+
export SUI_MCP_SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
|
|
676
|
+
export SUI_MCP_SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
|
|
677
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_DIGEST="..."
|
|
678
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST="true"
|
|
679
|
+
# Optional: export SUI_MCP_SMOKE_FUNCTION_TARGET="0x...::module::function"
|
|
676
680
|
npm run build
|
|
677
681
|
npm run smoke:mainnet
|
|
678
682
|
```
|
|
@@ -682,23 +686,23 @@ The smoke script calls read-only MCP tools against mainnet:
|
|
|
682
686
|
- wallet assets;
|
|
683
687
|
- DeepBook orderbook;
|
|
684
688
|
- raw-quantity DeepBook quote;
|
|
685
|
-
- `
|
|
686
|
-
- `
|
|
689
|
+
- `read_scan_sui_account_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
690
|
+
- `read_summarize_sui_activity_scan` through active account context with limit 5.
|
|
687
691
|
|
|
688
|
-
When `
|
|
692
|
+
When `SUI_MCP_SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`, it also calls:
|
|
689
693
|
|
|
690
|
-
- `
|
|
691
|
-
- `
|
|
694
|
+
- `read_scan_sui_function_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
695
|
+
- `read_summarize_sui_function_activity_scan` through active account context with limit 5.
|
|
692
696
|
|
|
693
697
|
The raw-quantity DeepBook quote smoke path does not call the display-amount quote.
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
that
|
|
698
|
+
Without the complete optional swap input group, account-bound transaction-material
|
|
699
|
+
computation is not run. The optional account-bound review smoke uses the same
|
|
700
|
+
producer and records its actual evidence stages; read-only smoke success alone
|
|
701
|
+
does not prove that stage ran or that a wallet will accept the transaction.
|
|
698
702
|
|
|
699
703
|
Empty account or function activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
|
|
700
704
|
|
|
701
|
-
When `
|
|
705
|
+
When `SUI_MCP_SMOKE_FUNCTION_TARGET` is unset, function activity smoke is recorded as not run with `notRunReason: "missing_env"`.
|
|
702
706
|
|
|
703
707
|
The smoke result file records tool names, environment-variable presence, activity status, row counts, source method, window/order flags, persistence status, whether a function target was present, and evidence-boundary metrics.
|
|
704
708
|
|
|
@@ -722,15 +726,15 @@ Activity scan and summary smoke paths fail if full transaction details or compac
|
|
|
722
726
|
|
|
723
727
|
It does not call DeepBook account inventory tools.
|
|
724
728
|
|
|
725
|
-
If `
|
|
729
|
+
If `SUI_MCP_SMOKE_INSPECT_DIGEST` is set, it also calls `read_inspect_sui_transaction` for that digest and the smoke address.
|
|
726
730
|
|
|
727
|
-
If `
|
|
731
|
+
If `SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` is set and `SUI_MCP_SMOKE_INSPECT_DIGEST` is unset, it samples one digest from the latest GraphQL transaction page and inspects that digest without an account argument.
|
|
728
732
|
|
|
729
733
|
It is not part of CI or `release:check`.
|
|
730
|
-
`
|
|
731
|
-
`
|
|
732
|
-
`
|
|
733
|
-
`
|
|
734
|
+
`SUI_MCP_SMOKE_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
|
|
735
|
+
`SUI_MCP_SMOKE_FUNCTION_TARGET` is optional. When set, it must be a full Sui function target in `package::module::function` form; package-only, package-and-module-only, bare function names, and generic/type-argument forms fail the optional function activity smoke path.
|
|
736
|
+
`SUI_MCP_SMOKE_INSPECT_DIGEST` is optional. Use a digest whose sender or returned balance-change owner is `SUI_MCP_SMOKE_ADDRESS` to exercise the stored digest-lookup path; otherwise the lookup can still return `ok` with `persistence.stored: false`.
|
|
737
|
+
`SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` checks current transaction-read shape without pinning a specific user address and without exercising the stored relation path.
|
|
734
738
|
|
|
735
739
|
## Troubleshooting
|
|
736
740
|
|
|
@@ -755,8 +759,7 @@ codes 130/143. Cleanup failure is reported and makes a normal closure fail; it
|
|
|
755
759
|
cannot erase an earlier fatal or signal exit. SDK service unavailability is a
|
|
756
760
|
separate condition and does not by itself shut down the parent read service.
|
|
757
761
|
|
|
758
|
-
-
|
|
759
|
-
- If a stored custom endpoint fails, temporarily start with `SUI_GRPC_URL`, open the Settings card, restore the default Sui gRPC URL or save a new endpoint, remove the override, and restart.
|
|
762
|
+
- If a stored custom endpoint fails, temporarily start with `SUI_MCP_GRPC_URL`, open the Settings card, restore the default Sui gRPC URL or save a new endpoint, remove the override, and restart.
|
|
760
763
|
- If an environment override is present, confirm it has scheme, host, and explicit port only.
|
|
761
764
|
- If the startup chain identifier guard fails, use a Sui mainnet gRPC endpoint. If a Sui activity tool fails its GraphQL chain identifier guard, use a Sui mainnet GraphQL endpoint.
|
|
762
765
|
|
|
@@ -764,19 +767,19 @@ separate condition and does not by itself shut down the parent read service.
|
|
|
764
767
|
|
|
765
768
|
For tools with an `account` input, provide an explicit Sui address in chat. DeepBook account inventory has no address input and needs a connected selected account. When connection or account selection is wanted:
|
|
766
769
|
|
|
767
|
-
1. Open a Connect card with `
|
|
770
|
+
1. Open a Connect card with `session_open_wallet_connection_card` and `intent: connect`.
|
|
768
771
|
2. The card prepares the QR after confirming current state.
|
|
769
772
|
3. Scan it and approve the Sui mainnet connection in your wallet.
|
|
770
773
|
4. Read or wait on that cardId; select an approved read account when required.
|
|
771
|
-
5. Confirm connection availability with `
|
|
774
|
+
5. Confirm connection availability with `session_get_interaction_status`. Stored read context alone is not a usable default for current asset reads.
|
|
772
775
|
|
|
773
|
-
If the user supplied a specific Sui address for `
|
|
776
|
+
If the user supplied a specific Sui address for `read_summarize_wallet_assets` or `read_classify_wallet_assets`, pass that address as `account` instead of creating a wallet connection session.
|
|
774
777
|
|
|
775
778
|
### NPM command returns 404
|
|
776
779
|
|
|
777
780
|
A 404 means the requested package or version could not be retrieved from the
|
|
778
781
|
selected registry. Confirm the exact name and version, for example with
|
|
779
|
-
`npm view @zktx.io/sui-mcp@0.
|
|
782
|
+
`npm view @zktx.io/sui-mcp@0.7.0 version --registry=https://registry.npmjs.org`.
|
|
780
783
|
A new version may not have been published or become visible yet; a mistyped name
|
|
781
784
|
or an alternate/private registry can also explain the response. Check the
|
|
782
785
|
publication result and registry configuration before retrying. Do not assume
|
|
@@ -790,10 +793,10 @@ The Claude Code, Claude Desktop, Codex, and Cursor snippets above were checked a
|
|
|
790
793
|
|
|
791
794
|
### Optional account-bound review smoke
|
|
792
795
|
|
|
793
|
-
Set `
|
|
794
|
-
`
|
|
796
|
+
Set `SUI_MCP_SMOKE_SWAP_PROTOCOL`, `SUI_MCP_SMOKE_SWAP_FROM_SYMBOL`, `SUI_MCP_SMOKE_SWAP_TO_SYMBOL` and
|
|
797
|
+
`SUI_MCP_SMOKE_SWAP_AMOUNT_DISPLAY` together to opt into read-only account-bound review
|
|
795
798
|
computation. Protocol is explicitly `deep`; the smoke does not silently select a protocol.
|
|
796
|
-
A partially configured group is an error. `
|
|
799
|
+
A partially configured group is an error. `SUI_MCP_SMOKE_SWAP_MAX_SLIPPAGE_BPS` keeps the
|
|
797
800
|
existing explicit override. The script uses the same runtime review composition,
|
|
798
801
|
material store and evidence validation as the product, and records whether
|
|
799
802
|
transaction review data was emitted. This can involve mainnet simulation but
|