@zktx.io/sui-mcp 0.7.0 → 0.8.1
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 +89 -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 +44 -28
- package/dist/core/activity/sqliteActivityStoreTypes.js +9 -0
- 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/runtimeTermination.js +3 -0
- 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 +384 -347
- 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.1`. 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.1 version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The result must be `0.8.1`. 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.1
|
|
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.1` 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.1`. 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.1"]
|
|
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.1"]
|
|
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
|
|
|
@@ -202,13 +342,18 @@ the installed package or configured version, then reopen them and check
|
|
|
202
342
|
name must match the intended installation. Updating the package does not
|
|
203
343
|
replace a backend that is already running.
|
|
204
344
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
345
|
+
This is a pre-release. Local data compatibility between releases is not
|
|
346
|
+
guaranteed, and migration is not provided. An incompatible database is rejected
|
|
347
|
+
before writes; an npm update or reinstall does not convert or remove it.
|
|
348
|
+
If startup reports a database format mismatch, follow [Database format mismatch](#database-format-mismatch).
|
|
349
|
+
You may keep the old files and select a new empty directory, or explicitly
|
|
350
|
+
choose to discard the old local data and settings and restart with defaults.
|
|
351
|
+
Neither the runtime nor an installation agent may make that deletion choice
|
|
352
|
+
for the user. A compatible update does not require a reset.
|
|
353
|
+
Never resend a transaction as an update step. Coordinate a safe restart if a
|
|
354
|
+
transaction request is still in progress. See
|
|
355
|
+
[Local Database Architecture](LOCAL_DB_ARCHITECTURE.md#current-format-and-backups)
|
|
356
|
+
for the storage and backup boundary.
|
|
212
357
|
|
|
213
358
|
### Switching from a Different Package
|
|
214
359
|
|
|
@@ -229,8 +374,9 @@ restart first. A previous wallet pairing can remain in the wallet app; remove
|
|
|
229
374
|
an unwanted pairing there rather than assuming new local storage disconnected it.
|
|
230
375
|
|
|
231
376
|
Replace the old registration instead of adding a second one. Use
|
|
232
|
-
`sui-mcp` as the default registration name
|
|
233
|
-
|
|
377
|
+
`sui-mcp` as the default registration name. Install `@zktx.io/sui-mcp@0.8.1`
|
|
378
|
+
globally and register the `sui-mcp` command, or use the exact-version
|
|
379
|
+
[npx alternative](#download-on-demand-npx). A client-defined alias does not change the package,
|
|
234
380
|
server identity or permissions. Remove obsolete runtime environment overrides. If you set
|
|
235
381
|
`SUI_MCP_DATA_DIR`, choose a new empty directory; never point it at another
|
|
236
382
|
package's database or private WalletConnect store. Keep the same new directory
|
|
@@ -238,8 +384,7 @@ and `SUI_MCP_REVIEW_PORT` in every participating client.
|
|
|
238
384
|
|
|
239
385
|
After restarting the clients, call `read_get_server_status` in each. Check
|
|
240
386
|
`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
|
|
387
|
+
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
388
|
or submitting a transaction. Prior conversation cards are not current controls;
|
|
244
389
|
open cards through the new registration.
|
|
245
390
|
|
|
@@ -252,225 +397,6 @@ select the current installation; no previous-package aliases are supported.
|
|
|
252
397
|
Card addresses use `suimcp://` and `ui://sui-mcp/`; see
|
|
253
398
|
[MCP Tools](MCP_TOOLS.md#resources).
|
|
254
399
|
|
|
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
400
|
## Wallet Connection Boundary
|
|
475
401
|
|
|
476
402
|
An active account is read context, not login, ownership proof or transaction
|
|
@@ -487,11 +413,13 @@ local configuration value. Only the backend owner starts its isolated SDK child,
|
|
|
487
413
|
clients use the same product identifier when identifying that shared backend.
|
|
488
414
|
Do not paste pairing URIs or UI permission values into chat.
|
|
489
415
|
|
|
490
|
-
Sui MCP allows one
|
|
491
|
-
with one
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
416
|
+
Sui MCP allows one current wallet connection across the shared data folder,
|
|
417
|
+
with one fixed address per returned requested chain. Settings selects requested
|
|
418
|
+
Sui, Ethereum and Solana mainnet networks; financial actions remain Sui-only.
|
|
419
|
+
Change wallet, address or approved scope by disconnecting and reconnecting.
|
|
420
|
+
An unexpected SDK session is not adopted or listed as another product choice.
|
|
421
|
+
Remove it in the wallet app and check status before new pairing or financial input.
|
|
422
|
+
The product never silently chooses or remotely removes an unexpected session.
|
|
495
423
|
|
|
496
424
|
Connection service restart belongs to Settings, not Connect. If an operation
|
|
497
425
|
is unresponsive or the service is unavailable, ask to open Settings and use
|
|
@@ -538,7 +466,7 @@ A card accepts one read selection. Moving between chats or recreating its frame
|
|
|
538
466
|
|
|
539
467
|
## Local data format
|
|
540
468
|
|
|
541
|
-
Start this runtime with an empty `SUI_MCP_DATA_DIR` or a database already in its current format. A mismatched existing database is refused before writes; incompatible databases and backups are not migrated or converted. A database with different table, constraint or field definitions requires
|
|
469
|
+
Start this runtime with an empty `SUI_MCP_DATA_DIR` or a database already in its current format. A mismatched existing database is refused before writes; incompatible databases and backups are not migrated or converted. A database with different table, constraint or field definitions requires an empty data folder. Startup leaves existing files in place. Follow [Database format mismatch](#database-format-mismatch) to preserve the old files or explicitly choose a fresh start. Databases and backups do not carry a separate numeric schema version. With a new empty folder, configure the required account context and endpoints. Environment overrides keep their existing precedence. See [Local DB Architecture](LOCAL_DB_ARCHITECTURE.md) for the current format, backup scope and card-result retention. Card results do not expire with the input period and can increase DB size. Reset/import removes them along with the affected local data; it is not a card-only space cleanup operation.
|
|
542
470
|
|
|
543
471
|
## Local Settings
|
|
544
472
|
|
|
@@ -549,19 +477,24 @@ To inspect settings or change stored endpoints, ask your AI client:
|
|
|
549
477
|
- "Show my Sui MCP local settings."
|
|
550
478
|
- "Open my Sui MCP Settings card."
|
|
551
479
|
|
|
552
|
-
Settings groups Address for viewing assets, Local records,
|
|
553
|
-
Advanced settings. Each card lets you make one change and
|
|
480
|
+
Settings groups Address for viewing assets, Wallet networks, Local records,
|
|
481
|
+
Troubleshooting and Advanced settings. Each card lets you make one change and
|
|
482
|
+
keeps its result:
|
|
554
483
|
|
|
555
|
-
-
|
|
484
|
+
- clear the saved Sui address used for implicit reads, without disconnecting the
|
|
485
|
+
wallet, changing its fixed addresses or cancelling transaction requests;
|
|
486
|
+
- choose Sui, Ethereum and/or Solana mainnet networks for new wallet connections;
|
|
556
487
|
- back up records saved on this computer;
|
|
557
488
|
- restore a Sui MCP backup, replacing the current local records and settings;
|
|
558
489
|
- delete local records and saved settings;
|
|
559
490
|
- check or restart the wallet connection service;
|
|
560
491
|
- select a custom Sui network address or return to a built-in default.
|
|
561
492
|
|
|
562
|
-
|
|
563
|
-
and Sui
|
|
564
|
-
|
|
493
|
+
Backups include chain-qualified address history, reviews, transaction and activity
|
|
494
|
+
records, requested wallet networks and Sui endpoint settings. They do not contain
|
|
495
|
+
the current connection, an active-account selection, read-address suppression or
|
|
496
|
+
wallet approvals. Restoring records does not reconnect a wallet or activate a
|
|
497
|
+
saved address. Transactions on Sui are not cancelled by a restore or reset.
|
|
565
498
|
Internal request IDs and file hashes appear in Details. Advanced settings names
|
|
566
499
|
the Sui node connection as gRPC and the activity-data connection as GraphQL.
|
|
567
500
|
Network addresses set in the app launch configuration take priority over values
|
|
@@ -577,9 +510,9 @@ Settings validation rules:
|
|
|
577
510
|
- 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
511
|
- 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
512
|
- 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
|
|
513
|
+
- 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.
|
|
514
|
+
- 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.
|
|
515
|
+
- 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
516
|
- 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
517
|
- Current-format backups can contain `function_scan` provenance. Unsupported formats and scan-kind values are rejected rather than partially imported.
|
|
585
518
|
- Endpoint chain-identifier verification runs only when the user confirms the replace-only import.
|
|
@@ -643,7 +576,7 @@ builds, and verifies the actual npm tarball and bundled licenses. It installs th
|
|
|
643
576
|
tarball in a temporary directory and runs that installed binary to check MCP
|
|
644
577
|
initialization, tools, document/card resources, the internal Settings card and
|
|
645
578
|
assets, and the isolated SDK child. It confirms that Connect rejects restart
|
|
646
|
-
input,
|
|
579
|
+
input, ordinary model calls start no pairing, and the SDK keeps its exclusive
|
|
647
580
|
storage lease until shutdown. Runtime startup requires reachable Sui mainnet endpoints; a startup
|
|
648
581
|
failure leaves dependent checks unverified. The check uses an isolated data
|
|
649
582
|
directory and port, ends the child process before cleanup, and does not use your
|
|
@@ -653,7 +586,7 @@ See [Utility Index](UTILITY_INDEX.md#release-package-check) for prerequisites.
|
|
|
653
586
|
## Current Release Limitations
|
|
654
587
|
|
|
655
588
|
- Product-facing behavior is mainnet-only.
|
|
656
|
-
- Current asset reads without an explicit address require the
|
|
589
|
+
- 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
590
|
- Account-bound DeepBook review requires all evidence stages. The internal
|
|
658
591
|
Review card then allows an explicit WalletConnect request under user control.
|
|
659
592
|
Requests and observed chain results are separate; missing results remain
|
|
@@ -687,12 +620,15 @@ The smoke script calls read-only MCP tools against mainnet:
|
|
|
687
620
|
- DeepBook orderbook;
|
|
688
621
|
- raw-quantity DeepBook quote;
|
|
689
622
|
- `read_scan_sui_account_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
690
|
-
- `read_summarize_sui_activity_scan`
|
|
623
|
+
- `read_summarize_sui_activity_scan` for the explicit `SUI_MCP_SMOKE_ADDRESS` with limit 5.
|
|
691
624
|
|
|
692
625
|
When `SUI_MCP_SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`, it also calls:
|
|
693
626
|
|
|
694
627
|
- `read_scan_sui_function_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
695
|
-
- `read_summarize_sui_function_activity_scan`
|
|
628
|
+
- `read_summarize_sui_function_activity_scan` for the explicit `SUI_MCP_SMOKE_ADDRESS` with limit 5.
|
|
629
|
+
|
|
630
|
+
All four activity calls supply the address explicitly and require
|
|
631
|
+
`accountSource: "explicit_filter"`. They do not use or establish saved read context.
|
|
696
632
|
|
|
697
633
|
The raw-quantity DeepBook quote smoke path does not call the display-amount quote.
|
|
698
634
|
Without the complete optional swap input group, account-bound transaction-material
|
|
@@ -738,12 +674,60 @@ It is not part of CI or `release:check`.
|
|
|
738
674
|
|
|
739
675
|
## Troubleshooting
|
|
740
676
|
|
|
677
|
+
### Global installation permission error
|
|
678
|
+
|
|
679
|
+
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:
|
|
680
|
+
|
|
681
|
+
```sh
|
|
682
|
+
sudo npm install -g @zktx.io/sui-mcp@0.8.1
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
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.
|
|
686
|
+
|
|
687
|
+
### Command not found
|
|
688
|
+
|
|
689
|
+
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).
|
|
690
|
+
|
|
691
|
+
Find the installed executable in a terminal:
|
|
692
|
+
|
|
693
|
+
```sh
|
|
694
|
+
# macOS / Linux
|
|
695
|
+
command -v sui-mcp
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
```powershell
|
|
699
|
+
# Windows PowerShell
|
|
700
|
+
where.exe sui-mcp
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
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).
|
|
704
|
+
|
|
705
|
+
On native Windows, if the app cannot launch the npm command shim directly, use `cmd /c`. Inside a JSON server entry, use:
|
|
706
|
+
|
|
707
|
+
```json
|
|
708
|
+
{
|
|
709
|
+
"command": "cmd",
|
|
710
|
+
"args": ["/c", "sui-mcp"]
|
|
711
|
+
}
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
The corresponding Codex table is:
|
|
715
|
+
|
|
716
|
+
```toml
|
|
717
|
+
[mcp_servers.sui-mcp]
|
|
718
|
+
command = "cmd"
|
|
719
|
+
args = ["/c", "sui-mcp"]
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
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.
|
|
723
|
+
|
|
741
724
|
### Server does not appear in the client
|
|
742
725
|
|
|
743
|
-
- Confirm the
|
|
744
|
-
-
|
|
726
|
+
- Confirm the registration uses the configuration format and file location for your app, and that its server entry is enabled.
|
|
727
|
+
- For the global npm install, follow [Command not found](#command-not-found) if the app cannot launch the executable. No source build is needed.
|
|
728
|
+
- Only for a developer checkout, confirm the command uses the absolute built file path and that `npm run build` completed after source changes.
|
|
745
729
|
- Restart the MCP client so it relaunches the stdio process.
|
|
746
|
-
-
|
|
730
|
+
- Read the app's MCP error or server stderr to distinguish a missing executable from a runtime startup failure.
|
|
747
731
|
- For Claude Desktop, check the MCP logs under `~/Library/Logs/Claude` or `%APPDATA%\Claude\logs`.
|
|
748
732
|
|
|
749
733
|
### Runtime exits on startup
|
|
@@ -762,16 +746,68 @@ separate condition and does not by itself shut down the parent read service.
|
|
|
762
746
|
- If a stored custom endpoint fails, temporarily start with `SUI_MCP_GRPC_URL`, open the Settings card, restore the default Sui gRPC URL or save a new endpoint, remove the override, and restart.
|
|
763
747
|
- If an environment override is present, confirm it has scheme, host, and explicit port only.
|
|
764
748
|
- If the startup chain identifier guard fails, use a Sui mainnet gRPC endpoint. If a Sui activity tool fails its GraphQL chain identifier guard, use a Sui mainnet GraphQL endpoint.
|
|
749
|
+
- If the reason says `Local database format does not match this runtime`, use [Database format mismatch](#database-format-mismatch).
|
|
750
|
+
|
|
751
|
+
### Database format mismatch
|
|
752
|
+
|
|
753
|
+
This recovery applies to an existing installation with incompatible local data.
|
|
754
|
+
It is not an extra step for a first-time installation. The diagnostic
|
|
755
|
+
`Local database format does not match this runtime` means the database was
|
|
756
|
+
rejected before writes. The runtime does not migrate, repair or automatically
|
|
757
|
+
delete it. Reinstalling the npm package alone will not resolve this mismatch.
|
|
758
|
+
The Settings card cannot perform the recovery while startup is blocked.
|
|
759
|
+
|
|
760
|
+
Choose how to handle the old data:
|
|
761
|
+
|
|
762
|
+
- **Keep the files:** Leave the existing folder untouched and set
|
|
763
|
+
`SUI_MCP_DATA_DIR` to a new empty folder in every participating app. Use the
|
|
764
|
+
same folder for all apps; see [Advanced Runtime Settings](#advanced-runtime-settings).
|
|
765
|
+
Old-format backups cannot be restored into the new format.
|
|
766
|
+
- **Start fresh with default settings:** Explicitly choose to delete the old
|
|
767
|
+
Sui MCP data folder, then follow the steps below. This removes local activity
|
|
768
|
+
and saved card results, stored addresses, network and endpoint settings, and
|
|
769
|
+
private WalletConnect sessions and keys. An agent must obtain that choice;
|
|
770
|
+
a request to install, update or fix startup is not permission to delete data.
|
|
771
|
+
|
|
772
|
+
For an explicitly chosen fresh start:
|
|
773
|
+
|
|
774
|
+
1. Stop Sui MCP in every app and wait for the shared backend to exit. Do not
|
|
775
|
+
delete data while a transaction request is unresolved; resolve the existing
|
|
776
|
+
request's digest or coordinate recovery first.
|
|
777
|
+
2. Locate the active Sui MCP data folder. With default settings, use your file
|
|
778
|
+
manager's Go to Folder or address bar with the location below, then delete
|
|
779
|
+
only the `sui-mcp` folder after confirming the fresh-start choice.
|
|
780
|
+
|
|
781
|
+
| Platform | Default Sui MCP data folder |
|
|
782
|
+
| --- | --- |
|
|
783
|
+
| macOS | `~/Library/Application Support/sui-mcp` |
|
|
784
|
+
| Windows | `%APPDATA%\sui-mcp` |
|
|
785
|
+
| Linux | `$XDG_DATA_HOME/sui-mcp`, or `~/.local/share/sui-mcp` when `XDG_DATA_HOME` is unset |
|
|
786
|
+
|
|
787
|
+
If `SUI_MCP_DATA_DIR` is configured, it selects the active folder instead.
|
|
788
|
+
Remove an obsolete override from each app to return to the default path.
|
|
789
|
+
Preserve other app settings and MCP registrations; do not delete a parent
|
|
790
|
+
directory or another server's data.
|
|
791
|
+
3. Keep the global `sui-mcp` command registration and reopen the MCP connections.
|
|
792
|
+
The runtime creates a new database with built-in defaults automatically.
|
|
793
|
+
Ask for the package name, version and network using the [first-use status check](#1-confirm-the-running-server).
|
|
794
|
+
A new wallet connection is needed only when you want wallet-dependent features.
|
|
795
|
+
|
|
796
|
+
Deleting local files does not reverse blockchain transactions or remove a
|
|
797
|
+
pairing still shown in your wallet app. Remove an unwanted pairing in the wallet
|
|
798
|
+
itself. Do not resend a transaction to reconstruct local history. Backups stored
|
|
799
|
+
outside the deleted folder remain untouched, and incompatible backups still
|
|
800
|
+
cannot be imported.
|
|
765
801
|
|
|
766
802
|
### Tool calls return `active_account_not_set`
|
|
767
803
|
|
|
768
|
-
For tools with an `account` input, provide an explicit Sui address in chat. DeepBook account inventory has no address input and needs
|
|
804
|
+
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
805
|
|
|
770
|
-
1. Open a Connect card
|
|
806
|
+
1. Open a Connect card using `session_open_wallet_connection_card` with empty input.
|
|
771
807
|
2. The card prepares the QR after confirming current state.
|
|
772
808
|
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
|
|
809
|
+
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.
|
|
810
|
+
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
811
|
|
|
776
812
|
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
813
|
|
|
@@ -779,7 +815,7 @@ If the user supplied a specific Sui address for `read_summarize_wallet_assets` o
|
|
|
779
815
|
|
|
780
816
|
A 404 means the requested package or version could not be retrieved from the
|
|
781
817
|
selected registry. Confirm the exact name and version, for example with
|
|
782
|
-
`npm view @zktx.io/sui-mcp@0.
|
|
818
|
+
`npm view @zktx.io/sui-mcp@0.8.1 version --registry=https://registry.npmjs.org`.
|
|
783
819
|
A new version may not have been published or become visible yet; a mistyped name
|
|
784
820
|
or an alternate/private registry can also explain the response. Check the
|
|
785
821
|
publication result and registry configuration before retrying. Do not assume
|
|
@@ -789,7 +825,7 @@ neither substitutes for public publication.
|
|
|
789
825
|
|
|
790
826
|
## Client Snippets
|
|
791
827
|
|
|
792
|
-
The
|
|
828
|
+
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
829
|
|
|
794
830
|
### Optional account-bound review smoke
|
|
795
831
|
|
|
@@ -800,6 +836,7 @@ A partially configured group is an error. `SUI_MCP_SMOKE_SWAP_MAX_SLIPPAGE_BPS`
|
|
|
800
836
|
existing explicit override. The script uses the same runtime review composition,
|
|
801
837
|
material store and evidence validation as the product, and records whether
|
|
802
838
|
transaction review data was emitted. This can involve mainnet simulation but
|
|
803
|
-
never wallet pairing, signing or submission. The temporary
|
|
804
|
-
|
|
839
|
+
never wallet pairing, signing or submission. The temporary database supplies
|
|
840
|
+
known-account history for that explicit address; it does not create a current
|
|
841
|
+
wallet connection, saved read context or proof of ownership. Without the complete
|
|
805
842
|
optional group, the result records that review computation was not run.
|