@ironwallet/mcp-server 1.0.0 → 1.0.2

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 (53) hide show
  1. package/README.md +16 -9
  2. package/assets/logo-mark.png +0 -0
  3. package/dist/api/swap.d.ts +1 -1
  4. package/dist/api/swap.js +1 -1
  5. package/dist/config.d.ts +16 -12
  6. package/dist/config.js +59 -31
  7. package/dist/config.js.map +1 -1
  8. package/dist/device-fingerprint.d.ts +18 -0
  9. package/dist/device-fingerprint.js +81 -0
  10. package/dist/device-fingerprint.js.map +1 -0
  11. package/dist/keystore/store.js +3 -7
  12. package/dist/keystore/store.js.map +1 -1
  13. package/dist/local-secrets.d.ts +2 -2
  14. package/dist/local-secrets.js +5 -9
  15. package/dist/local-secrets.js.map +1 -1
  16. package/dist/networks.d.ts +5 -0
  17. package/dist/networks.js +21 -0
  18. package/dist/networks.js.map +1 -0
  19. package/dist/policy.d.ts +3 -1
  20. package/dist/policy.js +6 -0
  21. package/dist/policy.js.map +1 -1
  22. package/dist/qr/deposit-qr.d.ts +17 -0
  23. package/dist/qr/deposit-qr.js +203 -0
  24. package/dist/qr/deposit-qr.js.map +1 -0
  25. package/dist/qr/font.d.ts +6 -0
  26. package/dist/qr/font.js +79 -0
  27. package/dist/qr/font.js.map +1 -0
  28. package/dist/restrict-private-file.d.ts +9 -0
  29. package/dist/restrict-private-file.js +53 -0
  30. package/dist/restrict-private-file.js.map +1 -0
  31. package/dist/server.js +14 -8
  32. package/dist/server.js.map +1 -1
  33. package/dist/tools/definitions.d.ts +40 -0
  34. package/dist/tools/definitions.js +219 -0
  35. package/dist/tools/definitions.js.map +1 -0
  36. package/dist/tools/helpers.d.ts +20 -6
  37. package/dist/tools/helpers.js +10 -4
  38. package/dist/tools/helpers.js.map +1 -1
  39. package/dist/tools/swap.d.ts +1 -1
  40. package/dist/tools/swap.js +9 -75
  41. package/dist/tools/swap.js.map +1 -1
  42. package/dist/tools/transfer.d.ts +1 -1
  43. package/dist/tools/transfer.js +7 -54
  44. package/dist/tools/transfer.js.map +1 -1
  45. package/dist/tools/wallets.js +56 -24
  46. package/dist/tools/wallets.js.map +1 -1
  47. package/dist/wallet/derive.d.ts +1 -1
  48. package/dist/wallet/derive.js +1 -1
  49. package/dist/web/manager.js +104 -34
  50. package/dist/web/manager.js.map +1 -1
  51. package/package.json +43 -4
  52. package/server.json +23 -0
  53. package/tools.json +573 -0
package/tools.json ADDED
@@ -0,0 +1,573 @@
1
+ {
2
+ "package": "@ironwallet/mcp-server",
3
+ "mcpName": "io.ironwallet/mcp-server",
4
+ "version": "1.0.2",
5
+ "tools": [
6
+ {
7
+ "name": "list_wallets",
8
+ "title": "List wallets",
9
+ "description": "List the wallets in the local keystore with their addresses per network. Each wallet includes policy ({ enabled: false } when unset). Never returns private keys or seed phrases.",
10
+ "purpose": "Names, addresses, and `policy`",
11
+ "movesFunds": false,
12
+ "inputSchema": {
13
+ "type": "object",
14
+ "properties": {},
15
+ "additionalProperties": false
16
+ }
17
+ },
18
+ {
19
+ "name": "create_wallets",
20
+ "title": "Create wallets",
21
+ "description": "Generate one or more brand-new wallets (BIP-39). Returns names and addresses only. Seed phrases are NOT returned to the agent. The response includes a local browser URL where the user can view and back up the recovery phrases.",
22
+ "purpose": "New wallets; returns a browser `backup_url`",
23
+ "movesFunds": false,
24
+ "inputSchema": {
25
+ "type": "object",
26
+ "properties": {
27
+ "count": {
28
+ "type": "integer",
29
+ "minimum": 1,
30
+ "maximum": 50,
31
+ "description": "How many wallets to create."
32
+ },
33
+ "name_prefix": {
34
+ "type": "string",
35
+ "description": "Optional name prefix, e.g. 'agent-hot'. Defaults to 'wallet'."
36
+ }
37
+ },
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "count"
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "open_wallet_manager",
46
+ "title": "Open wallet manager (browser)",
47
+ "description": "Open a local browser form to add/import/create wallets or back them up (reveal the recovery phrase). Returns a localhost URL for the user to open. Seed phrases are entered and shown ONLY in the browser and never pass through the agent. Use this whenever the user asks to add, import, create, or back up a wallet.",
48
+ "purpose": "Local browser UI to import / create / back up",
49
+ "movesFunds": false,
50
+ "inputSchema": {
51
+ "type": "object",
52
+ "properties": {},
53
+ "additionalProperties": false
54
+ }
55
+ },
56
+ {
57
+ "name": "get_deposit_qr",
58
+ "title": "Deposit QR",
59
+ "description": "PNG QR to receive funds (generated on the fly; IW mark, address under the code). Pass network for one chain; omit it for one QR per unique address. Does not move funds. Never returns keys or seed phrases. Show the attached image in chat when the host renders it. Each item also has qr_url — open that local URL if the user cannot see the QR, and always write the address in the reply.",
60
+ "purpose": "PNG QR (try chat; else local `qr_url`)",
61
+ "movesFunds": false,
62
+ "inputSchema": {
63
+ "type": "object",
64
+ "properties": {
65
+ "wallet": {
66
+ "type": "string",
67
+ "description": "Wallet name. Optional if only one exists."
68
+ },
69
+ "network": {
70
+ "type": "string",
71
+ "enum": [
72
+ "ethereum",
73
+ "bsc",
74
+ "polygon",
75
+ "base",
76
+ "arbitrum",
77
+ "optimism",
78
+ "avalanche",
79
+ "tron",
80
+ "bitcoin",
81
+ "litecoin",
82
+ "doge",
83
+ "solana",
84
+ "ton",
85
+ "xrp"
86
+ ],
87
+ "description": "Network to deposit on. Omit to return one QR per unique address."
88
+ }
89
+ },
90
+ "additionalProperties": false
91
+ }
92
+ },
93
+ {
94
+ "name": "get_balance",
95
+ "title": "Get balance",
96
+ "description": "Get the balance for a wallet on a network. Optionally pass a token contract address; omit for the native coin.",
97
+ "purpose": "Native or token balance",
98
+ "movesFunds": false,
99
+ "inputSchema": {
100
+ "type": "object",
101
+ "properties": {
102
+ "wallet": {
103
+ "type": "string",
104
+ "description": "Wallet name. Optional if only one exists."
105
+ },
106
+ "network": {
107
+ "type": "string",
108
+ "enum": [
109
+ "ethereum",
110
+ "bsc",
111
+ "polygon",
112
+ "base",
113
+ "arbitrum",
114
+ "optimism",
115
+ "avalanche",
116
+ "tron",
117
+ "bitcoin",
118
+ "litecoin",
119
+ "doge",
120
+ "solana",
121
+ "ton",
122
+ "xrp"
123
+ ]
124
+ },
125
+ "tokenAddress": {
126
+ "type": "string",
127
+ "description": "Token contract address. Omit for the native coin."
128
+ }
129
+ },
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "network"
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ "name": "estimate_transfer",
138
+ "title": "Estimate transfer",
139
+ "description": "Estimate fees for a transfer without sending. Returns fees and the number of transactions that would be signed.",
140
+ "purpose": "Fee estimate, no broadcast",
141
+ "movesFunds": false,
142
+ "inputSchema": {
143
+ "type": "object",
144
+ "properties": {
145
+ "wallet": {
146
+ "type": "string"
147
+ },
148
+ "network": {
149
+ "type": "string",
150
+ "enum": [
151
+ "ethereum",
152
+ "bsc",
153
+ "polygon",
154
+ "base",
155
+ "arbitrum",
156
+ "optimism",
157
+ "avalanche",
158
+ "tron",
159
+ "bitcoin",
160
+ "litecoin",
161
+ "doge",
162
+ "solana",
163
+ "ton",
164
+ "xrp"
165
+ ]
166
+ },
167
+ "to": {
168
+ "type": "string",
169
+ "description": "Recipient address."
170
+ },
171
+ "amount": {
172
+ "type": "string",
173
+ "description": "Amount in asset units (decimal string)."
174
+ },
175
+ "tokenAddress": {
176
+ "type": "string",
177
+ "description": "Token contract address. Omit for the native coin."
178
+ },
179
+ "memo": {
180
+ "type": "string"
181
+ }
182
+ },
183
+ "additionalProperties": false,
184
+ "required": [
185
+ "network",
186
+ "to",
187
+ "amount"
188
+ ]
189
+ }
190
+ },
191
+ {
192
+ "name": "send_transfer",
193
+ "title": "Send transfer",
194
+ "description": "Send a transfer: sign locally with the wallet's key and broadcast via the IronWallet forward relay (estimate -> sign -> forward) for EVM, Tron, Bitcoin, Litecoin, Doge, Solana, XRP and TON. Irreversible once broadcast — no second confirmation. Returns the transaction hash (and operation id where applicable).",
195
+ "purpose": "Sign locally and send",
196
+ "movesFunds": true,
197
+ "inputSchema": {
198
+ "type": "object",
199
+ "properties": {
200
+ "wallet": {
201
+ "type": "string"
202
+ },
203
+ "network": {
204
+ "type": "string",
205
+ "enum": [
206
+ "ethereum",
207
+ "bsc",
208
+ "polygon",
209
+ "base",
210
+ "arbitrum",
211
+ "optimism",
212
+ "avalanche",
213
+ "tron",
214
+ "bitcoin",
215
+ "litecoin",
216
+ "doge",
217
+ "solana",
218
+ "ton",
219
+ "xrp"
220
+ ]
221
+ },
222
+ "to": {
223
+ "type": "string",
224
+ "description": "Recipient address."
225
+ },
226
+ "amount": {
227
+ "type": "string",
228
+ "description": "Amount in asset units (decimal string)."
229
+ },
230
+ "tokenAddress": {
231
+ "type": "string",
232
+ "description": "Token contract address. Omit for the native coin."
233
+ },
234
+ "memo": {
235
+ "type": "string"
236
+ }
237
+ },
238
+ "additionalProperties": false,
239
+ "required": [
240
+ "network",
241
+ "to",
242
+ "amount"
243
+ ]
244
+ }
245
+ },
246
+ {
247
+ "name": "get_operation_status",
248
+ "title": "Get operation status",
249
+ "description": "Poll the state of a forward operation by its operation id.",
250
+ "purpose": "Poll a transfer",
251
+ "movesFunds": false,
252
+ "inputSchema": {
253
+ "type": "object",
254
+ "properties": {
255
+ "wallet": {
256
+ "type": "string"
257
+ },
258
+ "network": {
259
+ "type": "string",
260
+ "enum": [
261
+ "ethereum",
262
+ "bsc",
263
+ "polygon",
264
+ "base",
265
+ "arbitrum",
266
+ "optimism",
267
+ "avalanche",
268
+ "tron",
269
+ "bitcoin",
270
+ "litecoin",
271
+ "doge",
272
+ "solana",
273
+ "ton",
274
+ "xrp"
275
+ ]
276
+ },
277
+ "operationId": {
278
+ "type": "string"
279
+ }
280
+ },
281
+ "additionalProperties": false,
282
+ "required": [
283
+ "network",
284
+ "operationId"
285
+ ]
286
+ }
287
+ },
288
+ {
289
+ "name": "list_swap_networks",
290
+ "title": "List swap networks",
291
+ "description": "List networks available for swaps. Use before listing swap assets.",
292
+ "purpose": "Networks available for swap",
293
+ "movesFunds": false,
294
+ "inputSchema": {
295
+ "type": "object",
296
+ "properties": {
297
+ "wallet": {
298
+ "type": "string"
299
+ }
300
+ },
301
+ "additionalProperties": false
302
+ }
303
+ },
304
+ {
305
+ "name": "list_swap_assets",
306
+ "title": "List swap assets",
307
+ "description": "List tradable assets. direction=from lists sell assets; direction=to requires fromNetwork/fromSymbol (and fromAddress for tokens) and lists buy assets. Enriches with wallet address and balance when possible.",
308
+ "purpose": "Sell / buy catalog",
309
+ "movesFunds": false,
310
+ "inputSchema": {
311
+ "type": "object",
312
+ "properties": {
313
+ "wallet": {
314
+ "type": "string"
315
+ },
316
+ "direction": {
317
+ "type": "string",
318
+ "enum": [
319
+ "from",
320
+ "to"
321
+ ]
322
+ },
323
+ "fromNetwork": {
324
+ "type": "string"
325
+ },
326
+ "fromSymbol": {
327
+ "type": "string"
328
+ },
329
+ "fromAddress": {
330
+ "anyOf": [
331
+ {
332
+ "type": "string"
333
+ },
334
+ {
335
+ "type": "null"
336
+ }
337
+ ]
338
+ },
339
+ "search": {
340
+ "type": "string"
341
+ },
342
+ "networks": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "string"
346
+ }
347
+ },
348
+ "page": {
349
+ "type": "integer",
350
+ "exclusiveMinimum": 0
351
+ },
352
+ "pageSize": {
353
+ "type": "integer",
354
+ "exclusiveMinimum": 0,
355
+ "maximum": 100
356
+ }
357
+ },
358
+ "additionalProperties": false,
359
+ "required": [
360
+ "direction"
361
+ ]
362
+ }
363
+ },
364
+ {
365
+ "name": "estimate_swap",
366
+ "title": "Estimate swap",
367
+ "description": "Get a swap quote (amounts, fees, operationId). Quote can expire — prefer execute_swap for sending (it re-estimates). Amount is a decimal string; set maxMode=true to sell the full balance (backend corrects amount).",
368
+ "purpose": "Quote (may expire)",
369
+ "movesFunds": false,
370
+ "inputSchema": {
371
+ "type": "object",
372
+ "properties": {
373
+ "wallet": {
374
+ "type": "string"
375
+ },
376
+ "from": {
377
+ "type": "object",
378
+ "properties": {
379
+ "network": {
380
+ "type": "string",
381
+ "description": "Network id, e.g. ethereum, bsc, bitcoin."
382
+ },
383
+ "symbol": {
384
+ "type": "string",
385
+ "description": "Asset symbol, e.g. ETH, USDT."
386
+ },
387
+ "address": {
388
+ "anyOf": [
389
+ {
390
+ "type": "string"
391
+ },
392
+ {
393
+ "type": "null"
394
+ }
395
+ ],
396
+ "description": "Token contract address. Omit/null for the native coin."
397
+ },
398
+ "decimals": {
399
+ "type": "integer",
400
+ "description": "Token decimals. If omitted, resolved via SWP catalog (paged). Prefer passing decimals (+ address for tokens) from list_swap_assets."
401
+ }
402
+ },
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "network",
406
+ "symbol"
407
+ ]
408
+ },
409
+ "to": {
410
+ "type": "object",
411
+ "properties": {
412
+ "network": {
413
+ "type": "string",
414
+ "description": "Network id, e.g. ethereum, bsc, bitcoin."
415
+ },
416
+ "symbol": {
417
+ "type": "string",
418
+ "description": "Asset symbol, e.g. ETH, USDT."
419
+ },
420
+ "address": {
421
+ "anyOf": [
422
+ {
423
+ "type": "string"
424
+ },
425
+ {
426
+ "type": "null"
427
+ }
428
+ ],
429
+ "description": "Token contract address. Omit/null for the native coin."
430
+ },
431
+ "decimals": {
432
+ "type": "integer",
433
+ "description": "Token decimals. If omitted, resolved via SWP catalog (paged). Prefer passing decimals (+ address for tokens) from list_swap_assets."
434
+ }
435
+ },
436
+ "additionalProperties": false,
437
+ "required": [
438
+ "network",
439
+ "symbol"
440
+ ]
441
+ },
442
+ "amount": {
443
+ "type": "string",
444
+ "description": "Sell amount as decimal string. Required unless maxMode."
445
+ },
446
+ "maxMode": {
447
+ "type": "boolean"
448
+ }
449
+ },
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "from",
453
+ "to"
454
+ ]
455
+ }
456
+ },
457
+ {
458
+ "name": "execute_swap",
459
+ "title": "Execute swap",
460
+ "description": "Execute a swap: fresh estimate → create → local sign → execute. Does NOT use the transfer relay. Irreversible once submitted — no second confirmation. Returns operationId and txHash; poll with get_swap_status.",
461
+ "purpose": "Fresh quote → sign → swap",
462
+ "movesFunds": true,
463
+ "inputSchema": {
464
+ "type": "object",
465
+ "properties": {
466
+ "wallet": {
467
+ "type": "string"
468
+ },
469
+ "from": {
470
+ "type": "object",
471
+ "properties": {
472
+ "network": {
473
+ "type": "string",
474
+ "description": "Network id, e.g. ethereum, bsc, bitcoin."
475
+ },
476
+ "symbol": {
477
+ "type": "string",
478
+ "description": "Asset symbol, e.g. ETH, USDT."
479
+ },
480
+ "address": {
481
+ "anyOf": [
482
+ {
483
+ "type": "string"
484
+ },
485
+ {
486
+ "type": "null"
487
+ }
488
+ ],
489
+ "description": "Token contract address. Omit/null for the native coin."
490
+ },
491
+ "decimals": {
492
+ "type": "integer",
493
+ "description": "Token decimals. If omitted, resolved via SWP catalog (paged). Prefer passing decimals (+ address for tokens) from list_swap_assets."
494
+ }
495
+ },
496
+ "additionalProperties": false,
497
+ "required": [
498
+ "network",
499
+ "symbol"
500
+ ]
501
+ },
502
+ "to": {
503
+ "type": "object",
504
+ "properties": {
505
+ "network": {
506
+ "type": "string",
507
+ "description": "Network id, e.g. ethereum, bsc, bitcoin."
508
+ },
509
+ "symbol": {
510
+ "type": "string",
511
+ "description": "Asset symbol, e.g. ETH, USDT."
512
+ },
513
+ "address": {
514
+ "anyOf": [
515
+ {
516
+ "type": "string"
517
+ },
518
+ {
519
+ "type": "null"
520
+ }
521
+ ],
522
+ "description": "Token contract address. Omit/null for the native coin."
523
+ },
524
+ "decimals": {
525
+ "type": "integer",
526
+ "description": "Token decimals. If omitted, resolved via SWP catalog (paged). Prefer passing decimals (+ address for tokens) from list_swap_assets."
527
+ }
528
+ },
529
+ "additionalProperties": false,
530
+ "required": [
531
+ "network",
532
+ "symbol"
533
+ ]
534
+ },
535
+ "amount": {
536
+ "type": "string",
537
+ "description": "Sell amount as decimal string. Required unless maxMode."
538
+ },
539
+ "maxMode": {
540
+ "type": "boolean"
541
+ }
542
+ },
543
+ "additionalProperties": false,
544
+ "required": [
545
+ "from",
546
+ "to"
547
+ ]
548
+ }
549
+ },
550
+ {
551
+ "name": "get_swap_status",
552
+ "title": "Get swap status",
553
+ "description": "Poll swap order/operation status by operationId.",
554
+ "purpose": "Poll a swap",
555
+ "movesFunds": false,
556
+ "inputSchema": {
557
+ "type": "object",
558
+ "properties": {
559
+ "wallet": {
560
+ "type": "string"
561
+ },
562
+ "operationId": {
563
+ "type": "string"
564
+ }
565
+ },
566
+ "additionalProperties": false,
567
+ "required": [
568
+ "operationId"
569
+ ]
570
+ }
571
+ }
572
+ ]
573
+ }