@zktx.io/sui-mcp 0.7.0 → 0.8.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 +83 -42
- package/dist/core/activity/localDataService.js +8 -21
- package/dist/core/activity/localDataValidation.js +22 -46
- package/dist/core/activity/sqliteAccountStore.js +46 -0
- package/dist/core/activity/sqliteActivityStore.js +65 -147
- package/dist/core/activity/sqliteActivityStoreSchema.js +42 -26
- package/dist/core/activity/transactionActivityService.js +2 -2
- package/dist/core/preferences/preferencesStore.js +2 -2
- package/dist/core/preferences/sqlitePreferencesRepository.js +10 -0
- package/dist/core/session/cardResult.js +41 -0
- package/dist/core/session/cardSession.js +1 -1
- package/dist/core/session/cardSessionStore.js +51 -19
- package/dist/core/session/chainAccounts.js +120 -0
- package/dist/core/session/sessionStore.js +4 -8
- package/dist/core/session/settingsFileStore.js +3 -30
- package/dist/core/session/settingsOperation.js +27 -19
- package/dist/core/session/settingsWorkflow.js +161 -87
- package/dist/core/session/sqliteCardStore.js +34 -14
- package/dist/core/session/sqliteSessionStore.js +5 -5
- package/dist/core/session/sqliteSettingsWorkflowStore.js +135 -41
- package/dist/core/session/sqliteTransactionRequest.js +18 -0
- package/dist/core/session/sqliteWalletConnectionOperation.js +13 -0
- package/dist/core/session/sqliteWalletWorkflowStore.js +569 -333
- package/dist/core/session/status.js +2 -2
- package/dist/core/session/wait.js +6 -11
- package/dist/core/session/walletConnection.js +71 -46
- package/dist/core/session/walletConnectionOperations.js +24 -0
- package/dist/core/session/walletRuntime.js +7 -13
- package/dist/core/session/walletWorkflow.js +248 -99
- package/dist/core/session/workflowState.js +104 -38
- package/dist/core/session/workflowView.js +92 -101
- package/dist/mcp/activeAccountResponse.js +3 -0
- package/dist/mcp/responseGuidance.js +7 -9
- package/dist/mcp/serverInfo.js +11 -10
- package/dist/mcp/toolErrors.js +5 -3
- package/dist/mcp/toolNames.js +1 -0
- package/dist/mcp/tools/action/prepareSuiActionReview.js +9 -16
- package/dist/mcp/tools/read/readToolHelpers.js +9 -7
- package/dist/mcp/tools/session/executionResultTools.js +2 -2
- package/dist/mcp/tools/session/shared.js +2 -2
- package/dist/mcp/tools/session/statusTools.js +12 -10
- package/dist/mcp/tools/session/walletConnectionTools.js +26 -14
- package/dist/mcp/tools/settings/index.js +7 -4
- package/dist/mcp-app/account.html +7 -7
- package/dist/mcp-app/chart.html +3 -3
- package/dist/mcp-app/connect.html +13 -13
- package/dist/mcp-app/disconnect.html +3637 -0
- package/dist/mcp-app/disconnect.notices.txt +1480 -0
- package/dist/mcp-app/receipt.html +393 -393
- package/dist/mcp-app/review.html +459 -459
- package/dist/mcp-app/settings.html +7 -7
- package/dist/mcp-ui/contracts.js +3 -1
- package/dist/mcp-ui/tools.js +4 -4
- package/dist/runtime/application.js +1 -1
- package/dist/runtime/localSettingsService.js +7 -4
- package/dist/runtime/smokeMainnetRead.js +5 -4
- package/dist/runtime/walletConnectTransport.js +16 -16
- package/dist/runtime/walletSdkChildRuntime.js +29 -12
- package/dist/runtime/walletSdkIpc.js +5 -4
- package/dist/runtime/walletSdkProcess.js +24 -8
- package/docs/AGENT_BEHAVIOR.md +82 -54
- package/docs/LOCAL_DB_ARCHITECTURE.md +100 -70
- package/docs/MCP_SETUP.md +319 -339
- package/docs/MCP_TOOLS.md +292 -177
- package/docs/SDK_API.md +15 -6
- package/docs/TRANSACTION_ACTIVITY_LOG.md +4 -0
- package/docs/UTILITY_INDEX.md +9 -7
- package/docs/WALLET_CONNECTION.md +162 -167
- package/package.json +1 -1
package/docs/MCP_SETUP.md
CHANGED
|
@@ -4,36 +4,209 @@ This is the setup guide for Sui MCP clients. It owns installation, MCP client co
|
|
|
4
4
|
|
|
5
5
|
It does not define tool field contracts or response wording. Use `docs/MCP_TOOLS.md` for the MCP API reference and `docs/AGENT_BEHAVIOR.md` for the answer playbook.
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The normal path is **install once with npm → register the command in each app → ask your first question**. No source checkout or special installation folder is required.
|
|
8
8
|
|
|
9
|
-
These instructions
|
|
10
|
-
that exact version to be published; use the developer checkout instructions when
|
|
11
|
-
it is not available. A repository rename or local build does not publish the
|
|
12
|
-
package. Changing client settings or rebuilding files does not replace an
|
|
13
|
-
already running shared server. Restart all clients using the service and verify
|
|
14
|
-
the package identity when switching installations.
|
|
9
|
+
These instructions describe `@zktx.io/sui-mcp@0.8.0`. The npm commands work only after that exact version is published. A repository commit, local build or successful package check does not publish it. Do not substitute an older release and assume it has the behavior described here.
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
Already using Sui MCP? Follow [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation) before replacing a running installation.
|
|
17
12
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- WalletConnect: the backend's transport for wallet-approved connections and individual transaction requests.
|
|
24
|
-
- stdio: standard input/output, the local transport used by MCP clients to talk to this server.
|
|
25
|
-
- `@zktx.io`: the npm package scope. `zktx-mcp` is the GitHub organization. Sui MCP is the product; `sui-mcp` is the MCP server name and executable command.
|
|
26
|
-
|
|
27
|
-
Each MCP request, including its envelope and metadata, must fit within the
|
|
28
|
-
internal transport's 4 MiB request-body limit. Card messages have a separate
|
|
29
|
-
64 KiB budget; Restore uploads keep their 16 MiB file limit by sending smaller
|
|
30
|
-
messages. See [MCP Tools](MCP_TOOLS.md) for request and error semantics.
|
|
13
|
+
- [Install with npm](#published-package-setup)
|
|
14
|
+
- Register: [Codex](#codex), [Claude Desktop](#claude-desktop), [Claude Code](#claude-code), or [Cursor](#cursor)
|
|
15
|
+
- [Try it without a wallet](#first-use-flow)
|
|
16
|
+
- [Use several apps together](#using-multiple-apps)
|
|
17
|
+
- [Troubleshooting](#troubleshooting)
|
|
31
18
|
|
|
32
19
|
## Requirements
|
|
33
20
|
|
|
34
|
-
- Node.js 22
|
|
35
|
-
-
|
|
36
|
-
-
|
|
21
|
+
- Install Node.js 22 or newer; Node 24 LTS is a suitable choice. The [Node.js download page](https://nodejs.org/en/download) provides installers that include npm.
|
|
22
|
+
- Install the AI app you want to use. It must support running a local MCP server. MCP (Model Context Protocol) lets the app call Sui MCP's tools.
|
|
23
|
+
- Allow network access to npm for installation and Sui mainnet services for reads. Default Sui endpoints are built in; no API key or endpoint configuration is needed for the default path.
|
|
24
|
+
|
|
25
|
+
Open Terminal on macOS/Linux, or PowerShell on Windows, and check:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
node --version
|
|
29
|
+
npm --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Node must report `v22` or newer, and npm must print a version. If either command is missing, install Node.js and reopen the terminal before continuing. You can run the installation commands from any folder.
|
|
33
|
+
|
|
34
|
+
Interactive cards require the app's MCP Apps support. A local stdio connection alone does not establish card support. Clients without it can use ordinary read tools, including public-address reads, but cannot run Connect, Disconnect, Review or Settings workflows. The wallet-free text example below works without cards.
|
|
35
|
+
|
|
36
|
+
## Published Package Setup
|
|
37
|
+
|
|
38
|
+
### Install once with npm
|
|
39
|
+
|
|
40
|
+
Check that the version described by this guide is available:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npm view @zktx.io/sui-mcp@0.8.0 version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The result must be `0.8.0`. If the version is unavailable, stop here; see [NPM command returns 404](#npm-command-returns-404). Wait for publication, use the documentation for an available release, or deliberately choose the optional [developer checkout](#developer-checkout-setup). Dropping the version from the install command can install a different release.
|
|
47
|
+
|
|
48
|
+
Install the published package:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm install -g @zktx.io/sui-mcp@0.8.0
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Install once in the Node/npm environment your apps use, then register each app separately. `-g` makes the executable available across projects; it does not automatically configure every app or grant access to other operating-system users. The installed version stays in place until you explicitly update it.
|
|
55
|
+
|
|
56
|
+
Use the full scoped name `@zktx.io/sui-mcp`: the unscoped npm package `sui-mcp` is a different project that can expose the same executable name. The package supplies a command named `sui-mcp`; use that command in the app configurations below. No runtime arguments, environment variables, repository path, database installation or WalletConnect project ID are needed for default setup.
|
|
57
|
+
|
|
58
|
+
If installation reports a permission error, see [Global installation permission error](#global-installation-permission-error). If the app cannot find the installed command, see [Command not found](#command-not-found).
|
|
59
|
+
|
|
60
|
+
## Codex
|
|
61
|
+
|
|
62
|
+
Codex Desktop, CLI and IDE integrations on the same Codex host share MCP configuration. You can configure the desktop app without installing the CLI separately.
|
|
63
|
+
|
|
64
|
+
1. Open `~/.codex/config.toml` in a plain-text editor; create the folder/file if it does not exist. On macOS, Finder → Go → Go to Folder accepts `~/.codex`. On Windows, the default file is `%USERPROFILE%\.codex\config.toml`.
|
|
65
|
+
2. Add the following table. If it already exists, update it instead of adding another one. Keep unrelated configuration in the file.
|
|
66
|
+
|
|
67
|
+
```toml
|
|
68
|
+
[mcp_servers.sui-mcp]
|
|
69
|
+
command = "sui-mcp"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
3. If the server was previously disabled, enable its entry in MCP settings. Save the configuration and fully restart Codex once to load it; an additional Refresh is not needed after that restart. Do this between tasks because restarting or refreshing can interrupt an active session.
|
|
73
|
+
4. In a new chat, use the [first question](#first-use-flow) below to confirm the running package and version. Seeing a configuration entry alone does not confirm that the server started.
|
|
74
|
+
|
|
75
|
+
If you already use Codex CLI, this command is an alternative to editing TOML, not an additional step:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
codex mcp add sui-mcp -- sui-mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run `codex mcp list` or use `/mcp` inside the terminal UI to inspect configured servers. No custom timeout values are required for the normal global-install configuration. See the [official Codex MCP guide](https://developers.openai.com/codex/mcp) for configuration options.
|
|
82
|
+
|
|
83
|
+
## Claude Desktop
|
|
84
|
+
|
|
85
|
+
1. Open the desktop app's Settings → Developer → Edit Config. This is the desktop app configuration, not the web account settings.
|
|
86
|
+
2. Add `sui-mcp` under `mcpServers` in `claude_desktop_config.json`. For an otherwise empty configuration, use:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"sui-mcp": {
|
|
92
|
+
"command": "sui-mcp"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If `mcpServers` already contains other entries, add only the `sui-mcp` member and a comma between members. Keep other servers and settings; do not replace the entire file. JSON does not allow comments or trailing commas.
|
|
99
|
+
|
|
100
|
+
The configuration file is normally at:
|
|
101
|
+
|
|
102
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
103
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
104
|
+
|
|
105
|
+
3. Save the file, fully quit Claude Desktop and reopen it.
|
|
106
|
+
4. Start a new chat and use the [first question](#first-use-flow) below. The app may ask you to allow tool use. A successful server-status response confirms the connection.
|
|
107
|
+
|
|
108
|
+
If the server does not appear, the MCP logs are normally at `~/Library/Logs/Claude` on macOS or `%APPDATA%\Claude\logs` on Windows. General connection logs use `mcp.log`; the server's stderr is in `mcp-server-sui-mcp.log`. The [official local-server walkthrough](https://modelcontextprotocol.io/docs/develop/connect-local-servers) illustrates the Developer configuration screen.
|
|
109
|
+
|
|
110
|
+
## Claude Code
|
|
111
|
+
|
|
112
|
+
With Claude Code installed, run this in a terminal:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
claude mcp add --transport stdio --scope user sui-mcp -- sui-mcp
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The user scope makes this registration available across your projects. Use `--scope local` for only the current project, or `--scope project` to share a `.mcp.json` registration with a project. Choose one scope; do not register duplicate copies for normal setup. CLI options precede the server name; `--` separates them from the server command.
|
|
119
|
+
|
|
120
|
+
Start a new Claude Code session. Use `/mcp` to inspect the connection, then ask the [first question](#first-use-flow). You can also inspect the registration with:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
claude mcp get sui-mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
After a configuration change, restart the session so it starts the new command. See the [official Claude Code MCP guide](https://code.claude.com/docs/en/mcp) for scope and connection details.
|
|
127
|
+
|
|
128
|
+
## Cursor
|
|
129
|
+
|
|
130
|
+
1. Open or create `~/.cursor/mcp.json` for a user-wide registration. On Windows, this is normally `%USERPROFILE%\.cursor\mcp.json`. For only one project, use that project's `.cursor/mcp.json` instead; you do not need both.
|
|
131
|
+
2. Add this configuration, preserving any other members already in `mcpServers`:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"mcpServers": {
|
|
136
|
+
"sui-mcp": {
|
|
137
|
+
"type": "stdio",
|
|
138
|
+
"command": "sui-mcp"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
3. Save and restart Cursor. Open its MCP management view (Customize → MCP in current versions), check that `sui-mcp` is enabled, and allow the connection if prompted.
|
|
145
|
+
4. Start an Agent chat and ask the [first question](#first-use-flow). A returned server status confirms startup. If it fails, inspect the server's error in the MCP management view or the MCP Logs channel in Output.
|
|
146
|
+
|
|
147
|
+
See the [official Cursor MCP guide](https://cursor.com/docs/mcp) if your version presents these settings differently.
|
|
148
|
+
|
|
149
|
+
## First Use Flow
|
|
150
|
+
|
|
151
|
+
### 1. Confirm the running server
|
|
152
|
+
|
|
153
|
+
After registering your app, paste this into a new chat, not a terminal:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Use Sui MCP to show its package name, server name, version and network.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The app should call `read_get_server_status`. Confirm `packageName` is `@zktx.io/sui-mcp`, `serverName` is `sui-mcp`, `version` is `0.8.0` and `network` is `mainnet`. These are the expected identifiers, not a sample observation. If the version differs, use [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation) rather than assuming the new installation replaced a running server.
|
|
160
|
+
|
|
161
|
+
### 2. Try a read without connecting a wallet
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
Use Sui MCP to list the available DeepBook pools on Sui mainnet.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The app should call `read_list_deepbook_pools` and return pool names and trading assets. Results can change; no fixed pool count or price is required. This request needs no wallet, funds, card, signature or transaction. A successful status response followed by this read confirms that the app can reach Sui MCP and use a mainnet read tool. If a network read fails, use the returned reason and [Troubleshooting](#troubleshooting); do not connect a wallet to fix it.
|
|
168
|
+
|
|
169
|
+
If you want to try an interactive read card in an MCP Apps-capable app, ask:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
Show a DeepBook SUI/USDC price chart in Sui MCP.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Expect a read-only Chart card with candle data, or an explicit source/availability result. A chart-data failure is separate from installation failure. No wallet connection or signing is involved. An app without the required card support can still use the text read above.
|
|
176
|
+
|
|
177
|
+
### 3. Optionally connect your wallet for asset reads
|
|
178
|
+
|
|
179
|
+
This is separate from installation. Use an app that can display MCP Apps cards and a wallet that supports WalletConnect for the requested networks.
|
|
180
|
+
|
|
181
|
+
The initial network selection is Sui. To request Ethereum and/or Solana addresses as well, first ask "Open my Sui MCP Settings card", choose Wallet networks, select the networks and choose Save networks. These choices apply only to the next connection. Other-chain addresses do not enable other-chain financial actions.
|
|
182
|
+
|
|
183
|
+
Then ask:
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
Connect my wallet using Sui MCP.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The internal Connect card checks current state and displays a QR for its one request. Scan it with your wallet and approve the connection. This is connection approval, not transaction approval. A completed card shows its fixed result without addresses, QR or further controls.
|
|
190
|
+
|
|
191
|
+
Ask "Show my current Sui MCP connection and wallet balances". The agent reads `session_get_interaction_status` and, when its Sui read context is usable, `read_summarize_wallet_assets`. A wallet can approve only a subset of requested networks; only valid returned addresses are usable. Change wallet, address or approved networks by asking to disconnect, confirming the separate Disconnect card, and requesting a new connection.
|
|
192
|
+
|
|
193
|
+
You can instead supply a Sui public address for a tool that accepts `account`; connecting a wallet is not required for that explicit-address read. DeepBook account inventory requires the current connected Sui read address and does not accept an explicit address input.
|
|
194
|
+
|
|
195
|
+
### For agents
|
|
196
|
+
|
|
197
|
+
Use the user's request to select subsequent read tools; do not run a tool checklist as installation work. `read_classify_wallet_assets` classifies coin balances, `read_preview_intent_evidence` handles supported USD-denominated questions, `read_summarize_deepbook_account_inventory` reads connected-account inventory, and the Sui activity tools provide bounded activity reads. For saved review evidence, use `read_list_review_activity`, `read_summarize_review_funnel` or `read_get_review_session_detail`.
|
|
198
|
+
|
|
199
|
+
Before evidence-policy checks, record `packageName`, `version`, `evidencePolicy.version`, `network` and the returned numeric `implementedToolsCount` from `read_get_server_status`; do not hand-count the tool array. Use `session_get_interaction_status.assetReadAccount` to determine whether implicit asset reads are usable; `account_get_active_account` alone reports stored read context, not a usable connection. Read/wait on a connection card only by its returned `cardId`. Settings and wallet changes require the user's scoped card actions. Follow [MCP Tools](MCP_TOOLS.md) and [Agent Behavior](AGENT_BEHAVIOR.md) for exact contracts and question flows.
|
|
200
|
+
|
|
201
|
+
## Using Multiple Apps
|
|
202
|
+
|
|
203
|
+
You can use Sui MCP from several local apps at the same time, for example Codex and Claude Desktop on the same computer under the same operating-system user. Install the npm package once and register `sui-mcp` in each app; you do not need a separate server installation or wallet pairing per app.
|
|
204
|
+
|
|
205
|
+
With default settings, the apps automatically use the same local backend, data folder, saved settings and one current wallet connection. A connection made or disconnected in one app affects the current connection seen by the others. There is still only one connection with one fixed address per approved chain, not one wallet connection per app. Completed cards keep their original results; another app's actions do not reopen or rewrite them. Transaction approval is required for every transaction.
|
|
206
|
+
|
|
207
|
+
All participating apps must use the same package release and configuration. If you deliberately override `SUI_MCP_DATA_DIR` or `SUI_MCP_REVIEW_PORT`, use the same values in every app; these overrides are not needed for normal setup. An incompatible running backend is refused rather than replaced. This sharing is local to the computer/user, not a remote or cloud connection.
|
|
208
|
+
|
|
209
|
+
When updating the package or applying stored endpoint changes, stop Sui MCP in all participating apps and let the shared backend exit before reopening them. Closing one chat or one app may leave the backend running for the others. Follow [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation); an ordinary second-app registration does not require reinstalling the package or repeating a completed connection test.
|
|
37
210
|
|
|
38
211
|
## Default Setup
|
|
39
212
|
|
|
@@ -52,7 +225,23 @@ They do not require wallet connection.
|
|
|
52
225
|
|
|
53
226
|
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
227
|
|
|
55
|
-
Reads that require a
|
|
228
|
+
Reads that require a current fixed wallet address use `session_open_wallet_connection_card`. Tools with an `account` input also accept an explicit Sui address without a wallet connection.
|
|
229
|
+
|
|
230
|
+
## Key terms
|
|
231
|
+
|
|
232
|
+
- Sui: the mainnet blockchain whose DeFi state this project reads.
|
|
233
|
+
- MCP: Model Context Protocol, the tool-calling interface used by AI clients.
|
|
234
|
+
- DeepBook: Sui's onchain order book protocol.
|
|
235
|
+
- SDK: Software Development Kit, a version-pinned library dependency used by this repository.
|
|
236
|
+
- gRPC and GraphQL: Sui SDK transports used by this runtime for mainnet reads.
|
|
237
|
+
- WalletConnect: the backend's transport for wallet-approved connections and individual transaction requests.
|
|
238
|
+
- stdio: standard input/output, the local transport used by MCP clients to talk to this server.
|
|
239
|
+
- `@zktx.io`: the npm package scope. `zktx-mcp` is the GitHub organization. Sui MCP is the product; `sui-mcp` is the MCP server name and executable command.
|
|
240
|
+
|
|
241
|
+
Each MCP request, including its envelope and metadata, must fit within the
|
|
242
|
+
internal transport's 4 MiB request-body limit. Card messages have a separate
|
|
243
|
+
64 KiB budget; Restore uploads keep their 16 MiB file limit by sending smaller
|
|
244
|
+
messages. See [MCP Tools](MCP_TOOLS.md) for request and error semantics.
|
|
56
245
|
|
|
57
246
|
## Developer Checkout Setup
|
|
58
247
|
|
|
@@ -60,7 +249,7 @@ Use Node.js 22.12 or newer within 22.x, or Node.js 24 or newer, for source build
|
|
|
60
249
|
and tests. These ranges satisfy Vite, Rolldown and Vitest together. The installed
|
|
61
250
|
package's runtime requirement remains Node.js 22 or newer.
|
|
62
251
|
|
|
63
|
-
|
|
252
|
+
This is optional for contributors and unpublished source builds. Normal npm installation does not require Git, a repository checkout, build commands or a custom runtime path. Install Git as well as Node.js before using this path:
|
|
64
253
|
|
|
65
254
|
```bash
|
|
66
255
|
git clone https://github.com/zktx-mcp/sui-mcp.git
|
|
@@ -69,6 +258,8 @@ npm install
|
|
|
69
258
|
npm run build
|
|
70
259
|
```
|
|
71
260
|
|
|
261
|
+
After building, use the app-specific registration instructions above, but replace the global command with `node` and the absolute path to the built file. Replace the example path with your checkout location; no particular checkout folder is required:
|
|
262
|
+
|
|
72
263
|
Generic stdio MCP configuration:
|
|
73
264
|
|
|
74
265
|
```json
|
|
@@ -114,79 +305,28 @@ npm run smoke:mainnet
|
|
|
114
305
|
|
|
115
306
|
## Install from the MCP Registry
|
|
116
307
|
|
|
117
|
-
If your
|
|
118
|
-
[MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=sui-mcp),
|
|
119
|
-
find the `io.github.zktx-mcp/sui-mcp` entry and install it through your
|
|
120
|
-
client. The resulting stdio server command is equivalent to:
|
|
121
|
-
|
|
122
|
-
```sh
|
|
123
|
-
npx -y @zktx.io/sui-mcp
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Clients that do not install from the registry use the published-package and
|
|
127
|
-
per-client configuration below, which give the exact `command` and `args`.
|
|
308
|
+
This is an alternative to the global-install path. If your client supports the [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=sui-mcp), choose `io.github.zktx-mcp/sui-mcp` and check that the offered package is `@zktx.io/sui-mcp` at version `0.8.0`. Do not assume the registry entry already offers an unpublished release. Check the running identity through the first-use flow after registration.
|
|
128
309
|
|
|
129
|
-
##
|
|
310
|
+
## Download on demand (npx)
|
|
130
311
|
|
|
131
|
-
|
|
132
|
-
require the requested version to be published; confirm it with
|
|
133
|
-
`npm view @zktx.io/sui-mcp@0.7.0 version` before switching. Both installation
|
|
134
|
-
methods start the same `sui-mcp` stdio MCP server. Use a local checkout when
|
|
135
|
-
working on a version that has not been published.
|
|
136
|
-
|
|
137
|
-
### Download on demand (npx, tracks the latest release)
|
|
312
|
+
Use this alternative if you do not want a global install. Replace the global command in your app registration with this exact-version launch configuration:
|
|
138
313
|
|
|
139
314
|
```json
|
|
140
315
|
{
|
|
141
316
|
"command": "npx",
|
|
142
|
-
"args": ["-y", "@zktx.io/sui-mcp"]
|
|
317
|
+
"args": ["-y", "@zktx.io/sui-mcp@0.8.0"]
|
|
143
318
|
}
|
|
144
319
|
```
|
|
145
320
|
|
|
146
|
-
|
|
147
|
-
trade-off: the first launch (or the first after the npx cache is cleared)
|
|
148
|
-
downloads the package and its native dependencies. On a cold cache this can take
|
|
149
|
-
long enough to exceed a client's MCP startup timeout, so the client may stop the
|
|
150
|
-
server before it connects. If that happens, warm the cache once in a terminal and
|
|
151
|
-
then restart the client:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
npx -y @zktx.io/sui-mcp
|
|
155
|
-
# after the server binds or a healthy peer is confirmed, stop it with Ctrl-C
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
The startup log reports either an owned shared server or an authenticated healthy
|
|
159
|
-
peer. A bootstrap failure instead reports its stage and reason on stderr.
|
|
160
|
-
|
|
161
|
-
### Install once (global, fastest startup, pinned version)
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
npm install -g @zktx.io/sui-mcp
|
|
165
|
-
```
|
|
321
|
+
For Codex, the equivalent is:
|
|
166
322
|
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
The global `sui-mcp` command starts with no per-launch download, so it
|
|
174
|
-
avoids the cold-start timeout, and it stays on the installed version until you
|
|
175
|
-
update it explicitly:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
npm install -g @zktx.io/sui-mcp@latest
|
|
323
|
+
```toml
|
|
324
|
+
[mcp_servers.sui-mcp]
|
|
325
|
+
command = "npx"
|
|
326
|
+
args = ["-y", "@zktx.io/sui-mcp@0.8.0"]
|
|
179
327
|
```
|
|
180
328
|
|
|
181
|
-
|
|
182
|
-
command name. Always install the full `@zktx.io/sui-mcp` package and verify
|
|
183
|
-
`read_get_server_status.packageName` after starting it. If another installation
|
|
184
|
-
owns the global command, use the scoped `npx` configuration instead.
|
|
185
|
-
|
|
186
|
-
The per-client sections below use the `npx` form. To use a global install
|
|
187
|
-
instead, replace the published-package command with `"command": "sui-mcp"`
|
|
188
|
-
and drop the `args`. On native Windows clients that need `cmd`, wrap either
|
|
189
|
-
command, for example `"command": "cmd", "args": ["/c", "npx", "-y", "@zktx.io/sui-mcp"]`.
|
|
329
|
+
This downloads the requested published package as needed. A cold cache can exceed the app's startup timeout; the global install avoids per-launch package resolution. Keep the exact version in every app's configuration. Neither an unversioned package name nor `@latest` guarantees the version described by this guide.
|
|
190
330
|
|
|
191
331
|
## Switching the Installed Package
|
|
192
332
|
|
|
@@ -229,8 +369,9 @@ restart first. A previous wallet pairing can remain in the wallet app; remove
|
|
|
229
369
|
an unwanted pairing there rather than assuming new local storage disconnected it.
|
|
230
370
|
|
|
231
371
|
Replace the old registration instead of adding a second one. Use
|
|
232
|
-
`sui-mcp` as the default registration name
|
|
233
|
-
|
|
372
|
+
`sui-mcp` as the default registration name. Install `@zktx.io/sui-mcp@0.8.0`
|
|
373
|
+
globally and register the `sui-mcp` command, or use the exact-version
|
|
374
|
+
[npx alternative](#download-on-demand-npx). A client-defined alias does not change the package,
|
|
234
375
|
server identity or permissions. Remove obsolete runtime environment overrides. If you set
|
|
235
376
|
`SUI_MCP_DATA_DIR`, choose a new empty directory; never point it at another
|
|
236
377
|
package's database or private WalletConnect store. Keep the same new directory
|
|
@@ -238,8 +379,7 @@ and `SUI_MCP_REVIEW_PORT` in every participating client.
|
|
|
238
379
|
|
|
239
380
|
After restarting the clients, call `read_get_server_status` in each. Check
|
|
240
381
|
`packageName`, `version` and `serverName`: they must identify the intended npm
|
|
241
|
-
package and version, with `serverName` equal to `sui-mcp`.
|
|
242
|
-
card and confirm the new empty wallet state. This check does not require signing
|
|
382
|
+
package and version, with `serverName` equal to `sui-mcp`. Read `session_get_interaction_status` to confirm the new empty wallet state. This check does not require signing
|
|
243
383
|
or submitting a transaction. Prior conversation cards are not current controls;
|
|
244
384
|
open cards through the new registration.
|
|
245
385
|
|
|
@@ -252,225 +392,6 @@ select the current installation; no previous-package aliases are supported.
|
|
|
252
392
|
Card addresses use `suimcp://` and `ui://sui-mcp/`; see
|
|
253
393
|
[MCP Tools](MCP_TOOLS.md#resources).
|
|
254
394
|
|
|
255
|
-
## Claude Code
|
|
256
|
-
|
|
257
|
-
Claude Code supports local stdio MCP servers through `claude mcp add`. Put Claude CLI options such as `--transport` and `--scope` before the server name; the `--` separator starts the command that runs Sui MCP.
|
|
258
|
-
|
|
259
|
-
Developer checkout:
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
claude mcp add --transport stdio \
|
|
263
|
-
sui-mcp \
|
|
264
|
-
-- node /absolute/path/to/sui-mcp/dist/runtime/start.js
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
Published npm package:
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
claude mcp add --transport stdio \
|
|
271
|
-
sui-mcp \
|
|
272
|
-
-- npx -y @zktx.io/sui-mcp
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Claude Code scopes:
|
|
276
|
-
|
|
277
|
-
- `local`: default; private to the current project.
|
|
278
|
-
- `project`: shared through a checked-in `.mcp.json`.
|
|
279
|
-
- `user`: private to your user account and available across projects.
|
|
280
|
-
|
|
281
|
-
Project-scope `.mcp.json` example:
|
|
282
|
-
|
|
283
|
-
```json
|
|
284
|
-
{
|
|
285
|
-
"mcpServers": {
|
|
286
|
-
"sui-mcp": {
|
|
287
|
-
"type": "stdio",
|
|
288
|
-
"command": "node",
|
|
289
|
-
"args": ["/absolute/path/to/sui-mcp/dist/runtime/start.js"]
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
Verify the server and tool list:
|
|
296
|
-
|
|
297
|
-
```bash
|
|
298
|
-
claude mcp list
|
|
299
|
-
claude mcp get sui-mcp
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Inside Claude Code, use `/mcp` to inspect connected servers. After changing MCP configuration or rebuilding the local runtime, restart the Claude Code session so the stdio process is started from the new command. If startup is slow, launch Claude Code with a larger startup timeout such as `MCP_TIMEOUT=10000 claude`.
|
|
303
|
-
|
|
304
|
-
## Claude Desktop
|
|
305
|
-
|
|
306
|
-
Claude Desktop can run local stdio MCP servers through its Developer settings. It does not require a `.dxt` extension for this package.
|
|
307
|
-
|
|
308
|
-
Open Claude Desktop settings, go to Developer, choose Edit Config, and add a server to `claude_desktop_config.json`.
|
|
309
|
-
|
|
310
|
-
Common config paths:
|
|
311
|
-
|
|
312
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
313
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
314
|
-
|
|
315
|
-
Developer checkout:
|
|
316
|
-
|
|
317
|
-
```json
|
|
318
|
-
{
|
|
319
|
-
"mcpServers": {
|
|
320
|
-
"sui-mcp": {
|
|
321
|
-
"command": "node",
|
|
322
|
-
"args": ["/absolute/path/to/sui-mcp/dist/runtime/start.js"]
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Published npm package:
|
|
329
|
-
|
|
330
|
-
```json
|
|
331
|
-
{
|
|
332
|
-
"mcpServers": {
|
|
333
|
-
"sui-mcp": {
|
|
334
|
-
"command": "npx",
|
|
335
|
-
"args": ["-y", "@zktx.io/sui-mcp"]
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
On native Windows, use `cmd /c` if direct `npx` or `node` resolution fails:
|
|
342
|
-
|
|
343
|
-
```json
|
|
344
|
-
{
|
|
345
|
-
"mcpServers": {
|
|
346
|
-
"sui-mcp": {
|
|
347
|
-
"command": "cmd",
|
|
348
|
-
"args": ["/c", "npx", "-y", "@zktx.io/sui-mcp"]
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Save the file and fully restart Claude Desktop. If the server does not appear, check MCP logs:
|
|
355
|
-
|
|
356
|
-
- macOS: `~/Library/Logs/Claude`
|
|
357
|
-
- Windows: `%APPDATA%\Claude\logs`
|
|
358
|
-
|
|
359
|
-
Claude Desktop writes general MCP connection logs to `mcp.log` and named server stderr logs to files such as `mcp-server-sui-mcp.log`.
|
|
360
|
-
|
|
361
|
-
## Codex
|
|
362
|
-
|
|
363
|
-
Codex CLI supports stdio MCP servers and stores MCP settings in `config.toml`; by default this is `~/.codex/config.toml`, and trusted projects can use `.codex/config.toml`.
|
|
364
|
-
|
|
365
|
-
Developer checkout:
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
codex mcp add sui-mcp \
|
|
369
|
-
-- node /absolute/path/to/sui-mcp/dist/runtime/start.js
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
Published npm package:
|
|
373
|
-
|
|
374
|
-
```bash
|
|
375
|
-
codex mcp add sui-mcp \
|
|
376
|
-
-- npx -y @zktx.io/sui-mcp
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
Verify with:
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
codex mcp list
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
Inside the Codex TUI, use `/mcp` to see active MCP servers.
|
|
386
|
-
|
|
387
|
-
Equivalent `~/.codex/config.toml` entry for a developer checkout:
|
|
388
|
-
|
|
389
|
-
```toml
|
|
390
|
-
[mcp_servers.sui-mcp]
|
|
391
|
-
command = "node"
|
|
392
|
-
args = ["/absolute/path/to/sui-mcp/dist/runtime/start.js"]
|
|
393
|
-
startup_timeout_sec = 10
|
|
394
|
-
tool_timeout_sec = 60
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
Equivalent `~/.codex/config.toml` entry after npm publication:
|
|
398
|
-
|
|
399
|
-
```toml
|
|
400
|
-
[mcp_servers.sui-mcp]
|
|
401
|
-
command = "npx"
|
|
402
|
-
args = ["-y", "@zktx.io/sui-mcp"]
|
|
403
|
-
startup_timeout_sec = 10
|
|
404
|
-
tool_timeout_sec = 60
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
After changing `config.toml`, restart the Codex session so the stdio process is relaunched from the new config.
|
|
408
|
-
|
|
409
|
-
## Cursor
|
|
410
|
-
|
|
411
|
-
Cursor supports MCP servers through `mcp.json`.
|
|
412
|
-
|
|
413
|
-
Configuration locations:
|
|
414
|
-
|
|
415
|
-
- Project-specific: `.cursor/mcp.json`
|
|
416
|
-
- Global: `~/.cursor/mcp.json`
|
|
417
|
-
|
|
418
|
-
Developer checkout:
|
|
419
|
-
|
|
420
|
-
```json
|
|
421
|
-
{
|
|
422
|
-
"mcpServers": {
|
|
423
|
-
"sui-mcp": {
|
|
424
|
-
"command": "node",
|
|
425
|
-
"args": ["/absolute/path/to/sui-mcp/dist/runtime/start.js"]
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
Published npm package:
|
|
432
|
-
|
|
433
|
-
```json
|
|
434
|
-
{
|
|
435
|
-
"mcpServers": {
|
|
436
|
-
"sui-mcp": {
|
|
437
|
-
"command": "npx",
|
|
438
|
-
"args": ["-y", "@zktx.io/sui-mcp"]
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
Restart Cursor after changing `mcp.json`. Cursor MCP logs are available from the Output panel; choose the MCP Logs output channel.
|
|
445
|
-
|
|
446
|
-
## First Use Flow
|
|
447
|
-
|
|
448
|
-
After the MCP server is connected:
|
|
449
|
-
|
|
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
|
-
2. Use wallet-free read tools directly when you need market context:
|
|
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
|
-
5. Scan the card’s pairing QR in a Sui mainnet wallet and approve the connection. This is not approval of a transaction.
|
|
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 `session_get_interaction_status` to check the connection and available default asset account. `account_get_active_account` separately reports the stored selection.
|
|
463
|
-
Then call the read tool that matches the user's request:
|
|
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
|
-
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 `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
|
-
|
|
474
395
|
## Wallet Connection Boundary
|
|
475
396
|
|
|
476
397
|
An active account is read context, not login, ownership proof or transaction
|
|
@@ -487,11 +408,13 @@ local configuration value. Only the backend owner starts its isolated SDK child,
|
|
|
487
408
|
clients use the same product identifier when identifying that shared backend.
|
|
488
409
|
Do not paste pairing URIs or UI permission values into chat.
|
|
489
410
|
|
|
490
|
-
Sui MCP allows one
|
|
491
|
-
with one
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
411
|
+
Sui MCP allows one current wallet connection across the shared data folder,
|
|
412
|
+
with one fixed address per returned requested chain. Settings selects requested
|
|
413
|
+
Sui, Ethereum and Solana mainnet networks; financial actions remain Sui-only.
|
|
414
|
+
Change wallet, address or approved scope by disconnecting and reconnecting.
|
|
415
|
+
An unexpected SDK session is not adopted or listed as another product choice.
|
|
416
|
+
Remove it in the wallet app and check status before new pairing or financial input.
|
|
417
|
+
The product never silently chooses or remotely removes an unexpected session.
|
|
495
418
|
|
|
496
419
|
Connection service restart belongs to Settings, not Connect. If an operation
|
|
497
420
|
is unresponsive or the service is unavailable, ask to open Settings and use
|
|
@@ -549,19 +472,24 @@ To inspect settings or change stored endpoints, ask your AI client:
|
|
|
549
472
|
- "Show my Sui MCP local settings."
|
|
550
473
|
- "Open my Sui MCP Settings card."
|
|
551
474
|
|
|
552
|
-
Settings groups Address for viewing assets, Local records,
|
|
553
|
-
Advanced settings. Each card lets you make one change and
|
|
475
|
+
Settings groups Address for viewing assets, Wallet networks, Local records,
|
|
476
|
+
Troubleshooting and Advanced settings. Each card lets you make one change and
|
|
477
|
+
keeps its result:
|
|
554
478
|
|
|
555
|
-
-
|
|
479
|
+
- clear the saved Sui address used for implicit reads, without disconnecting the
|
|
480
|
+
wallet, changing its fixed addresses or cancelling transaction requests;
|
|
481
|
+
- choose Sui, Ethereum and/or Solana mainnet networks for new wallet connections;
|
|
556
482
|
- back up records saved on this computer;
|
|
557
483
|
- restore a Sui MCP backup, replacing the current local records and settings;
|
|
558
484
|
- delete local records and saved settings;
|
|
559
485
|
- check or restart the wallet connection service;
|
|
560
486
|
- select a custom Sui network address or return to a built-in default.
|
|
561
487
|
|
|
562
|
-
|
|
563
|
-
and Sui
|
|
564
|
-
|
|
488
|
+
Backups include chain-qualified address history, reviews, transaction and activity
|
|
489
|
+
records, requested wallet networks and Sui endpoint settings. They do not contain
|
|
490
|
+
the current connection, an active-account selection, read-address suppression or
|
|
491
|
+
wallet approvals. Restoring records does not reconnect a wallet or activate a
|
|
492
|
+
saved address. Transactions on Sui are not cancelled by a restore or reset.
|
|
565
493
|
Internal request IDs and file hashes appear in Details. Advanced settings names
|
|
566
494
|
the Sui node connection as gRPC and the activity-data connection as GraphQL.
|
|
567
495
|
Network addresses set in the app launch configuration take priority over values
|
|
@@ -577,9 +505,9 @@ Settings validation rules:
|
|
|
577
505
|
- 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.
|
|
578
506
|
- 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.
|
|
579
507
|
- 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.
|
|
580
|
-
- If an earlier attempt may already have saved a copy, Save a local copy
|
|
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
|
|
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
|
|
508
|
+
- If an earlier attempt may already have saved a copy, a new delivery card offers Save a local copy with that warning. Retry save needs a new delivery card and a proven `not_published` failure. While saving or checking an uncertain result, Check status checks the same request without creating another file.
|
|
509
|
+
- An accepted download request does not prove that the file was saved. If delivery fails or cannot be confirmed, ask for a new delivery card for that backup. Its Retry download sends the same snapshot within the original thirty-minute period; the ended card has no retry controls. 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.
|
|
510
|
+
- 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 was not confirmed at completion, ask for a new Settings status card for that operation. It checks current cleanup without repeating the action, and the original result stays fixed. 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.
|
|
583
511
|
- 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.
|
|
584
512
|
- Current-format backups can contain `function_scan` provenance. Unsupported formats and scan-kind values are rejected rather than partially imported.
|
|
585
513
|
- Endpoint chain-identifier verification runs only when the user confirms the replace-only import.
|
|
@@ -643,7 +571,7 @@ builds, and verifies the actual npm tarball and bundled licenses. It installs th
|
|
|
643
571
|
tarball in a temporary directory and runs that installed binary to check MCP
|
|
644
572
|
initialization, tools, document/card resources, the internal Settings card and
|
|
645
573
|
assets, and the isolated SDK child. It confirms that Connect rejects restart
|
|
646
|
-
input,
|
|
574
|
+
input, ordinary model calls start no pairing, and the SDK keeps its exclusive
|
|
647
575
|
storage lease until shutdown. Runtime startup requires reachable Sui mainnet endpoints; a startup
|
|
648
576
|
failure leaves dependent checks unverified. The check uses an isolated data
|
|
649
577
|
directory and port, ends the child process before cleanup, and does not use your
|
|
@@ -653,7 +581,7 @@ See [Utility Index](UTILITY_INDEX.md#release-package-check) for prerequisites.
|
|
|
653
581
|
## Current Release Limitations
|
|
654
582
|
|
|
655
583
|
- Product-facing behavior is mainnet-only.
|
|
656
|
-
- Current asset reads without an explicit address require the
|
|
584
|
+
- Current asset reads without an explicit address require the saved Sui read address to belong to a usable current wallet connection. An explicit address works only for tools that accept `account`; DeepBook account inventory instead needs the saved Sui read address and a usable current connection. Saved result reads remain available.
|
|
657
585
|
- Account-bound DeepBook review requires all evidence stages. The internal
|
|
658
586
|
Review card then allows an explicit WalletConnect request under user control.
|
|
659
587
|
Requests and observed chain results are separate; missing results remain
|
|
@@ -687,12 +615,15 @@ The smoke script calls read-only MCP tools against mainnet:
|
|
|
687
615
|
- DeepBook orderbook;
|
|
688
616
|
- raw-quantity DeepBook quote;
|
|
689
617
|
- `read_scan_sui_account_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
690
|
-
- `read_summarize_sui_activity_scan`
|
|
618
|
+
- `read_summarize_sui_activity_scan` for the explicit `SUI_MCP_SMOKE_ADDRESS` with limit 5.
|
|
691
619
|
|
|
692
620
|
When `SUI_MCP_SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`, it also calls:
|
|
693
621
|
|
|
694
622
|
- `read_scan_sui_function_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
695
|
-
- `read_summarize_sui_function_activity_scan`
|
|
623
|
+
- `read_summarize_sui_function_activity_scan` for the explicit `SUI_MCP_SMOKE_ADDRESS` with limit 5.
|
|
624
|
+
|
|
625
|
+
All four activity calls supply the address explicitly and require
|
|
626
|
+
`accountSource: "explicit_filter"`. They do not use or establish saved read context.
|
|
696
627
|
|
|
697
628
|
The raw-quantity DeepBook quote smoke path does not call the display-amount quote.
|
|
698
629
|
Without the complete optional swap input group, account-bound transaction-material
|
|
@@ -738,12 +669,60 @@ It is not part of CI or `release:check`.
|
|
|
738
669
|
|
|
739
670
|
## Troubleshooting
|
|
740
671
|
|
|
672
|
+
### Global installation permission error
|
|
673
|
+
|
|
674
|
+
An `EACCES` or administrator-permission error means npm cannot write to its global installation directory. On macOS/Linux, if that directory is administrator-owned and you intend to install there, run the installer with administrator authorization:
|
|
675
|
+
|
|
676
|
+
```sh
|
|
677
|
+
sudo npm install -g @zktx.io/sui-mcp@0.8.0
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
Enter the administrator password only in your terminal, never in chat. Launch the AI apps normally afterward; running Sui MCP does not require administrator privileges. If you cannot authorize that installation, follow npm's [global installation permission guidance](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally). This step is only for a permission failure, not an extra installation step for everyone.
|
|
681
|
+
|
|
682
|
+
### Command not found
|
|
683
|
+
|
|
684
|
+
If the app reports that `sui-mcp` cannot be found, fully reopen it after installing Node.js and the package. Apps must be able to find Node.js and npm's global executables in their `PATH` (the list of folders used to locate commands).
|
|
685
|
+
|
|
686
|
+
Find the installed executable in a terminal:
|
|
687
|
+
|
|
688
|
+
```sh
|
|
689
|
+
# macOS / Linux
|
|
690
|
+
command -v sui-mcp
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
```powershell
|
|
694
|
+
# Windows PowerShell
|
|
695
|
+
where.exe sui-mcp
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
If no path is returned, check `npm list -g @zktx.io/sui-mcp --depth=0` in the Node/npm environment used for installation. If the terminal finds it but the app does not, use the returned absolute executable path as the registration's `command` and ensure the app can also find Node.js. This is an environment repair, not a required custom installation location. See [npm's executable location rules](https://docs.npmjs.com/cli/v11/configuring-npm/folders#executables).
|
|
699
|
+
|
|
700
|
+
On native Windows, if the app cannot launch the npm command shim directly, use `cmd /c`. Inside a JSON server entry, use:
|
|
701
|
+
|
|
702
|
+
```json
|
|
703
|
+
{
|
|
704
|
+
"command": "cmd",
|
|
705
|
+
"args": ["/c", "sui-mcp"]
|
|
706
|
+
}
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
The corresponding Codex table is:
|
|
710
|
+
|
|
711
|
+
```toml
|
|
712
|
+
[mcp_servers.sui-mcp]
|
|
713
|
+
command = "cmd"
|
|
714
|
+
args = ["/c", "sui-mcp"]
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
If another package owns the global `sui-mcp` command, use the scoped, exact-version [npx alternative](#download-on-demand-npx) instead. Confirm the package identity through `read_get_server_status`; the executable name alone is not proof of which package is running.
|
|
718
|
+
|
|
741
719
|
### Server does not appear in the client
|
|
742
720
|
|
|
743
|
-
- Confirm the
|
|
744
|
-
-
|
|
721
|
+
- Confirm the registration uses the configuration format and file location for your app, and that its server entry is enabled.
|
|
722
|
+
- For the global npm install, follow [Command not found](#command-not-found) if the app cannot launch the executable. No source build is needed.
|
|
723
|
+
- Only for a developer checkout, confirm the command uses the absolute built file path and that `npm run build` completed after source changes.
|
|
745
724
|
- Restart the MCP client so it relaunches the stdio process.
|
|
746
|
-
-
|
|
725
|
+
- Read the app's MCP error or server stderr to distinguish a missing executable from a runtime startup failure.
|
|
747
726
|
- For Claude Desktop, check the MCP logs under `~/Library/Logs/Claude` or `%APPDATA%\Claude\logs`.
|
|
748
727
|
|
|
749
728
|
### Runtime exits on startup
|
|
@@ -765,13 +744,13 @@ separate condition and does not by itself shut down the parent read service.
|
|
|
765
744
|
|
|
766
745
|
### Tool calls return `active_account_not_set`
|
|
767
746
|
|
|
768
|
-
For tools with an `account` input, provide an explicit Sui address in chat. DeepBook account inventory has no address input and needs
|
|
747
|
+
For tools with an `account` input, provide an explicit Sui address in chat. DeepBook account inventory has no address input and needs the current connected Sui address. When a new connection is wanted:
|
|
769
748
|
|
|
770
|
-
1. Open a Connect card
|
|
749
|
+
1. Open a Connect card using `session_open_wallet_connection_card` with empty input.
|
|
771
750
|
2. The card prepares the QR after confirming current state.
|
|
772
751
|
3. Scan it and approve the Sui mainnet connection in your wallet.
|
|
773
|
-
4. Read or wait on that cardId
|
|
774
|
-
5. Confirm connection availability with `session_get_interaction_status`. Stored read context alone is not
|
|
752
|
+
4. Read or wait on that `cardId`, then inspect current addresses through `session_get_interaction_status`. See [Session Tools](MCP_TOOLS.md#session-tools) for exact-operation reads and [Wallet Connection](WALLET_CONNECTION.md#one-connection-fixed-addresses) for fixed network results.
|
|
753
|
+
5. Confirm connection availability with `session_get_interaction_status`. Stored read context alone is not sufficient for current asset reads. If Settings cleared the read address, that does not mean the wallet disconnected; the same connection does not automatically restore the address.
|
|
775
754
|
|
|
776
755
|
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.
|
|
777
756
|
|
|
@@ -779,7 +758,7 @@ If the user supplied a specific Sui address for `read_summarize_wallet_assets` o
|
|
|
779
758
|
|
|
780
759
|
A 404 means the requested package or version could not be retrieved from the
|
|
781
760
|
selected registry. Confirm the exact name and version, for example with
|
|
782
|
-
`npm view @zktx.io/sui-mcp@0.
|
|
761
|
+
`npm view @zktx.io/sui-mcp@0.8.0 version --registry=https://registry.npmjs.org`.
|
|
783
762
|
A new version may not have been published or become visible yet; a mistyped name
|
|
784
763
|
or an alternate/private registry can also explain the response. Check the
|
|
785
764
|
publication result and registry configuration before retrying. Do not assume
|
|
@@ -789,7 +768,7 @@ neither substitutes for public publication.
|
|
|
789
768
|
|
|
790
769
|
## Client Snippets
|
|
791
770
|
|
|
792
|
-
The
|
|
771
|
+
The registration formats follow the official [Codex MCP guide](https://developers.openai.com/codex/mcp), [Claude Desktop walkthrough](https://modelcontextprotocol.io/docs/develop/connect-local-servers), [Claude Code MCP guide](https://code.claude.com/docs/en/mcp), and [Cursor MCP guide](https://cursor.com/docs/mcp). App menu labels can vary by version; use the official guide for your installed version. These configuration examples do not claim that every app supports the same card or file functions. Sui MCP uses the actual connection's capabilities and function responses.
|
|
793
772
|
|
|
794
773
|
### Optional account-bound review smoke
|
|
795
774
|
|
|
@@ -800,6 +779,7 @@ A partially configured group is an error. `SUI_MCP_SMOKE_SWAP_MAX_SLIPPAGE_BPS`
|
|
|
800
779
|
existing explicit override. The script uses the same runtime review composition,
|
|
801
780
|
material store and evidence validation as the product, and records whether
|
|
802
781
|
transaction review data was emitted. This can involve mainnet simulation but
|
|
803
|
-
never wallet pairing, signing or submission. The temporary
|
|
804
|
-
|
|
782
|
+
never wallet pairing, signing or submission. The temporary database supplies
|
|
783
|
+
known-account history for that explicit address; it does not create a current
|
|
784
|
+
wallet connection, saved read context or proof of ownership. Without the complete
|
|
805
785
|
optional group, the result records that review computation was not run.
|