@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
|
@@ -278,8 +278,8 @@ relabeled stream produced by `applyContractNamesToMermaid`
|
|
|
278
278
|
(`@deepbook/core`; the Sui framework `std`/`sui`/`sui_system`) and well-known
|
|
279
279
|
objects (`SuiSystemState`, `Clock`, `Random`, `DenyList`, `CoinRegistry`,
|
|
280
280
|
`AccumulatorRoot`) while keeping the raw addresses available. These names are a
|
|
281
|
-
display label, not a safety, ownership, or trust signal, and the
|
|
282
|
-
|
|
281
|
+
display label, not a safety, ownership, or trust signal, and the renderer does not perform a fresh Move Registry lookup or verify
|
|
282
|
+
current package identity from a display label.
|
|
283
283
|
|
|
284
284
|
## Adapter Registration And Stage Vocabulary
|
|
285
285
|
|
|
@@ -390,7 +390,7 @@ Different gas owners, sponsor withdrawals, unsupported reservation formats, and
|
|
|
390
390
|
unverified funding remain blocked. Supported adapters still require the same quote,
|
|
391
391
|
amount, ownership, human review, simulation, wallet approval, and digest checks.
|
|
392
392
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
BCS is compared privately and is never added to evidence, cards, backups or logs.
|
|
393
|
+
The current review producer uses `client.transactionExecutionService.simulateTransaction`.
|
|
394
|
+
A stored public record identifies the provider that produced its evidence; reading
|
|
395
|
+
that record does not select a simulation fallback or create new funding proof.
|
|
396
|
+
Returned BCS is compared privately and is never added to evidence, cards, backups or logs.
|
|
@@ -149,7 +149,7 @@ That analysis aggregates raw integer coin flows, gas totals, Move call targets,
|
|
|
149
149
|
|
|
150
150
|
It is not display conversion, P&L, position inventory, route quality, protocol support, transaction-building input, signing data, or signing readiness.
|
|
151
151
|
|
|
152
|
-
Use `
|
|
152
|
+
Use `read_inspect_sui_transaction` when a user needs the full normalized facts for a digest.
|
|
153
153
|
|
|
154
154
|
The runtime does not store non-known party account addresses inside persisted transaction rows or normalized detail facts. If a digest lookup or explicit-account scan is not related to a known local wallet, the result can be returned for the current request but is not persisted.
|
|
155
155
|
|
|
@@ -163,19 +163,19 @@ Complete account transaction history is not a product surface of this data.
|
|
|
163
163
|
|
|
164
164
|
AI clients may answer questions only from data the listed read tools return.
|
|
165
165
|
|
|
166
|
-
`
|
|
166
|
+
`read_summarize_sui_activity_scan` summarizes a live bounded scan without full details or transaction-wide balance-change aggregates in row context.
|
|
167
167
|
|
|
168
|
-
`
|
|
168
|
+
`read_scan_sui_function_activity` and `read_summarize_sui_function_activity_scan` reuse the same requested-account fact, transaction-context, analysis, and protocol label pipeline for transactions the selected account sent that called one full `package::module::function`.
|
|
169
169
|
|
|
170
170
|
They do not create a function-specific stored history, global function index, affected-object history, or complete dApp history.
|
|
171
171
|
|
|
172
|
-
`
|
|
172
|
+
`read_summarize_sui_account_activity` summarizes account-level stored normalized facts only.
|
|
173
173
|
|
|
174
174
|
It can include rows from account scans, digest lookups, or sent-function scans, and the scan kind remains provenance rather than a user query filter.
|
|
175
175
|
|
|
176
|
-
`
|
|
176
|
+
`read_get_account_asset_timeline` builds stored account asset net-flow bars from the same local normalized facts. Its requested UTC range is half-open: the start timestamp is included and the end timestamp is excluded.
|
|
177
177
|
|
|
178
|
-
It first checks stored scan coverage for the requested account and UTC range. If no stored scan can support the requested range for a known account, it returns `scan_needed` and points to `
|
|
178
|
+
It first checks stored scan coverage for the requested account and UTC range. If no stored scan can support the requested range for a known account, it returns `scan_needed` and points to `read_scan_sui_account_activity`; it does not start a scan by itself. If an explicit account is not a known local wallet in the activity store, it returns `account_not_known` and does not return `scanNeeded`.
|
|
179
179
|
|
|
180
180
|
Timeline output uses account-scoped raw balance-change facts only. `netFlowBars` are observed inflow/outflow bars, not held balances. The storage model does not store balance snapshots or balance anchors. The timeline response returns `balanceStatus: "unavailable_no_balance_anchor"` and empty `balanceBars`.
|
|
181
181
|
|
|
@@ -185,7 +185,7 @@ Provider retention and rate-limit behavior are endpoint/operator properties, not
|
|
|
185
185
|
|
|
186
186
|
Empty pages, bounded pages, and stored local summaries must not be treated as complete history.
|
|
187
187
|
|
|
188
|
-
When normalized details are missing or capped, use `transactionDetailAvailability` and the returned digest metadata with `
|
|
188
|
+
When normalized details are missing or capped, use `transactionDetailAvailability` and the returned digest metadata with `read_inspect_sui_transaction` instead of inventing missing fields.
|
|
189
189
|
|
|
190
190
|
Inspect responses can include live GraphQL detail fields for the current response.
|
|
191
191
|
|
package/docs/UTILITY_INDEX.md
CHANGED
|
@@ -17,33 +17,33 @@ Source-checkout scripts are not packaged product commands, MCP tools, review-tim
|
|
|
17
17
|
| Utility | Command / Tool | Status | Notes |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| DeepBook registry generation | `npm run generate:deepbook-registry` | Implemented | Generates ignored mainnet metadata from `@mysten/deepbook-v3@2.6.4` constants. |
|
|
20
|
-
| MCP server status | `
|
|
21
|
-
| Supported protocol list | `
|
|
22
|
-
| DeepBook pool list | `
|
|
23
|
-
| DeepBook token list | `
|
|
24
|
-
| Orderbook inspection | `
|
|
25
|
-
| DeepBook mid price | `
|
|
26
|
-
| DeepBook USDC price history | `
|
|
27
|
-
| DeepBook USDC price at time | `
|
|
28
|
-
| DeepBook USDC candle chart card | `
|
|
29
|
-
| Quote calculation | `
|
|
30
|
-
| Display amount quote | `
|
|
31
|
-
| DeepBook account inventory | `
|
|
32
|
-
| Wallet asset summary | `
|
|
33
|
-
| Wallet asset classification | `
|
|
34
|
-
| Settlement asset group list | `
|
|
35
|
-
| Intent evidence preview | `
|
|
36
|
-
| Review activity list | `
|
|
37
|
-
| Review funnel summary | `
|
|
38
|
-
| Review session detail | `
|
|
39
|
-
| Sui transaction digest lookup | `
|
|
40
|
-
| Sui account activity scan | `
|
|
41
|
-
| Live Sui activity scan summary | `
|
|
42
|
-
| Sui sent-function activity scan | `
|
|
43
|
-
| Live Sui sent-function activity summary | `
|
|
44
|
-
| Stored Sui activity summary | `
|
|
45
|
-
| Stored account asset timeline | `
|
|
46
|
-
| Local settings | `
|
|
20
|
+
| MCP server status | `read_get_server_status` | Implemented | Reports package version, evidence policy version, runtime, `implementedToolsCount`, resources, prompts, and implementation limits. |
|
|
21
|
+
| Supported protocol list | `read_list_supported_protocols` | Implemented | Reports product support levels. |
|
|
22
|
+
| DeepBook pool list | `read_list_deepbook_pools` | Implemented | Reads pinned SDK mainnet pool metadata. |
|
|
23
|
+
| DeepBook token list | `read_list_deepbook_tokens` | Implemented | Reads pinned SDK mainnet token metadata, registry pool references, and decimals derived from pinned scalar values. |
|
|
24
|
+
| Orderbook inspection | `read_inspect_deepbook_orderbook` | Implemented | Uses pinned DeepBook SDK simulation read methods over Sui gRPC with an internal sender placeholder; `ticks` is capped at 50. |
|
|
25
|
+
| DeepBook mid price | `read_get_deepbook_mid_price` | Implemented | Returns pinned SDK pool mid price snapshots. Not a global market price. |
|
|
26
|
+
| DeepBook USDC price history | `read_get_deepbook_usdc_price_history` | Implemented | Reads DeepBookV3 official Indexer USDC candle data for a requested official interval. Not a utility script, live quote, USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
27
|
+
| DeepBook USDC price at time | `read_get_deepbook_usdc_price_at_time` | Implemented | Selects the DeepBookV3 official Indexer USDC candle for or nearest to one target UTC time. Not a utility script, live quote, USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
28
|
+
| DeepBook USDC candle chart card | `ui_open_chart` | Implemented | Internal read-only MCP Apps card displaying official DeepBookV3 Indexer USDC-denominated candles through the shared server. Shows the selected pool, requested UTC range and candle limit with the saved result. Not a utility script, live feed, wallet connection, trading interface, fiat USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
29
|
+
| Quote calculation | `read_quote_deepbook_action` | Implemented | Quotes raw integer DeepBook quantities with pinned SDK transaction builders and raw `u64` simulation return values. |
|
|
30
|
+
| Display amount quote | `read_quote_deepbook_display_amount` | Implemented | Converts explicit source display amounts through pinned DeepBook token units before quoting; returns exact decimal display quote strings plus raw quote evidence. Quote semantics mark payment coverage and shortfall contribution unavailable. |
|
|
31
|
+
| DeepBook account inventory | `read_summarize_deepbook_account_inventory` | Implemented | Reports display-like BalanceManager inventory. Not raw balance or signing readiness. |
|
|
32
|
+
| Wallet asset summary | `read_summarize_wallet_assets` | Implemented | Reads Sui coin balances for an explicit address or the active account with Sui gRPC `client.core.listBalances`; adds verified unit/display data when available; use `cursor` when `hasNextPage` is true. |
|
|
33
|
+
| Wallet asset classification | `read_classify_wallet_assets` | Implemented | Classifies returned coin balances by balanceStatus and roles. Other asset classes are explicit non-inspected boundaries. |
|
|
34
|
+
| Settlement asset group list | `read_list_settlement_asset_groups` | Implemented | Lists supported natural-language settlement asset groups derived from pinned DeepBook mainnet SDK registries. Not live liquidity, route recommendation, fiat cash-out, payment execution, or signing readiness. |
|
|
35
|
+
| Intent evidence preview | `read_preview_intent_evidence` | Implemented | Builds `responseSummary` for USD-denominated coverage, shortfall, or settlement-asset balance total. |
|
|
36
|
+
| Review activity list | `read_list_review_activity` | Implemented | Lists local Sui MCP review evidence for one account; not complete wallet transaction history. |
|
|
37
|
+
| Review funnel summary | `read_summarize_review_funnel` | Implemented | Summarizes local review lifecycle counts, current statuses, sparse-sample warnings, and review timing. |
|
|
38
|
+
| Review session detail | `read_get_review_session_detail` | Implemented | Returns a capped detail view of one stored review session with plan, state snapshots, transitions, and execution evidence. |
|
|
39
|
+
| Sui transaction digest lookup | `read_inspect_sui_transaction` | Implemented | Looks up one Sui transaction digest and stores normalized facts only when the transaction sender or a returned balance-change owner matches a known local wallet. |
|
|
40
|
+
| Sui account activity scan | `read_scan_sui_account_activity` | Implemented | Runs a bounded recent-to-older GraphQL scan with requested-account facts. Not complete history. |
|
|
41
|
+
| Live Sui activity scan summary | `read_summarize_sui_activity_scan` | Implemented | Summarizes a live bounded scan without full details. Not P&L, position inventory, or complete history. |
|
|
42
|
+
| Sui sent-function activity scan | `read_scan_sui_function_activity` | Implemented | Scans bounded sent transactions for one full `package::module::function`. Not global function history. |
|
|
43
|
+
| Live Sui sent-function activity summary | `read_summarize_sui_function_activity_scan` | Implemented | Summarizes bounded sent-function rows. Not P&L, route recommendation, or signing readiness. |
|
|
44
|
+
| Stored Sui activity summary | `read_summarize_sui_account_activity` | Implemented | Summarizes stored normalized Sui activity facts, including stored Move call, balance change, object/event, gas, execution error details, and optional protocol activity labels when evidence is available. |
|
|
45
|
+
| Stored account asset timeline | `read_get_account_asset_timeline` | Implemented | Builds stored local account asset net-flow bars and optional DeepBook USDC token-denominated candle references. Not held balances, complete wallet history, USD value, P&L, cost basis, route advice, transaction building, or signing readiness. |
|
|
46
|
+
| Local settings | `settings_create_local_settings_session`, `settings_get_local_settings` | Implemented | MCP opens an internal Settings card or reads settings. App-only preparation/confirmation owns changes, files and explicit connection-service recovery. Stored endpoints apply after all participating apps restart. |
|
|
47
47
|
| Release package check | `npm run release:check` | Maintainer, source checkout | Verifies metadata, tests/build, tarball assets/licenses and installed MCP/Settings startup. Requires network and loopback access; no wallet pairing, signing or publishing. |
|
|
48
48
|
| Mainnet read smoke | `npm run smoke:mainnet` | Manual | Runs selected mainnet read paths from built `dist/`. Build first. Not part of CI or `release:check`; see notes below. |
|
|
49
49
|
| Sui GraphQL function filter probe | `npm exec -- tsx scripts/sui-graphql-function-filter-probe.ts [--endpoint <mainnet-graphql-url>] [--sample-size <1-50>] [--timeout-ms <ms>]` | Manual, source evidence only | Runs a read-only Sui mainnet GraphQL source-shape probe for function-filter diagnostics; see notes below. |
|
|
@@ -58,7 +58,7 @@ installation, local loopback sockets, and reachable Sui mainnet endpoints are
|
|
|
58
58
|
required. Native SQLite must work both in the checkout and the installed package.
|
|
59
59
|
The source build and tests use Vite, Rolldown and Vitest's common Node ranges; the
|
|
60
60
|
installed package's Node runtime requirement is documented in MCP Setup.
|
|
61
|
-
The runtime uses its built-in endpoints unless `
|
|
61
|
+
The runtime uses its built-in endpoints unless `SUI_MCP_GRPC_URL` or `SUI_MCP_GRAPHQL_URL`
|
|
62
62
|
is supplied; the actual mainnet checks remain enabled.
|
|
63
63
|
|
|
64
64
|
The command checks metadata, types, tests, builds, package contents and licenses,
|
|
@@ -105,23 +105,23 @@ original workflow revision, so changes to this gate apply to subsequent releases
|
|
|
105
105
|
This is a manual maintainer check for a specific mainnet provider. Normal quickstart use does not require Sui endpoint setup. Run it for people operating releases or debugging mainnet read shape.
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
export
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
112
|
-
export
|
|
113
|
-
# Optional: export
|
|
114
|
-
# Optional: export
|
|
108
|
+
export SUI_MCP_GRPC_URL="https://fullnode.mainnet.sui.io:443"
|
|
109
|
+
export SUI_MCP_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
|
|
110
|
+
export SUI_MCP_SMOKE_ADDRESS="0x..."
|
|
111
|
+
export SUI_MCP_SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
|
|
112
|
+
export SUI_MCP_SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
|
|
113
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_DIGEST="..."
|
|
114
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST="true"
|
|
115
115
|
npm run build
|
|
116
116
|
npm run smoke:mainnet
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
`
|
|
120
|
-
`
|
|
121
|
-
`
|
|
122
|
-
`
|
|
119
|
+
`SUI_MCP_GRPC_URL` must be only scheme, host, and explicit port. Do not include credentials, a path, query string, or fragment.
|
|
120
|
+
`SUI_MCP_SMOKE_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
|
|
121
|
+
`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`.
|
|
122
|
+
`SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` is optional and only used when `SUI_MCP_SMOKE_INSPECT_DIGEST` is unset. It samples one digest from the latest GraphQL transaction page and calls `read_inspect_sui_transaction` without passing the smoke address. This checks current transaction-read shape without pinning a specific user address or exercising the stored relation path.
|
|
123
123
|
|
|
124
|
-
DeepBook orderbook and raw-quantity quote reads use an internal mainnet SDK simulation sender placeholder, not a user's wallet. The display-amount quote path is covered by automated tests, not by this smoke script.
|
|
124
|
+
DeepBook orderbook and raw-quantity quote reads use an internal mainnet SDK simulation sender placeholder, not a user's wallet. The display-amount quote path is covered by automated tests, not by this smoke script. Without the complete optional swap input group, the script does not run account-bound transaction-material computation or digest binding. See Optional account-bound review smoke for that explicit path; read-only success is not evidence that it ran.
|
|
125
125
|
|
|
126
126
|
Wallet and activity reads use an explicitly synthetic active-account context in a temporary SQLite database. The script never creates a wallet connection, a review URL or an HTTP wallet result. Wallet approval is checked separately. This smoke script does not record raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
127
127
|
|
|
@@ -134,10 +134,10 @@ The smoke command calls:
|
|
|
134
134
|
- wallet assets;
|
|
135
135
|
- DeepBook orderbook;
|
|
136
136
|
- raw-quantity DeepBook quote;
|
|
137
|
-
- `
|
|
138
|
-
- `
|
|
139
|
-
- `
|
|
140
|
-
- sent-function activity tools when `
|
|
137
|
+
- `read_scan_sui_account_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
138
|
+
- `read_summarize_sui_activity_scan` through active account context with limit 5;
|
|
139
|
+
- `read_inspect_sui_transaction` when `SUI_MCP_SMOKE_INSPECT_DIGEST` is set;
|
|
140
|
+
- sent-function activity tools when `SUI_MCP_SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`.
|
|
141
141
|
|
|
142
142
|
Empty activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
|
|
143
143
|
|
|
@@ -145,15 +145,15 @@ The result file records tool names, environment-variable presence, activity stat
|
|
|
145
145
|
|
|
146
146
|
It does not store raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
147
147
|
|
|
148
|
-
Activity scan and summary smoke paths fail if full transaction details or compact transaction aggregates are returned. The optional digest verifies storage only when its sender or returned balance-change owner is `
|
|
148
|
+
Activity scan and summary smoke paths fail if full transaction details or compact transaction aggregates are returned. The optional digest verifies storage only when its sender or returned balance-change owner is `SUI_MCP_SMOKE_ADDRESS`.
|
|
149
149
|
|
|
150
|
-
If `
|
|
150
|
+
If `SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` is set and no digest is provided, the script samples one latest GraphQL transaction digest and inspects it without an account argument.
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
The default read path does not call display-amount quote or DeepBook account
|
|
153
|
+
inventory. Account-bound review computation is separate within the same utility
|
|
154
|
+
and runs only for the complete explicit swap input group. Use its recorded
|
|
155
|
+
status and evidence stages rather than treating read-path success as material
|
|
156
|
+
verification or wallet acceptance.
|
|
157
157
|
|
|
158
158
|
## Sui GraphQL Function Filter Probe Notes
|
|
159
159
|
|
|
@@ -228,11 +228,11 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
228
228
|
- DeepBook mid-price outputs are pool snapshots. For `SUI_USDC`, the price is USDC per SUI.
|
|
229
229
|
- DeepBook mid prices are not fiat USD cash-out estimates, external market lookups, USDC/USD peg assumptions, effective quote prices, quote-vs-mid slippage, price-impact calculations, venue comparisons, best-route claims, P&L, cost basis, or route recommendations.
|
|
230
230
|
- DeepBook USDC price-history output reads DeepBookV3 official Indexer candle data for the requested official interval. It is MCP tool evidence, not a source-checkout utility, on-demand chain-history scan, live quote, historical mid price, global market price, USD value, user-account history, P&L, cost basis, route recommendation, transaction-building input, or signing-readiness signal.
|
|
231
|
-
- `
|
|
231
|
+
- `ui_open_chart` opens an internal read-only DeepBook USDC candle card. The server queries the official Indexer; the view does not fetch it directly. This is not a utility script, persistent price database, auto-refresh feed, live quote, trading interface, fiat USD value, user-account history, P&L, cost basis, route recommendation, transaction-building input or signing-readiness signal.
|
|
232
232
|
- USDC in DeepBook USDC price-history output is a token-denominated quote asset, not fiat USD and not a USDC/USD peg guarantee.
|
|
233
|
-
- `
|
|
233
|
+
- `read_quote_deepbook_action` amounts are raw integer quantities that fit the SDK `u64` quote input, not decimal display amounts. Quote responses include `rawQuote.kind: "deepbook_quote_raw_u64"` from simulated raw `u64` return values.
|
|
234
234
|
- `rawQuote.sourceMoveFunction` names the simulated public entrypoint. `rawQuote.returnValueSourceMoveFunction: "pool::get_quantity_out"` names the official Move function that defines the return-value order.
|
|
235
|
-
- `
|
|
235
|
+
- `read_quote_deepbook_display_amount` accepts only source-side display input amounts that convert to SDK `u64` quote inputs.
|
|
236
236
|
- Display quote public `quote` fields are exact decimal display strings derived from raw evidence. `rawQuote.directionalOutput.raw` is the direction-specific quote output before slippage policy.
|
|
237
237
|
- Quote `quantitySemantics` marks payment coverage, shortfall contribution, and route-dependent payment support unavailable and points coverage questions back to intent evidence.
|
|
238
238
|
- DeepBook account inventory quantities are display-like SDK `number` values and must not be used as raw amounts, funding sources, route liquidity, withdrawal readiness, transaction-building inputs, signing data, or signing readiness.
|
|
@@ -252,10 +252,10 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
252
252
|
- Gas display facts, when returned, use `@mysten/sui MIST_PER_SUI`.
|
|
253
253
|
- Optional protocol activity labels are derived from normalized detail facts and are not a supported-protocol list or wallet position inventory.
|
|
254
254
|
- Sent-function activity tools are sender-scoped only: they report transactions the selected account sent that called one full `package::module::function`, not recipient-only activity, affected-object history, or global function history.
|
|
255
|
-
- `
|
|
255
|
+
- `read_summarize_sui_activity_scan` and `read_summarize_sui_function_activity_scan` summarize live bounded scan results. `read_summarize_sui_account_activity` summarizes stored local SQLite facts only.
|
|
256
256
|
- Sui GraphQL function filter probe output is source-shape evidence for function-filter diagnostics only.
|
|
257
257
|
- Do not treat the probe as a supported function diagnostics surface, complete dApp history, route quality evidence, wallet position inventory, transaction-building input, signing data, or signing readiness.
|
|
258
|
-
- Sui CLI transaction diagnostics can be compared with `
|
|
258
|
+
- Sui CLI transaction diagnostics can be compared with `read_inspect_sui_transaction` only at the fact category level.
|
|
259
259
|
- Comparable categories include digest/status/checkpoint/timestamp, Move call targets, object ids/types, event type strings, raw gas summary, and optional replay/trace-derived debug artifacts.
|
|
260
260
|
- Sui CLI transaction diagnostics are debug cross-check sources, not replacements for MCP normalized transaction facts and not review-time simulation.
|
|
261
261
|
- Sui CLI transaction diagnostics are source-checkout debug utilities only. They must stay allowlisted and read/debug-only.
|
|
@@ -266,10 +266,10 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
266
266
|
|
|
267
267
|
### Optional account-bound review smoke
|
|
268
268
|
|
|
269
|
-
Set `
|
|
270
|
-
`
|
|
269
|
+
Set `SUI_MCP_SMOKE_SWAP_PROTOCOL`, `SUI_MCP_SMOKE_SWAP_FROM_SYMBOL`, `SUI_MCP_SMOKE_SWAP_TO_SYMBOL` and
|
|
270
|
+
`SUI_MCP_SMOKE_SWAP_AMOUNT_DISPLAY` together to opt into read-only account-bound review
|
|
271
271
|
computation. Protocol is explicitly `deep`; the smoke does not silently select a protocol.
|
|
272
|
-
A partially configured group is an error. `
|
|
272
|
+
A partially configured group is an error. `SUI_MCP_SMOKE_SWAP_MAX_SLIPPAGE_BPS` keeps the
|
|
273
273
|
existing explicit override. The script uses the same runtime review composition,
|
|
274
274
|
material store and evidence validation as the product, and records whether
|
|
275
275
|
transaction review data was emitted. This can involve mainnet simulation but
|
|
@@ -7,7 +7,7 @@ in the source repository; tools are in [MCP Tools](MCP_TOOLS.md).
|
|
|
7
7
|
|
|
8
8
|
## Connection and read account
|
|
9
9
|
|
|
10
|
-
`
|
|
10
|
+
`session_open_wallet_connection_card` takes an intent: `connect`, `disconnect` or `manage` (the default). A connect-intent card automatically starts one pairing after the View confirms current state with its UI permission, unless a connection or operation already exists. Manage opens connection controls without starting pairing; Connect wallet starts it only after the user clicks. Disconnect opens target-specific confirmation when one connection is available; the user chooses Confirm disconnect or returns with Back. No model-facing call can disconnect or request a signature. Public saved reads never start pairing. QR data stays in UI metadata bound to the exact card, connection and revision; reopening a waiting card preserves that pairing.
|
|
11
11
|
|
|
12
12
|
Sui MCP uses one wallet connection at a time across all clients sharing a
|
|
13
13
|
data directory. That connection can approve several Sui mainnet addresses; other
|
|
@@ -42,7 +42,7 @@ The backend validates accounts, Sui mainnet namespace, methods and expiry before
|
|
|
42
42
|
recording a connection. A single wallet-approved account can become read context
|
|
43
43
|
from an explicit connection; multiple approved accounts require an explicit
|
|
44
44
|
selection. The active read account is stored in SQLite until changed or cleared.
|
|
45
|
-
SDK restoration and status reads never undo a user clearing that context. The stored selection is separate from its eligibility as a default for current asset reads. Implicit asset reads require a usable current wallet connection for the selected address; disconnection, expiry, pending disconnection, multiple-connection conflict or unavailable wallet state removes that default. Tools with an `account` input may still read an explicit address; connected-account-only tools require connection/account selection or recovery of wallet availability. Explicit-address public reads and saved transaction/activity reads remain available. `
|
|
45
|
+
SDK restoration and status reads never undo a user clearing that context. The stored selection is separate from its eligibility as a default for current asset reads. Implicit asset reads require a usable current wallet connection for the selected address; disconnection, expiry, pending disconnection, multiple-connection conflict or unavailable wallet state removes that default. Tools with an `account` input may still read an explicit address; connected-account-only tools require connection/account selection or recovery of wallet availability. Explicit-address public reads and saved transaction/activity reads remain available. `session_get_interaction_status.assetReadAccount` supplies that default-account decision alongside `connections` and `walletAvailability`.
|
|
46
46
|
|
|
47
47
|
| Connection state | Available behavior |
|
|
48
48
|
| --- | --- |
|
|
@@ -52,7 +52,7 @@ SDK restoration and status reads never undo a user clearing that context. The st
|
|
|
52
52
|
| connected | View approved accounts and expiry; a new card may select another operation |
|
|
53
53
|
| rejected / failed / expired / stopped / disconnected | View the recorded outcome; new operations need a new card |
|
|
54
54
|
|
|
55
|
-
`
|
|
55
|
+
`session_get_interaction_status` reports the last confirmed wallet-service observation and stored connections. SDK events and command checks apply review/request invalidation through the same database owner. An ordinary status read does not wait for a fresh SDK request, change the selected account or start a wallet operation. `walletObservation` identifies the local service run, observation order and check time; it is not proof of the wallet app's current screen or online status. See the [interaction API](MCP_TOOLS.md) for the response contract.
|
|
56
56
|
|
|
57
57
|
An admitted disconnect is a pending card operation, distinct from the last
|
|
58
58
|
confirmed connection state. The same connection cannot be selected for another
|
|
@@ -108,8 +108,9 @@ supersede a still-pending startup without erasing a known failure.
|
|
|
108
108
|
Restart completion does not confirm an interrupted disconnect or remove a
|
|
109
109
|
remote session. Check retained connections in the wallet app. If Settings or
|
|
110
110
|
the parent is unavailable, fully quit all apps using Sui MCP and reopen them;
|
|
111
|
-
closing a peer/window can leave the owner running.
|
|
112
|
-
|
|
111
|
+
closing a peer/window can leave the owner running. Stored endpoints and installation changes require the shared parent backend to
|
|
112
|
+
exit and restart. Client disable/refresh controls can supply this when all
|
|
113
|
+
participating processes exit; otherwise fully quit and reopen the apps.
|
|
113
114
|
|
|
114
115
|
A new owner records interrupted connection approval as stopped and unconfirmed
|
|
115
116
|
disconnection as failed. It does not repeat either request or restore their
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zktx.io/sui-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"mcpName": "io.github.zktx-mcp/sui-mcp",
|
|
5
5
|
"description": "Sui MCP is a local-first toolkit for helping AI applications and users inspect Sui DeFi actions before execution.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
|
|
4
4
|
|
|
5
|
-
Current product support is declared by `
|
|
5
|
+
Current product support is declared by `read_get_server_status`, `read_list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note does not expose margin support by itself.
|
|
6
6
|
|
|
7
7
|
DeepBook Margin is treated as mainnet protocol notes for Sui MCP.
|
|
8
8
|
|
package/protocols/deepbook-v3.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
|
|
4
4
|
|
|
5
|
-
Current product support is declared by `
|
|
5
|
+
Current product support is declared by `read_get_server_status`, `read_list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note only explains DeepBookV3 protocol concepts that those runtime surfaces may reference.
|
|
6
6
|
|
|
7
7
|
DeepBookV3 is the first protocol domain for Sui MCP.
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ Protocol concepts referenced by current runtime evidence include:
|
|
|
15
15
|
|
|
16
16
|
DeepBook orderbook, raw-quantity quote, and display-amount quote reads use an internal SDK simulation sender placeholder. They use `client.core.simulateTransaction` and do not require wallet connection because these market reads are not wallet-account reads. These read queries are separate from review-time simulation of the exact transaction material.
|
|
17
17
|
|
|
18
|
-
Signable swap review for the account-bound DeepBook swap route is part of current runtime support; `
|
|
18
|
+
Signable swap review for the account-bound DeepBook swap route is part of current runtime support; `read_list_supported_protocols` and the concrete MCP tool responses are the authoritative status. The internal Review card displays account-bound evidence after the backend validates the pinned registry, refreshes the live quote, resolves objects, and simulates the exact stored material with validation checks enabled. `ready_for_wallet_review` describes that evidence, not signing authority.
|
|
19
19
|
|
|
20
20
|
Out of scope:
|
|
21
21
|
|