cryptoiz-mcp 4.15.8 → 4.15.10

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 (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/setup.js +52 -35
package/index.js CHANGED
@@ -9,7 +9,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprot
9
9
  import { Connection, Keypair, PublicKey, Transaction, SystemProgram, VersionedTransaction, TransactionMessage } from '@solana/web3.js';
10
10
  import bs58 from 'bs58';
11
11
 
12
- var VERSION = 'v4.15.8';
12
+ var VERSION = 'v4.15.10';
13
13
  var GATEWAY = 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-x402-gateway';
14
14
  // Per-tool endpoints for Dexter settlement naming
15
15
  var TOOL_ENDPOINTS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "4.15.8",
3
+ "version": "4.15.10",
4
4
  "description": "CryptoIZ MCP Server - Solana DEX trading signals via Claude Desktop with x402 USDC micropayments (V2 Dexter facilitator)",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/setup.js CHANGED
@@ -2,10 +2,9 @@
2
2
  import fs from 'fs';
3
3
  import path from 'path';
4
4
  import os from 'os';
5
- import readline from 'readline';
6
5
  import { execSync } from 'child_process';
7
6
 
8
- var VERSION = 'v4.15.7';
7
+ var VERSION = 'v4.15.10';
9
8
  function print(msg) { process.stdout.write(msg + '\n'); }
10
9
 
11
10
  function findConfigPath() {
@@ -75,43 +74,61 @@ function injectConfig(cfgPath, entry) {
75
74
  fs.writeFileSync(cfgPath, JSON.stringify(config, null, 2), 'utf8');
76
75
  }
77
76
 
78
- async function setup() {
79
- print('');
80
- print('========================================');
81
- print(' CryptoIZ MCP Installer ' + VERSION);
82
- print('========================================');
83
- print('OS: ' + os.platform() + ' ' + os.arch());
84
- var cfgPath = findConfigPath();
85
- if (!cfgPath) { print('ERROR: Claude Desktop not found.'); process.exit(1); }
86
- print('Config: ' + cfgPath);
87
- if (os.platform() === 'win32') {
88
- print('[Windows] absolute paths mode');
89
- var pkg = findPackagePath();
90
- if (!pkg) { print('Run: npm install -g cryptoiz-mcp'); process.exit(1); }
91
- print('Node: ' + process.execPath);
92
- print('Package: ' + pkg);
93
- }
94
- print('');
95
- print('SECURITY: Use dedicated wallet, $1-5 USDC only, no SOL needed.');
96
- print('Export: Phantom > Settings > Security > Export Private Key');
77
+ // Get private key from command line argument
78
+ var key = (process.argv[2] || '').trim();
79
+
80
+ print('');
81
+ print('========================================');
82
+ print(' CryptoIZ MCP Installer ' + VERSION);
83
+ print('========================================');
84
+ print('OS: ' + os.platform() + ' ' + os.arch());
85
+
86
+ if (!key) {
97
87
  print('');
98
- var rl = readline.createInterface({ input: process.stdin, output: process.stdout });
99
- var key = await new Promise(function(r) { rl.question('Paste Solana private key (base58): ', function(a) { r(a.trim()); }); });
100
- rl.close();
101
- var chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
102
- if (!key || key.length < 40 || key.length > 100) { print('ERROR: Invalid key length.'); process.exit(1); }
103
- for (var i = 0; i < key.length; i++) { if (chars.indexOf(key[i]) === -1) { print('ERROR: Invalid base58 character.'); process.exit(1); } }
104
- injectConfig(cfgPath, buildEntry(key));
88
+ print('Usage:');
89
+ print(' npx cryptoiz-mcp-setup YOUR_PRIVATE_KEY');
105
90
  print('');
106
- print('SETUP COMPLETE!');
107
- print('Config: ' + cfgPath);
91
+ print('Example:');
92
+ print(' npx cryptoiz-mcp-setup 5MaiiCavjCmn9Hs1o...');
108
93
  print('');
109
- print('1. Close Claude Desktop completely');
110
- print('2. Reopen Claude Desktop');
111
- print('3. Type: get_status');
94
+ print('SECURITY:');
95
+ print('- Use a DEDICATED wallet (not main wallet)');
96
+ print('- Fund with $1-5 USDC only, no SOL needed');
97
+ print('- Export: Phantom > Settings > Security > Export Private Key');
112
98
  print('');
113
99
  print('Guide: cryptoiz.org/McpLanding');
114
- print('');
100
+ process.exit(1);
115
101
  }
116
102
 
117
- setup().catch(function(e) { print('Failed: ' + e.message); process.exit(1); });
103
+ // Validate base58
104
+ var chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
105
+ if (key.length < 40 || key.length > 100) { print('ERROR: Invalid key length (' + key.length + ' chars). Expected 44-88.'); process.exit(1); }
106
+ for (var i = 0; i < key.length; i++) {
107
+ if (chars.indexOf(key[i]) === -1) { print('ERROR: Invalid base58 character at position ' + i + ': "' + key[i] + '"'); process.exit(1); }
108
+ }
109
+
110
+ var cfgPath = findConfigPath();
111
+ if (!cfgPath) { print('ERROR: Claude Desktop not found.'); process.exit(1); }
112
+ print('Config: ' + cfgPath);
113
+
114
+ if (os.platform() === 'win32') {
115
+ print('[Windows] absolute paths mode');
116
+ var pkg = findPackagePath();
117
+ if (!pkg) { print('Run: npm install -g cryptoiz-mcp'); process.exit(1); }
118
+ print('Node: ' + process.execPath);
119
+ print('Package: ' + pkg);
120
+ }
121
+
122
+ injectConfig(cfgPath, buildEntry(key));
123
+
124
+ print('');
125
+ print('SETUP COMPLETE!');
126
+ print('Config: ' + cfgPath);
127
+ print('');
128
+ print('Next:');
129
+ print('1. Close Claude Desktop completely');
130
+ print('2. Reopen Claude Desktop');
131
+ print('3. Type: get_status');
132
+ print('');
133
+ print('Guide: cryptoiz.org/McpLanding');
134
+ print('');