@stelis/say-ur-intent 0.0.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/LICENSE +21 -0
- package/README.md +425 -0
- package/docs/AGENT_BEHAVIOR.md +462 -0
- package/docs/AGENT_DEVELOPMENT_POLICY.md +740 -0
- package/docs/FRONTEND_POLICY.md +234 -0
- package/docs/LOCAL_DB_ARCHITECTURE.md +85 -0
- package/docs/MCP_SETUP.md +496 -0
- package/docs/MCP_TOOLS.md +893 -0
- package/docs/SDK_API.md +116 -0
- package/docs/SIGNABLE_ADAPTER_CONTRACT.md +358 -0
- package/docs/TRANSACTION_ACTIVITY_LOG.md +182 -0
- package/docs/UTILITY_INDEX.md +180 -0
- package/docs/WALLET_IDENTITY.md +194 -0
- package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +169 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +161 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +254 -0
- package/package.json +73 -0
- package/protocols/deepbook-margin.md +15 -0
- package/protocols/deepbook-v3.md +24 -0
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
# MCP Setup
|
|
2
|
+
|
|
3
|
+
This is the setup guide for Say Ur Intent MCP clients. It owns installation, MCP client connection, first-use flow, local settings, and troubleshooting.
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
The README keeps only the short entry path; client-specific setup, restart behavior, and troubleshooting live here.
|
|
8
|
+
|
|
9
|
+
Say Ur Intent is tested from a local checkout in this repository state.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- Node.js 22+. Node 22 or 24 LTS is recommended.
|
|
14
|
+
- An MCP client that can run a local stdio server.
|
|
15
|
+
- Network access to Sui mainnet gRPC for runtime startup validation and to Sui mainnet GraphQL for user-requested activity reads.
|
|
16
|
+
|
|
17
|
+
## Default Setup
|
|
18
|
+
|
|
19
|
+
No Sui endpoint setup is required for the default path. The runtime creates a local SQLite database automatically, stores default Sui mainnet gRPC and GraphQL endpoints there on first start, and uses those endpoints for read-only mainnet tools.
|
|
20
|
+
|
|
21
|
+
If you want a custom Sui gRPC or GraphQL provider, or local data controls, configure them after the MCP server is connected by asking your AI client to create a local settings session:
|
|
22
|
+
|
|
23
|
+
- "Show my Say Ur Intent local settings."
|
|
24
|
+
- "Open my Say Ur Intent local settings page."
|
|
25
|
+
|
|
26
|
+
Open the returned settings URL in the same machine's system browser. Custom endpoint changes apply after the MCP server restarts. Advanced temporary environment overrides are documented in [Advanced Runtime Settings](#advanced-runtime-settings).
|
|
27
|
+
|
|
28
|
+
DeepBook orderbook, raw-quantity quote, and display-amount quote reads use an internal mainnet SDK simulation sender placeholder.
|
|
29
|
+
|
|
30
|
+
They do not require wallet connection.
|
|
31
|
+
|
|
32
|
+
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.
|
|
33
|
+
|
|
34
|
+
Wallet-account reads require a wallet identity session created through `session.create_wallet_identity`.
|
|
35
|
+
|
|
36
|
+
## Developer Checkout Setup
|
|
37
|
+
|
|
38
|
+
Use this path when you download the repository from GitHub and want to test the local build:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git clone https://github.com/stelis-dev/say-ur-intent.git
|
|
42
|
+
cd say-ur-intent
|
|
43
|
+
npm install
|
|
44
|
+
npm run build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Generic stdio MCP configuration:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"command": "node",
|
|
52
|
+
"args": ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Do not wrap the MCP stdio command in a shell script that writes ordinary text to stdout.
|
|
57
|
+
|
|
58
|
+
On native Windows clients that need `cmd`, use the same command through `cmd /c`:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"command": "cmd",
|
|
63
|
+
"args": ["/c", "node", "C:\\absolute\\path\\to\\say-ur-intent\\dist\\runtime\\start.js"]
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Claude Code
|
|
68
|
+
|
|
69
|
+
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 Say Ur Intent.
|
|
70
|
+
|
|
71
|
+
Developer checkout:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
claude mcp add --transport stdio \
|
|
75
|
+
say-ur-intent \
|
|
76
|
+
-- node /absolute/path/to/say-ur-intent/dist/runtime/start.js
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Published npm package:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
claude mcp add --transport stdio \
|
|
83
|
+
say-ur-intent \
|
|
84
|
+
-- npx -y @stelis/say-ur-intent@next
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Claude Code scopes:
|
|
88
|
+
|
|
89
|
+
- `local`: default; private to the current project.
|
|
90
|
+
- `project`: shared through a checked-in `.mcp.json`.
|
|
91
|
+
- `user`: private to your user account and available across projects.
|
|
92
|
+
|
|
93
|
+
Project-scope `.mcp.json` example:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"say-ur-intent": {
|
|
99
|
+
"type": "stdio",
|
|
100
|
+
"command": "node",
|
|
101
|
+
"args": ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Verify the server and tool list:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
claude mcp list
|
|
111
|
+
claude mcp get say-ur-intent
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
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`.
|
|
115
|
+
|
|
116
|
+
## Claude Desktop
|
|
117
|
+
|
|
118
|
+
Claude Desktop can run local stdio MCP servers through its Developer settings. It does not require a `.dxt` extension for this package.
|
|
119
|
+
|
|
120
|
+
Open Claude Desktop settings, go to Developer, choose Edit Config, and add a server to `claude_desktop_config.json`.
|
|
121
|
+
|
|
122
|
+
Common config paths:
|
|
123
|
+
|
|
124
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
125
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
126
|
+
|
|
127
|
+
Developer checkout:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"mcpServers": {
|
|
132
|
+
"say-ur-intent": {
|
|
133
|
+
"command": "node",
|
|
134
|
+
"args": ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Published npm package:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"mcpServers": {
|
|
145
|
+
"say-ur-intent": {
|
|
146
|
+
"command": "npx",
|
|
147
|
+
"args": ["-y", "@stelis/say-ur-intent@next"]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
On native Windows, use `cmd /c` if direct `npx` or `node` resolution fails:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"mcpServers": {
|
|
158
|
+
"say-ur-intent": {
|
|
159
|
+
"command": "cmd",
|
|
160
|
+
"args": ["/c", "npx", "-y", "@stelis/say-ur-intent@next"]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Save the file and fully restart Claude Desktop. If the server does not appear, check MCP logs:
|
|
167
|
+
|
|
168
|
+
- macOS: `~/Library/Logs/Claude`
|
|
169
|
+
- Windows: `%APPDATA%\Claude\logs`
|
|
170
|
+
|
|
171
|
+
Claude Desktop writes general MCP connection logs to `mcp.log` and named server stderr logs to files such as `mcp-server-say-ur-intent.log`.
|
|
172
|
+
|
|
173
|
+
## Codex
|
|
174
|
+
|
|
175
|
+
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`.
|
|
176
|
+
|
|
177
|
+
Developer checkout:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
codex mcp add say-ur-intent \
|
|
181
|
+
-- node /absolute/path/to/say-ur-intent/dist/runtime/start.js
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Published npm package:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
codex mcp add say-ur-intent \
|
|
188
|
+
-- npx -y @stelis/say-ur-intent@next
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Verify with:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
codex mcp list
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Inside the Codex TUI, use `/mcp` to see active MCP servers.
|
|
198
|
+
|
|
199
|
+
Equivalent `~/.codex/config.toml` entry for a developer checkout:
|
|
200
|
+
|
|
201
|
+
```toml
|
|
202
|
+
[mcp_servers.say-ur-intent]
|
|
203
|
+
command = "node"
|
|
204
|
+
args = ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
205
|
+
startup_timeout_sec = 10
|
|
206
|
+
tool_timeout_sec = 60
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Equivalent `~/.codex/config.toml` entry after npm publication:
|
|
210
|
+
|
|
211
|
+
```toml
|
|
212
|
+
[mcp_servers.say-ur-intent]
|
|
213
|
+
command = "npx"
|
|
214
|
+
args = ["-y", "@stelis/say-ur-intent@next"]
|
|
215
|
+
startup_timeout_sec = 10
|
|
216
|
+
tool_timeout_sec = 60
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
After changing `config.toml`, restart the Codex session so the stdio process is relaunched from the new config.
|
|
220
|
+
|
|
221
|
+
## Cursor
|
|
222
|
+
|
|
223
|
+
Cursor supports MCP servers through `mcp.json`.
|
|
224
|
+
|
|
225
|
+
Configuration locations:
|
|
226
|
+
|
|
227
|
+
- Project-specific: `.cursor/mcp.json`
|
|
228
|
+
- Global: `~/.cursor/mcp.json`
|
|
229
|
+
|
|
230
|
+
Developer checkout:
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"mcpServers": {
|
|
235
|
+
"say-ur-intent": {
|
|
236
|
+
"command": "node",
|
|
237
|
+
"args": ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Published npm package:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"mcpServers": {
|
|
248
|
+
"say-ur-intent": {
|
|
249
|
+
"command": "npx",
|
|
250
|
+
"args": ["-y", "@stelis/say-ur-intent@next"]
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Restart Cursor after changing `mcp.json`. Cursor MCP logs are available from the Output panel; choose the MCP Logs output channel.
|
|
257
|
+
|
|
258
|
+
## First Use Flow
|
|
259
|
+
|
|
260
|
+
After the MCP server is connected:
|
|
261
|
+
|
|
262
|
+
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.
|
|
263
|
+
2. Use wallet-free read tools directly when you need market context:
|
|
264
|
+
- `read.list_deepbook_pools`
|
|
265
|
+
- `read.list_deepbook_tokens`
|
|
266
|
+
- `read.get_deepbook_mid_price`
|
|
267
|
+
- `read.inspect_deepbook_orderbook`
|
|
268
|
+
- `read.quote_deepbook_action`
|
|
269
|
+
- `read.quote_deepbook_display_amount`
|
|
270
|
+
3. For wallet-account reads, call `session.create_wallet_identity`.
|
|
271
|
+
4. Open the returned `walletUrl` in the same machine's system browser. Do not move the URL to another device; it contains a short-lived fragment token.
|
|
272
|
+
5. Connect a Sui mainnet wallet. The page captures only the selected account address and chain identifier.
|
|
273
|
+
6. Immediately call `session.wait_wallet_identity` after giving the URL, or poll `session.get_wallet_identity` about every 5 seconds until the status is `connected`. Do not wait for the user to return and say they connected before checking the session.
|
|
274
|
+
7. Call `account.get_active_account` to confirm the current active account context.
|
|
275
|
+
Then call the active-account tool that matches the user's request:
|
|
276
|
+
- `read.summarize_wallet_assets` for balances.
|
|
277
|
+
- `read.classify_wallet_assets` for coin-balance roles.
|
|
278
|
+
- `read.preview_intent_evidence` for natural-language USD-denominated coverage or settlement-asset balance-total evidence.
|
|
279
|
+
- `read.summarize_deepbook_account_inventory` for DeepBook manager or pool-account inventory.
|
|
280
|
+
- `read.summarize_sui_activity_scan` for a live bounded activity summary.
|
|
281
|
+
- `read.summarize_sui_function_activity_scan` for sent transactions that called one full function target.
|
|
282
|
+
If the user provided a specific Sui address for these reads, pass that address as `account` instead of starting wallet identity.
|
|
283
|
+
8. For local review evidence, use `read.list_review_activity`, `read.summarize_review_funnel`, or `read.get_review_session_detail`.
|
|
284
|
+
9. For local endpoint settings or local data controls, ask your AI client to call `settings.create_local_settings_session`, then open the returned settings URL in the same machine's system browser. Setting changes apply after restart.
|
|
285
|
+
|
|
286
|
+
## Wallet Identity Boundary
|
|
287
|
+
|
|
288
|
+
Wallet-free DeepBook read boundaries are summarized in [Default Setup](#default-setup).
|
|
289
|
+
|
|
290
|
+
Active-account reads use the active account context created by the first-use wallet identity flow above.
|
|
291
|
+
|
|
292
|
+
Explicit-address coin balance reads through `read.summarize_wallet_assets` and `read.classify_wallet_assets` are public-address snapshots. They do not create active account context.
|
|
293
|
+
|
|
294
|
+
The wallet identity page captures only the selected account address and chain identifier. It does not prepare a transaction or request wallet authorization. MCP client sidebars and embedded webviews are not supported wallet identity surfaces; use the same machine's system browser.
|
|
295
|
+
|
|
296
|
+
## Local Settings
|
|
297
|
+
|
|
298
|
+
Beginner setup uses the built-in Sui mainnet gRPC and GraphQL endpoints. You do not need to copy an endpoint into Claude, Codex, Cursor, or another MCP client.
|
|
299
|
+
|
|
300
|
+
To inspect settings or change stored endpoints, ask your AI client:
|
|
301
|
+
|
|
302
|
+
- "Show my Say Ur Intent local settings."
|
|
303
|
+
- "Open my Say Ur Intent local settings page."
|
|
304
|
+
|
|
305
|
+
The settings page lets the user:
|
|
306
|
+
|
|
307
|
+
- save custom Sui gRPC and GraphQL endpoints;
|
|
308
|
+
- restore the default Sui gRPC and GraphQL URLs;
|
|
309
|
+
- clear active account read context;
|
|
310
|
+
- reset logical local data;
|
|
311
|
+
- export local data;
|
|
312
|
+
- import replace-only local data.
|
|
313
|
+
|
|
314
|
+
Settings validation rules:
|
|
315
|
+
|
|
316
|
+
- Import preview validates the backup shape without contacting the imported endpoint.
|
|
317
|
+
- Import preview reports `defaultsInjected` when an older backup is missing a setting that the current runtime requires; for example, backups created before `suiGraphqlUrl` existed are previewed with that setting filled from the current default.
|
|
318
|
+
- Backups exported by a runtime that records `function_scan` provenance can be imported by the current runtime, but older runtimes reject those backups through their scan-kind validator rather than partially importing unsupported provenance.
|
|
319
|
+
- Endpoint chain-identifier verification runs only when the user confirms the replace-only import.
|
|
320
|
+
- A custom gRPC endpoint must be an `http` or `https` URL with an explicit port and no credentials, path, query string, or fragment.
|
|
321
|
+
- A custom GraphQL endpoint must be an `https` URL with no credentials, query string, or fragment.
|
|
322
|
+
- The runtime verifies custom endpoints report the expected Sui mainnet chain identifier before saving them, including when an endpoint comes from an imported local data backup. The GraphQL endpoint is also verified lazily on first Sui activity tool use after process start.
|
|
323
|
+
- Endpoint changes apply after MCP server restart; restart the MCP client after setting or restoring the value.
|
|
324
|
+
|
|
325
|
+
## Advanced Runtime Settings
|
|
326
|
+
|
|
327
|
+
`SUI_GRPC_URL` and `SUI_GRAPHQL_URL` are advanced temporary overrides for operators and smoke tests. They win over the stored local setting for the current process and do not mutate SQLite:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
SUI_GRPC_URL="https://fullnode.mainnet.sui.io:443" node /absolute/path/to/say-ur-intent/dist/runtime/start.js
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
SUI_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" node /absolute/path/to/say-ur-intent/dist/runtime/start.js
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Use this only when you need a one-run override or need to recover from a stored custom endpoint that no longer starts.
|
|
338
|
+
|
|
339
|
+
After the MCP server starts with the override:
|
|
340
|
+
|
|
341
|
+
1. Open the local settings page.
|
|
342
|
+
2. Restore the default endpoint or save a new endpoint.
|
|
343
|
+
3. Remove the environment override.
|
|
344
|
+
4. Restart the client.
|
|
345
|
+
|
|
346
|
+
Restoring default returns the stored endpoint to the built-in default.
|
|
347
|
+
|
|
348
|
+
If the custom provider is only temporarily unavailable, keep using the environment override or save a new custom endpoint instead.
|
|
349
|
+
|
|
350
|
+
`SAY_UR_INTENT_DATA_DIR` stays outside SQLite because the database path must be known before the database opens:
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
SAY_UR_INTENT_DATA_DIR="/path/to/local/app-data" node /absolute/path/to/say-ur-intent/dist/runtime/start.js
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
To reset local product data files, stop the MCP server and delete `say-ur-intent.sqlite`, `say-ur-intent.sqlite-wal`, and `say-ur-intent.sqlite-shm`, or use a new `SAY_UR_INTENT_DATA_DIR`.
|
|
357
|
+
|
|
358
|
+
### Fixed review server port
|
|
359
|
+
|
|
360
|
+
`SAY_UR_INTENT_REVIEW_PORT` pins the local review server to a fixed loopback
|
|
361
|
+
port (1-65535; default is a random free port). A fixed port keeps the review
|
|
362
|
+
page origin stable across server restarts, so the browser wallet's
|
|
363
|
+
authorization and the signing auto-reconnect persist instead of being asked
|
|
364
|
+
again on every restart. If the port is taken, the server fails to start
|
|
365
|
+
rather than silently moving.
|
|
366
|
+
|
|
367
|
+
## Packed Package Testing
|
|
368
|
+
|
|
369
|
+
`npm run release:check` builds, tests, creates an npm tarball, verifies package contents, and installs the packed tarball in a temporary directory. It does not publish to npm.
|
|
370
|
+
|
|
371
|
+
## Current Release Limitations
|
|
372
|
+
|
|
373
|
+
- Product-facing behavior is mainnet-only.
|
|
374
|
+
- Wallet-account reads require an active account read context from wallet identity.
|
|
375
|
+
- The signable review path is implemented for the account-bound DeepBook swap
|
|
376
|
+
review (the first signable review adapter for the DeepBook swap route):
|
|
377
|
+
review evidence runs through review-time simulation, a schema-validated
|
|
378
|
+
wallet review contract is emitted on a `ready_for_wallet_review` state, and
|
|
379
|
+
the local review page offers a digest-gated byte handoff with
|
|
380
|
+
user-controlled wallet signing and execution receipts. MCP responses still
|
|
381
|
+
do not contain transaction bytes, signing data, or signing readiness.
|
|
382
|
+
- Here, `blocked` means required review evidence or user action is missing for
|
|
383
|
+
that session (for example `wallet_review_contract_emit_missing`), not a
|
|
384
|
+
release-wide signing stop.
|
|
385
|
+
- The package is not yet published to npm: use a developer checkout (local
|
|
386
|
+
build) or packed tarball. `npx` client configs in this guide start working
|
|
387
|
+
after the first npm publish.
|
|
388
|
+
|
|
389
|
+
## Mainnet Read Smoke
|
|
390
|
+
|
|
391
|
+
Run this manually before release checks when a mainnet gRPC provider is available. Normal setup does not require setting `SUI_GRPC_URL`; this environment variable is an operator override for the smoke process.
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
export SUI_GRPC_URL="https://fullnode.mainnet.sui.io:443"
|
|
395
|
+
export SUI_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
|
|
396
|
+
export SMOKE_SUI_ADDRESS="0x..."
|
|
397
|
+
export SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
|
|
398
|
+
export SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
|
|
399
|
+
# Optional: export SMOKE_INSPECT_DIGEST="..."
|
|
400
|
+
# Optional: export SMOKE_INSPECT_RANDOM_LATEST="true"
|
|
401
|
+
# Optional: export SMOKE_FUNCTION_TARGET="0x...::module::function"
|
|
402
|
+
npm run build
|
|
403
|
+
npm run smoke:mainnet
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
The smoke script calls read-only MCP tools against mainnet:
|
|
407
|
+
|
|
408
|
+
- wallet assets;
|
|
409
|
+
- DeepBook orderbook;
|
|
410
|
+
- raw-quantity DeepBook quote;
|
|
411
|
+
- `read.scan_sui_account_activity` for `SMOKE_SUI_ADDRESS` with limit 5;
|
|
412
|
+
- `read.summarize_sui_activity_scan` through active account context with limit 5.
|
|
413
|
+
|
|
414
|
+
When `SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`, it also calls:
|
|
415
|
+
|
|
416
|
+
- `read.scan_sui_function_activity` for `SMOKE_SUI_ADDRESS` with limit 5;
|
|
417
|
+
- `read.summarize_sui_function_activity_scan` through active account context with limit 5.
|
|
418
|
+
|
|
419
|
+
The raw-quantity DeepBook quote smoke path does not call the display-amount quote.
|
|
420
|
+
It also does not exercise account-bound DeepBook transaction-material build or
|
|
421
|
+
internal digest binding. A funded-account material-build smoke is a separate
|
|
422
|
+
operator check before smoke results can be treated as product-grade proof for
|
|
423
|
+
that review stage.
|
|
424
|
+
|
|
425
|
+
Empty account or function activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
|
|
426
|
+
|
|
427
|
+
When `SMOKE_FUNCTION_TARGET` is unset, function activity smoke is recorded as not run with `notRunReason: "missing_env"`.
|
|
428
|
+
|
|
429
|
+
The smoke result file records tool names, environment-variable presence, activity status, row counts, source method, window/order flags, persistence status, whether a function target was present, and evidence-boundary metrics.
|
|
430
|
+
|
|
431
|
+
Recorded metrics include:
|
|
432
|
+
|
|
433
|
+
- `fullDetailsReturned`;
|
|
434
|
+
- `compactReturned`;
|
|
435
|
+
- `compactBalanceChangeRowCount`;
|
|
436
|
+
- `compactAggregatedBalanceChangeRowCount`;
|
|
437
|
+
- `transactionContextCount`;
|
|
438
|
+
- `requestedAccountTransactionFactCount`;
|
|
439
|
+
- `requestedAccountTransactionFactBalanceChangeRowCount`;
|
|
440
|
+
- `requestedAccountEffectBalanceChangeRowCount`;
|
|
441
|
+
- `requestedAccountEffectTruncatedTransactionCount`;
|
|
442
|
+
- `requestedAccountCoinFlowCount`;
|
|
443
|
+
- `analysisCoinFlowCount`.
|
|
444
|
+
|
|
445
|
+
The result file does not store raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
446
|
+
|
|
447
|
+
Activity scan and summary smoke paths fail if full transaction details or compact transaction aggregates are returned.
|
|
448
|
+
|
|
449
|
+
It does not call DeepBook account inventory tools.
|
|
450
|
+
|
|
451
|
+
If `SMOKE_INSPECT_DIGEST` is set, it also calls `read.inspect_sui_transaction` for that digest and the smoke address.
|
|
452
|
+
|
|
453
|
+
If `SMOKE_INSPECT_RANDOM_LATEST=true` is set and `SMOKE_INSPECT_DIGEST` is unset, it samples one digest from the latest GraphQL transaction page and inspects that digest without an account argument.
|
|
454
|
+
|
|
455
|
+
It is not part of CI or `release:check`.
|
|
456
|
+
`SMOKE_SUI_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
|
|
457
|
+
`SMOKE_FUNCTION_TARGET` is optional. When set, it must be a full Sui function target in `package::module::function` form; package-only, package-and-module-only, bare function names, and generic/type-argument forms fail the optional function activity smoke path.
|
|
458
|
+
`SMOKE_INSPECT_DIGEST` is optional. Use a digest whose sender or returned balance-change owner is `SMOKE_SUI_ADDRESS` to exercise the stored digest-lookup path; otherwise the lookup can still return `ok` with `persistence.stored: false`.
|
|
459
|
+
`SMOKE_INSPECT_RANDOM_LATEST=true` checks current transaction-read shape without pinning a specific user address and without exercising the stored relation path.
|
|
460
|
+
|
|
461
|
+
## Troubleshooting
|
|
462
|
+
|
|
463
|
+
### Server does not appear in the client
|
|
464
|
+
|
|
465
|
+
- Confirm the command uses absolute paths for local checkout setup.
|
|
466
|
+
- Confirm `npm run build` has completed after source changes.
|
|
467
|
+
- Restart the MCP client so it relaunches the stdio process.
|
|
468
|
+
- Run the configured command directly in a terminal and check stderr.
|
|
469
|
+
- For Claude Desktop, check the MCP logs under `~/Library/Logs/Claude` or `%APPDATA%\Claude\logs`.
|
|
470
|
+
|
|
471
|
+
### Runtime exits on startup
|
|
472
|
+
|
|
473
|
+
- Do not set `SUI_RPC_URL`; this runtime intentionally uses Sui gRPC and rejects Sui JSON-RPC config.
|
|
474
|
+
- If a stored custom endpoint fails, temporarily start with `SUI_GRPC_URL`, open the local settings page, restore the default Sui gRPC URL or save a new endpoint, remove the override, and restart.
|
|
475
|
+
- If an environment override is present, confirm it has scheme, host, and explicit port only.
|
|
476
|
+
- 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.
|
|
477
|
+
|
|
478
|
+
### Tool calls return `active_account_not_set`
|
|
479
|
+
|
|
480
|
+
For active-account reads:
|
|
481
|
+
|
|
482
|
+
1. Create a wallet identity session with `session.create_wallet_identity`.
|
|
483
|
+
2. Open the `walletUrl` in the same machine's system browser.
|
|
484
|
+
3. Connect a Sui mainnet wallet.
|
|
485
|
+
4. Immediately call `session.wait_wallet_identity` after giving the URL, or poll `session.get_wallet_identity` until `connected`.
|
|
486
|
+
5. Confirm the current context with `account.get_active_account`.
|
|
487
|
+
|
|
488
|
+
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 identity session.
|
|
489
|
+
|
|
490
|
+
### NPM command returns 404
|
|
491
|
+
|
|
492
|
+
The package is not published yet in this repository state. Use Developer Checkout Setup or `npm run release:check` for packed-package testing until publication.
|
|
493
|
+
|
|
494
|
+
## Client Snippets
|
|
495
|
+
|
|
496
|
+
The Claude Code, Claude Desktop, Codex, and Cursor snippets above were checked against official client documentation current to this repository update. If a client changes its MCP config format, prefer that client's official documentation over this file and update this file in the same change.
|