@ton/mcp 0.1.12 → 0.1.15-alpha.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.
Files changed (79) hide show
  1. package/README.md +214 -21
  2. package/dist/cli.js +25578 -29501
  3. package/dist/contracts/agentic_wallet/AgenticWallet.source.d.ts +11 -0
  4. package/dist/contracts/agentic_wallet/AgenticWallet.source.d.ts.map +1 -0
  5. package/dist/contracts/agentic_wallet/AgenticWalletAdapter.d.ts +62 -0
  6. package/dist/contracts/agentic_wallet/AgenticWalletAdapter.d.ts.map +1 -0
  7. package/dist/contracts/agentic_wallet/actions.d.ts.map +1 -0
  8. package/dist/contracts/agentic_wallet/index.d.ts +10 -0
  9. package/dist/contracts/agentic_wallet/index.d.ts.map +1 -0
  10. package/dist/factory.d.ts +13 -34
  11. package/dist/factory.d.ts.map +1 -1
  12. package/dist/http-mode.d.ts +25 -0
  13. package/dist/http-mode.d.ts.map +1 -0
  14. package/dist/index.cjs +99349 -103146
  15. package/dist/index.d.ts +8 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +99346 -103147
  18. package/dist/registry/config.d.ts +202 -0
  19. package/dist/registry/config.d.ts.map +1 -0
  20. package/dist/runtime/wallet-runtime.d.ts +35 -0
  21. package/dist/runtime/wallet-runtime.d.ts.map +1 -0
  22. package/dist/serverless.cjs +18653 -22450
  23. package/dist/serverless.d.ts.map +1 -1
  24. package/dist/serverless.js +18654 -22451
  25. package/dist/services/AgenticOnboardingService.d.ts +51 -0
  26. package/dist/services/AgenticOnboardingService.d.ts.map +1 -0
  27. package/dist/services/AgenticSetupSessionManager.d.ts +82 -0
  28. package/dist/services/AgenticSetupSessionManager.d.ts.map +1 -0
  29. package/dist/services/KeyManager.d.ts +4 -3
  30. package/dist/services/KeyManager.d.ts.map +1 -1
  31. package/dist/services/McpWalletService.d.ts +75 -2
  32. package/dist/services/McpWalletService.d.ts.map +1 -1
  33. package/dist/services/WalletRegistryService.d.ts +99 -0
  34. package/dist/services/WalletRegistryService.d.ts.map +1 -0
  35. package/dist/tools/address-tools.d.ts +119 -0
  36. package/dist/tools/address-tools.d.ts.map +1 -0
  37. package/dist/tools/agentic-onboarding-tools.d.ts +120 -0
  38. package/dist/tools/agentic-onboarding-tools.d.ts.map +1 -0
  39. package/dist/tools/agentic-tools.d.ts +71 -0
  40. package/dist/tools/agentic-tools.d.ts.map +1 -0
  41. package/dist/tools/dns-tools.d.ts.map +1 -1
  42. package/dist/tools/index.d.ts +5 -0
  43. package/dist/tools/index.d.ts.map +1 -1
  44. package/dist/tools/nft-tools.d.ts.map +1 -1
  45. package/dist/tools/sanitize.d.ts +44 -0
  46. package/dist/tools/sanitize.d.ts.map +1 -0
  47. package/dist/tools/transaction-tools.d.ts +31 -0
  48. package/dist/tools/transaction-tools.d.ts.map +1 -0
  49. package/dist/tools/transfer-tools.d.ts +8 -8
  50. package/dist/tools/transfer-tools.d.ts.map +1 -1
  51. package/dist/tools/wallet-management-tools.d.ts +249 -0
  52. package/dist/tools/wallet-management-tools.d.ts.map +1 -0
  53. package/dist/types/config.d.ts +4 -3
  54. package/dist/types/config.d.ts.map +1 -1
  55. package/dist/types/contacts.d.ts +2 -1
  56. package/dist/types/contacts.d.ts.map +1 -1
  57. package/dist/utils/address.d.ts +15 -0
  58. package/dist/utils/address.d.ts.map +1 -0
  59. package/dist/utils/agentic.d.ts +61 -0
  60. package/dist/utils/agentic.d.ts.map +1 -0
  61. package/dist/utils/math.d.ts +9 -0
  62. package/dist/utils/math.d.ts.map +1 -0
  63. package/dist/utils/private-key.d.ts +14 -0
  64. package/dist/utils/private-key.d.ts.map +1 -0
  65. package/dist/utils/ton-client.d.ts +14 -0
  66. package/dist/utils/ton-client.d.ts.map +1 -0
  67. package/llms.txt +151 -6
  68. package/package.json +3 -3
  69. package/skills/SKILL.md +63 -8
  70. package/dist/contracts/w5_ownable/WalletOwnable.d.ts +0 -87
  71. package/dist/contracts/w5_ownable/WalletOwnable.d.ts.map +0 -1
  72. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts +0 -11
  73. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts.map +0 -1
  74. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts +0 -111
  75. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts.map +0 -1
  76. package/dist/contracts/w5_ownable/actions.d.ts.map +0 -1
  77. package/dist/contracts/w5_ownable/index.d.ts +0 -12
  78. package/dist/contracts/w5_ownable/index.d.ts.map +0 -1
  79. /package/dist/contracts/{w5_ownable → agentic_wallet}/actions.d.ts +0 -0
package/README.md CHANGED
@@ -6,32 +6,66 @@ A Model Context Protocol (MCP) server for TON blockchain wallet operations. Buil
6
6
 
7
7
  - **Balance Queries**: Check TON and Jetton balances, view transaction history
8
8
  - **Transfers**: Send TON, Jettons, and NFTs to any address
9
+ - **Agentic Sub-wallet Deploy**: Deploy additional Agentic wallets from a root Agentic wallet
9
10
  - **Swaps**: Get quotes for token swaps via DEX aggregators
10
11
  - **NFTs**: List, inspect, and transfer NFTs
11
- - **DNS**: Resolve `.ton` domains and reverse-lookup addresses
12
+ - **DNS**: Resolve TON DNS-compatible domains and reverse-lookup addresses
12
13
  - **Known Jettons**: Built-in directory of popular tokens
13
- - **Multiple Transports**: Stdio (default), HTTP server, and serverless modes
14
+ - **Wallet Registry Mode**: Work with multiple stored wallets, active wallet selection, and local config-backed management tools
15
+ - **Agentic Onboarding**: Start and complete first root-agent wallet setup from MCP
16
+ - **Multiple Transports**: Stdio (default), multi-session HTTP server, and serverless modes
14
17
 
15
18
  ## Quick Start
16
19
 
17
- > **Note:** We currently do not support launch without a mnemonic or private key.
20
+ `@ton/mcp` supports two runtime modes.
21
+
22
+ - **Registry mode**: if `MNEMONIC` and `PRIVATE_KEY` are not set, the server starts from local config registry at `~/.config/ton/config.json` or `TON_CONFIG_PATH`
23
+ - **Single-wallet mode**: if `MNEMONIC` or `PRIVATE_KEY` is set, the server starts with one in-memory wallet
18
24
 
19
25
  ```bash
20
- # Run as stdio MCP server
26
+ # Run as stdio MCP server in registry mode
27
+ npx @ton/mcp
28
+
29
+ # Run in registry mode with a custom config path
30
+ TON_CONFIG_PATH=/path/to/config.json npx @ton/mcp
31
+
32
+ # Run as stdio MCP server with mnemonic
21
33
  MNEMONIC="word1 word2 ..." npx @ton/mcp
22
34
 
23
35
  # Run as HTTP server (port 3000)
24
- MNEMONIC="word1 word2 ..." npx @ton/mcp --http
36
+ npx @ton/mcp --http
25
37
 
26
38
  # Run as HTTP server on custom port
27
- MNEMONIC="word1 word2 ..." npx @ton/mcp --http 8080
39
+ npx @ton/mcp --http 8080
40
+
41
+ # Run with custom agentic wallet contract
42
+ PRIVATE_KEY="0xyour_private_key" \
43
+ WALLET_VERSION="agentic" \
44
+ AGENTIC_WALLET_ADDRESS="EQ..." \
45
+ npx @ton/mcp
28
46
  ```
29
47
 
30
48
  ## Usage with MCP Clients
31
49
 
32
50
  ### Claude Desktop / Cursor
33
51
 
34
- Add to your MCP configuration:
52
+ Registry mode:
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "ton": {
58
+ "command": "npx",
59
+ "args": ["-y", "@ton/mcp"],
60
+ "env": {
61
+ "TON_CONFIG_PATH": "/absolute/path/to/config.json"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ Single-wallet mode:
35
69
 
36
70
  ```json
37
71
  {
@@ -53,22 +87,33 @@ Add to your MCP configuration:
53
87
  Start the server and point your MCP client to the endpoint:
54
88
 
55
89
  ```bash
56
- MNEMONIC="word1 word2 ..." npx @ton/mcp --http 3000
90
+ npx @ton/mcp --http 3000
57
91
  # MCP endpoint: http://localhost:3000/mcp
58
92
  ```
59
93
 
94
+ HTTP mode keeps a separate MCP session/transport per client session id, so multiple clients can initialize and reconnect independently.
95
+
60
96
  ## Environment Variables
61
97
 
62
- | Variable | Default | Description |
98
+ | Variable | Default | Description |
63
99
  |-------------------|-----------|-------------------------------------------------------|
64
- | `NETWORK` | `mainnet` | TON network (`mainnet` / `testnet`) |
65
- | `MNEMONIC` | | Space-separated 24-word mnemonic phrase for wallet |
66
- | `PRIVATE_KEY` | | Hex-encoded private key (alternative to mnemonic) |
67
- | `WALLET_VERSION` | `v5r1` | Wallet version to use (`v5r1` or `v4r2`) |
68
- | `TONCENTER_API_KEY`| | API key for Toncenter (optional, for higher rate limits)|
100
+ | `NETWORK` | `mainnet` | TON network (`mainnet` / `testnet`) and default env override target for `TONCENTER_API_KEY` |
101
+ | `MNEMONIC` | | Space-separated 24-word mnemonic phrase for single-wallet mode |
102
+ | `PRIVATE_KEY` | | Hex-encoded private key: 32-byte seed or 64-byte `private||public` (alternative to mnemonic) |
103
+ | `WALLET_VERSION` | `v5r1` | Wallet version to use in single-wallet mode (`v5r1`, `v4r2`, or `agentic`) |
104
+ | `AGENTIC_WALLET_ADDRESS` | | Agentic wallet address (required for `WALLET_VERSION=agentic`, unless derived from init params) |
105
+ | `AGENTIC_WALLET_NFT_INDEX` | | Agentic wallet NFT index / subwallet id (`uint256`, optional) |
106
+ | `AGENTIC_COLLECTION_ADDRESS` | `EQByQ19qvWxW7VibSbGEgZiYMqilHY5y1a_eeSL2VaXhfy07` | Agentic collection address override for single-wallet mode |
107
+ | `TONCENTER_API_KEY` | | API key for Toncenter (optional, for higher rate limits) |
108
+ | `TON_CONFIG_PATH` | `~/.config/ton/config.json` | Config path for registry mode |
109
+ | `AGENTIC_CALLBACK_BASE_URL` | | Optional public base URL for agentic onboarding callbacks |
110
+ | `AGENTIC_CALLBACK_HOST` | `127.0.0.1` | Host for the local callback server in stdio mode |
111
+ | `AGENTIC_CALLBACK_PORT` | random free port | Port for the local callback server in stdio mode |
69
112
 
70
113
  ## Available Tools
71
114
 
115
+ In registry mode, wallet-scoped tools below also accept optional `walletSelector`. If omitted, the active wallet is used.
116
+
72
117
  ### Wallet Info
73
118
 
74
119
  #### `get_wallet`
@@ -76,6 +121,24 @@ Get the current wallet address and network information.
76
121
 
77
122
  **Returns:** Wallet address and network (`mainnet` or `testnet`)
78
123
 
124
+ #### `list_wallets` (registry mode only)
125
+ List all wallets stored in the local TON config registry.
126
+
127
+ #### `get_current_wallet` (registry mode only)
128
+ Get the currently active wallet from the local TON config registry.
129
+
130
+ #### `set_active_wallet` (registry mode only)
131
+ Set the active wallet by id, name, or address.
132
+
133
+ **Parameters:**
134
+ - `walletSelector` (required): Wallet id, name, or address
135
+
136
+ #### `remove_wallet` (registry mode only)
137
+ Soft-delete a stored wallet from the local registry. Removed wallets remain in the config file but are hidden from MCP listings and wallet selection.
138
+
139
+ **Parameters:**
140
+ - `walletSelector` (required): Wallet id, name, or address
141
+
79
142
  ### Balance & History
80
143
 
81
144
  #### `get_balance`
@@ -83,6 +146,14 @@ Get the TON balance of the wallet.
83
146
 
84
147
  **Returns:** Balance in TON and nanoTON
85
148
 
149
+ #### `get_balance_by_address`
150
+ Get the TON balance of any address.
151
+
152
+ **Parameters:**
153
+ - `address` (required): TON wallet address
154
+
155
+ **Returns:** Address balance in TON and nanoTON
156
+
86
157
  #### `get_jetton_balance`
87
158
  Get the balance of a specific Jetton in the wallet.
88
159
 
@@ -92,16 +163,38 @@ Get the balance of a specific Jetton in the wallet.
92
163
  #### `get_jettons`
93
164
  List all Jettons held by the wallet with balances and metadata.
94
165
 
166
+ #### `get_jettons_by_address`
167
+ List Jettons held by any address with balances and metadata.
168
+
169
+ **Parameters:**
170
+ - `address` (required): Owner wallet address
171
+ - `limit` (optional): Maximum number of jettons to return (default: 20, max: 100)
172
+ - `offset` (optional): Offset for pagination (default: 0)
173
+
174
+ #### `get_jetton_info`
175
+ Get metadata for a Jetton master contract.
176
+
177
+ **Parameters:**
178
+ - `address` (required): Jetton master contract address
179
+
95
180
  #### `get_transactions`
96
181
  Get recent transaction history for the wallet (TON transfers, Jetton transfers, swaps, etc.).
97
182
 
98
183
  **Parameters:**
99
184
  - `limit` (optional): Maximum number of transactions to return (default: 20, max: 100)
100
185
 
186
+ #### `get_transaction_status`
187
+ Get the status of a transaction by its normalized hash to know if it is pending, completed, or failed. In TON, a transaction is considered "complete" only when the entire trace finishes processing.
188
+
189
+ **Default flow:** After sending a transaction, poll this until status is completed or failed. User can specify whether to check status.
190
+
191
+ **Parameters:**
192
+ - `normalizedHash` (required): Normalized hash of the external-in transaction (Hex string). Note: This must be the *normalized* hash of the message sent to the network.
193
+
101
194
  ### Transfers
102
195
 
103
196
  #### `send_ton`
104
- Send TON to an address. Amount is in human-readable format (e.g., `"1.5"` means 1.5 TON).
197
+ Send TON to an address. Amount is in human-readable format (e.g., `"1.5"` means 1.5 TON). Returns top-level `normalizedHash`. Default flow: poll `get_transaction_status` until completed or failed; user can skip.
105
198
 
106
199
  **Parameters:**
107
200
  - `toAddress` (required): Recipient TON address
@@ -109,7 +202,7 @@ Send TON to an address. Amount is in human-readable format (e.g., `"1.5"` means
109
202
  - `comment` (optional): Transaction comment/memo
110
203
 
111
204
  #### `send_jetton`
112
- Send Jettons to an address. Amount is in human-readable format.
205
+ Send Jettons to an address. Amount is in human-readable format. Returns top-level `normalizedHash`. Default flow: poll `get_transaction_status` until completed or failed; user can skip.
113
206
 
114
207
  **Parameters:**
115
208
  - `toAddress` (required): Recipient TON address
@@ -118,7 +211,7 @@ Send Jettons to an address. Amount is in human-readable format.
118
211
  - `comment` (optional): Transaction comment/memo
119
212
 
120
213
  #### `send_raw_transaction`
121
- Send a raw transaction with full control over messages. Supports multiple messages in a single transaction.
214
+ Send a raw transaction with full control over messages. Supports multiple messages. Returns top-level `normalizedHash`. Default flow: poll `get_transaction_status` until completed or failed; user can skip.
122
215
 
123
216
  **Parameters:**
124
217
  - `messages` (required): Array of messages, each with:
@@ -129,6 +222,16 @@ Send a raw transaction with full control over messages. Supports multiple messag
129
222
  - `validUntil` (optional): Unix timestamp after which the transaction becomes invalid
130
223
  - `fromAddress` (optional): Sender wallet address
131
224
 
225
+ #### `agentic_deploy_subwallet`
226
+ Deploy a new Agentic sub-wallet from the current wallet. Works only with an agentic root wallet that can sign and only when the current wallet is a user-root wallet (`deployedByUser=true`). Returns `normalizedHash`, deployed sub-wallet address, and computed sub-wallet NFT index. NFT metadata is written in onchain TEP-64 format.
227
+
228
+ **Default flow:** Poll `get_transaction_status` with the returned `normalizedHash` until completion.
229
+
230
+ **Parameters:**
231
+ - `operatorPublicKey` (required): New sub-wallet operator public key (`uint256`, decimal or `0x`-prefixed hex)
232
+ - `metadata` (required): Onchain TEP-64 metadata object. Must include at least `name` (non-empty string).
233
+ - `amountTon` (optional): TON amount to attach for deployment in TON units (default: `"0.05"`)
234
+
132
235
  ### Swaps
133
236
 
134
237
  #### `get_swap_quote`
@@ -149,6 +252,14 @@ List all NFTs in the wallet with metadata, collection info, and attributes.
149
252
  - `limit` (optional): Maximum number of NFTs to return (default: 20, max: 100)
150
253
  - `offset` (optional): Offset for pagination (default: 0)
151
254
 
255
+ #### `get_nfts_by_address`
256
+ List NFTs held by any address with metadata, collection info, and attributes.
257
+
258
+ **Parameters:**
259
+ - `address` (required): Owner wallet address
260
+ - `limit` (optional): Maximum number of NFTs to return (default: 20, max: 100)
261
+ - `offset` (optional): Offset for pagination (default: 0)
262
+
152
263
  #### `get_nft`
153
264
  Get detailed information about a specific NFT by its address.
154
265
 
@@ -156,7 +267,7 @@ Get detailed information about a specific NFT by its address.
156
267
  - `nftAddress` (required): NFT item contract address
157
268
 
158
269
  #### `send_nft`
159
- Transfer an NFT from the wallet to another address.
270
+ Transfer an NFT from the wallet to another address. Returns `normalizedHash`. Default flow: poll `get_transaction_status` until completed or failed; user can skip.
160
271
 
161
272
  **Parameters:**
162
273
  - `nftAddress` (required): NFT item contract address to transfer
@@ -166,13 +277,13 @@ Transfer an NFT from the wallet to another address.
166
277
  ### DNS
167
278
 
168
279
  #### `resolve_dns`
169
- Resolve a TON DNS domain (e.g., `"foundation.ton"`) to a wallet address.
280
+ Resolve a TON DNS-compatible domain name (e.g., `"foundation.ton"` or `"viqex.t.me"`) to a wallet address.
170
281
 
171
282
  **Parameters:**
172
283
  - `domain` (required): TON DNS domain to resolve
173
284
 
174
285
  #### `back_resolve_dns`
175
- Reverse-resolve a TON wallet address to its `.ton` domain.
286
+ Reverse-resolve a TON wallet address to its associated DNS domain when available.
176
287
 
177
288
  **Parameters:**
178
289
  - `address` (required): TON wallet address to reverse resolve
@@ -182,16 +293,82 @@ Reverse-resolve a TON wallet address to its `.ton` domain.
182
293
  #### `get_known_jettons`
183
294
  Get a list of known/popular Jettons on TON with their addresses and metadata. Useful for looking up token addresses for swaps or transfers.
184
295
 
296
+ #### `agentic_validate_wallet` (registry mode only)
297
+ Validate an existing agentic wallet address against the expected network and collection.
298
+
299
+ **Parameters:**
300
+ - `address` (required): Agentic wallet address
301
+ - `network` (optional): Network to validate against
302
+ - `collectionAddress` (optional): Collection address override
303
+ - `ownerAddress` (optional): Expected owner address
304
+
305
+ #### `agentic_list_wallets_by_owner` (registry mode only)
306
+ List agentic wallets owned by a given main wallet address.
307
+
308
+ **Parameters:**
309
+ - `ownerAddress` (required): Owner wallet address
310
+ - `network` (optional): Network to query
311
+
312
+ #### `agentic_import_wallet` (registry mode only)
313
+ Import an existing agentic wallet into the local TON config registry, recovering a matching pending key draft when available. Otherwise the wallet is imported read-only until `agentic_rotate_operator_key` is completed.
314
+
315
+ **Parameters:**
316
+ - `address` (required): Agentic wallet address
317
+ - `network` (optional): Network to validate against
318
+ - `name` (optional): Wallet display name
319
+
320
+ #### `agentic_start_root_wallet_setup` (registry mode only)
321
+ Start first-root-agent setup: generate operator keys, persist a pending draft, and return a dashboard URL for the user to create the wallet from their main wallet.
322
+
323
+ **Parameters:**
324
+ - `network` (optional): Network for the new root wallet
325
+ - `name` (optional): Agent display name
326
+ - `source` (optional): Source or description
327
+ - `collectionAddress` (optional): Collection address override
328
+ - `tonDeposit` (optional): TON deposit hint for the dashboard
329
+
330
+ Pending onboarding callback state is persisted in the local config, so the setup can be resumed after MCP transport restarts. In HTTP mode, callback URLs are stable on the MCP server base URL. In stdio mode, use `AGENTIC_CALLBACK_BASE_URL` and/or `AGENTIC_CALLBACK_PORT` if you need a fixed callback endpoint across restarts.
331
+
332
+ #### `agentic_list_pending_root_wallet_setups` (registry mode only)
333
+ List pending root-agent onboarding drafts and their callback/session status.
334
+
335
+ #### `agentic_get_root_wallet_setup` (registry mode only)
336
+ Get one pending root-agent onboarding draft by setup id.
337
+
338
+ **Parameters:**
339
+ - `setupId` (required): Pending setup identifier
340
+
341
+ #### `agentic_complete_root_wallet_setup` (registry mode only)
342
+ Complete root-agent onboarding from callback payload or manually supplied wallet address, then import the resulting wallet and make it active.
343
+
344
+ **Parameters:**
345
+ - `setupId` (required): Pending setup identifier
346
+ - `walletAddress` (optional): Manual wallet address if no callback was received
347
+ - `ownerAddress` (optional): Owner address hint for validation
348
+
349
+ #### `agentic_cancel_root_wallet_setup` (registry mode only)
350
+ Cancel a pending root-agent onboarding draft and remove its pending state.
351
+
352
+ **Parameters:**
353
+ - `setupId` (required): Pending setup identifier
354
+
185
355
  ## Serverless Deployment
186
356
 
187
357
  The package exports a `@ton/mcp/serverless` entry point for deploying as a serverless function (AWS Lambda, Vercel, Cloudflare Workers, etc.). Credentials are passed via request headers instead of environment variables.
188
358
 
359
+ By design, serverless mode:
360
+
361
+ - operates in single-wallet mode only
362
+ - does not use the wallet registry
363
+ - does not expose wallet management and onboarding tools
364
+ - uses standard `v5r1` wallet type
365
+
189
366
  ### Headers
190
367
 
191
368
  | Header | Description |
192
369
  |-----------------|----------------------------------------------------------|
193
370
  | `MNEMONIC` | 24-word mnemonic phrase |
194
- | `PRIVATE_KEY` | Hex-encoded private key (takes priority over `MNEMONIC`) |
371
+ | `PRIVATE_KEY` | Hex-encoded private key: 32-byte seed or 64-byte (takes priority over `MNEMONIC`) |
195
372
  | `NETWORK` | `mainnet` (default) or `testnet` |
196
373
  | `TONCENTER_KEY` | Optional TonCenter API key for higher rate limits |
197
374
 
@@ -241,6 +418,10 @@ pnpm --filter @ton/mcp dev:cli:http
241
418
  # Build
242
419
  pnpm --filter @ton/mcp build
243
420
 
421
+ # Checks
422
+ pnpm --filter @ton/mcp test
423
+ pnpm --filter @ton/mcp typecheck
424
+
244
425
  # Run built version
245
426
  node packages/mcp/dist/cli.js
246
427
  node packages/mcp/dist/cli.js --http 8080
@@ -274,6 +455,18 @@ const wallet = await kit.addWallet(walletAdapter);
274
455
  const server = await createTonWalletMCP({ wallet });
275
456
  ```
276
457
 
458
+ The same factory also supports registry mode:
459
+
460
+ ```typescript
461
+ import { createTonWalletMCP } from '@ton/mcp';
462
+
463
+ const server = await createTonWalletMCP({
464
+ networks: {
465
+ mainnet: { apiKey: process.env.TONCENTER_API_KEY },
466
+ },
467
+ });
468
+ ```
469
+
277
470
  ## License
278
471
 
279
472
  MIT