cryptoiz-mcp 4.15.12 → 4.15.14
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 +6 -4
- package/index.js +31 -35
- package/package.json +14 -3
- package/setup.js +1 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CryptoIZ MCP Server
|
|
2
2
|
|
|
3
|
-
AI-powered Solana DEX
|
|
3
|
+
AI-powered Solana DEX whale intelligence for Claude Desktop. Pay per call with USDC on Solana via x402 Dexter protocol.
|
|
4
4
|
|
|
5
5
|
## Quick Install (2 commands)
|
|
6
6
|
|
|
@@ -21,9 +21,11 @@ Auto-detects OS, finds Claude Desktop config (including Windows MSIX), writes co
|
|
|
21
21
|
|
|
22
22
|
| Tool | Price | Data |
|
|
23
23
|
|------|-------|------|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
24
|
+
| get_whale_alpha | $0.05 | 20 smart money whale/dolphin signals |
|
|
25
|
+
| get_whale_divergence | $0.02 | 20 divergence signals (3 types) |
|
|
26
|
+
| get_whale_accumulation | $0.02 | Tokens in accumulation phase |
|
|
27
|
+
| get_whale_neutral | $0.02 | Tokens in neutral phase |
|
|
28
|
+
| get_whale_distribution | $0.02 | Tokens in distribution phase |
|
|
27
29
|
| get_btc_regime | $0.01 | BTC macro + Fear/Greed + technicals |
|
|
28
30
|
| get_token_ca | FREE | Contract address lookup |
|
|
29
31
|
| get_status | FREE | Server health check |
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// CryptoIZ MCP Server v4.15.
|
|
2
|
+
// CryptoIZ MCP Server v4.15.14
|
|
3
|
+
// Whale Intelligence Suite: 6 paid tools + 2 free
|
|
3
4
|
// x402 V2: Dexter facilitator (gas sponsored) + V1 backward compat
|
|
4
5
|
// ZERO template literals — Windows PowerShell safe
|
|
5
6
|
|
|
@@ -9,14 +10,20 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprot
|
|
|
9
10
|
import { Connection, Keypair, PublicKey, Transaction, SystemProgram, VersionedTransaction, TransactionMessage } from '@solana/web3.js';
|
|
10
11
|
import bs58 from 'bs58';
|
|
11
12
|
|
|
12
|
-
var VERSION = 'v4.15.
|
|
13
|
+
var VERSION = 'v4.15.14';
|
|
13
14
|
var GATEWAY = 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-x402-gateway';
|
|
14
15
|
// Per-tool endpoints for Dexter settlement naming
|
|
15
16
|
var TOOL_ENDPOINTS = {
|
|
17
|
+
get_whale_alpha: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-alpha-scanner',
|
|
18
|
+
get_whale_divergence: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-divergence',
|
|
19
|
+
get_whale_accumulation: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-accumulation',
|
|
20
|
+
get_whale_neutral: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-neutral',
|
|
21
|
+
get_whale_distribution: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-distribution',
|
|
22
|
+
get_btc_regime: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-btc-regime',
|
|
23
|
+
// Backward compat: old names -> same proxy endpoints
|
|
16
24
|
get_alpha_scanner: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-alpha-scanner',
|
|
17
25
|
get_divergence: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-divergence',
|
|
18
26
|
get_accumulation: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-accumulation',
|
|
19
|
-
get_btc_regime: 'https://rehqwsypjnjirhuiapqh.supabase.co/functions/v1/mcp-btc-regime',
|
|
20
27
|
};
|
|
21
28
|
var RECIPIENT = 'DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX';
|
|
22
29
|
var USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
|
@@ -48,12 +55,6 @@ function findATA(wallet, mint) {
|
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
// ===== V2: Build partially-signed tx for Dexter facilitator =====
|
|
51
|
-
// Reference: @x402/svm exact/client/scheme.ts (Coinbase reference SDK)
|
|
52
|
-
// Tx MUST contain exactly 4 instructions in this order:
|
|
53
|
-
// 1. SetComputeUnitLimit (20000)
|
|
54
|
-
// 2. SetComputeUnitPrice (1 microLamport)
|
|
55
|
-
// 3. TransferChecked (SPL Token)
|
|
56
|
-
// 4. Memo (random 16-byte nonce hex)
|
|
57
58
|
var COMPUTE_BUDGET_PROGRAM = 'ComputeBudget111111111111111111111111111111';
|
|
58
59
|
var MEMO_PROGRAM = 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr';
|
|
59
60
|
|
|
@@ -69,21 +70,17 @@ async function buildV2PaymentPayload(amount, feePayerAddr) {
|
|
|
69
70
|
var tokenProgramPk = new PublicKey(TOKEN_PROGRAM);
|
|
70
71
|
var usdcMintPk = new PublicKey(USDC_MINT);
|
|
71
72
|
|
|
72
|
-
// Instruction 1: SetComputeUnitLimit = 20000 (per @x402/svm constants)
|
|
73
73
|
var setLimitData = Buffer.alloc(5);
|
|
74
74
|
setLimitData.writeUInt8(2, 0);
|
|
75
75
|
setLimitData.writeUInt32LE(20000, 1);
|
|
76
76
|
var setLimitIx = { programId: computeBudgetPk, keys: [], data: setLimitData };
|
|
77
77
|
|
|
78
|
-
// Instruction 2: SetComputeUnitPrice = 1 microLamport (per @x402/svm constants)
|
|
79
78
|
var setPriceData = Buffer.alloc(9);
|
|
80
79
|
setPriceData.writeUInt8(3, 0);
|
|
81
80
|
setPriceData.writeUInt32LE(1, 1);
|
|
82
81
|
setPriceData.writeUInt32LE(0, 5);
|
|
83
82
|
var setPriceIx = { programId: computeBudgetPk, keys: [], data: setPriceData };
|
|
84
83
|
|
|
85
|
-
// Instruction 3: TransferChecked (SPL Token)
|
|
86
|
-
// Accounts order: [source, mint, destination, authority]
|
|
87
84
|
var transferKeys = [
|
|
88
85
|
{ pubkey: userATA, isSigner: false, isWritable: true },
|
|
89
86
|
{ pubkey: usdcMintPk, isSigner: false, isWritable: false },
|
|
@@ -91,15 +88,14 @@ async function buildV2PaymentPayload(amount, feePayerAddr) {
|
|
|
91
88
|
{ pubkey: kp.publicKey, isSigner: true, isWritable: false },
|
|
92
89
|
];
|
|
93
90
|
var transferData = Buffer.alloc(10);
|
|
94
|
-
transferData.writeUInt8(12, 0);
|
|
91
|
+
transferData.writeUInt8(12, 0);
|
|
95
92
|
var lo = amount & 0xFFFFFFFF;
|
|
96
93
|
var hi = Math.floor(amount / 0x100000000) & 0xFFFFFFFF;
|
|
97
94
|
transferData.writeUInt32LE(lo, 1);
|
|
98
95
|
transferData.writeUInt32LE(hi, 5);
|
|
99
|
-
transferData.writeUInt8(6, 9);
|
|
96
|
+
transferData.writeUInt8(6, 9);
|
|
100
97
|
var transferIx = { programId: tokenProgramPk, keys: transferKeys, data: transferData };
|
|
101
98
|
|
|
102
|
-
// Instruction 4: Memo with random 16-byte nonce (per @x402/svm reference)
|
|
103
99
|
var nonceBytes = new Uint8Array(16);
|
|
104
100
|
for (var i = 0; i < 16; i++) { nonceBytes[i] = Math.floor(Math.random() * 256); }
|
|
105
101
|
var nonceHex = '';
|
|
@@ -110,10 +106,8 @@ async function buildV2PaymentPayload(amount, feePayerAddr) {
|
|
|
110
106
|
var memoData = Buffer.from(nonceHex, 'utf8');
|
|
111
107
|
var memoIx = { programId: memoProgramPk, keys: [], data: memoData };
|
|
112
108
|
|
|
113
|
-
// Get recent blockhash
|
|
114
109
|
var bhResult = await conn.getLatestBlockhash('confirmed');
|
|
115
110
|
|
|
116
|
-
// Build V0 message: feePayer = Dexter, 4 instructions in spec order
|
|
117
111
|
var message = new TransactionMessage({
|
|
118
112
|
payerKey: feePayerPk,
|
|
119
113
|
recentBlockhash: bhResult.blockhash,
|
|
@@ -121,8 +115,6 @@ async function buildV2PaymentPayload(amount, feePayerAddr) {
|
|
|
121
115
|
}).compileToV0Message();
|
|
122
116
|
|
|
123
117
|
var vtx = new VersionedTransaction(message);
|
|
124
|
-
|
|
125
|
-
// Partially sign with user keypair only (Dexter signs as feePayer later)
|
|
126
118
|
vtx.sign([kp]);
|
|
127
119
|
|
|
128
120
|
var serialized = vtx.serialize();
|
|
@@ -187,10 +179,11 @@ async function callTool(toolName, args) {
|
|
|
187
179
|
queryParts.push('tool=' + toolName);
|
|
188
180
|
}
|
|
189
181
|
|
|
190
|
-
|
|
182
|
+
// Handle timeframe for divergence tools (new and old name)
|
|
183
|
+
if ((toolName === 'get_whale_divergence' || toolName === 'get_divergence') && args && args.timeframe) {
|
|
191
184
|
queryParts.push('tf=' + args.timeframe);
|
|
192
185
|
}
|
|
193
|
-
if (toolName === 'get_token_ca' && args && args.name) {
|
|
186
|
+
if ((toolName === 'get_token_ca') && args && args.name) {
|
|
194
187
|
queryParts.push('name=' + encodeURIComponent(args.name));
|
|
195
188
|
}
|
|
196
189
|
|
|
@@ -253,14 +246,11 @@ async function callTool(toolName, args) {
|
|
|
253
246
|
var headerName = '';
|
|
254
247
|
|
|
255
248
|
if (useV2 && paymentRequirements.extra && paymentRequirements.extra.feePayer) {
|
|
256
|
-
// V2: Build partially-signed tx with 4 instructions, Dexter pays gas
|
|
257
249
|
var v2FeePayer = paymentRequirements.extra.feePayer;
|
|
258
250
|
console.error('[cryptoiz-mcp] V2 mode: 4-ix tx (Limit+Price+TransferChecked+Memo), feePayer=' + v2FeePayer.substring(0, 8) + '...');
|
|
259
251
|
try {
|
|
260
252
|
var txB64 = await buildV2PaymentPayload(amount, v2FeePayer);
|
|
261
253
|
|
|
262
|
-
// Payload per @x402/svm facilitator: must include 'accepted' field
|
|
263
|
-
// Facilitator verify() checks payload.accepted.scheme and payload.accepted.network
|
|
264
254
|
var v2Payload = {
|
|
265
255
|
x402Version: 2,
|
|
266
256
|
accepted: {
|
|
@@ -280,12 +270,10 @@ async function callTool(toolName, args) {
|
|
|
280
270
|
useV2 = false;
|
|
281
271
|
}
|
|
282
272
|
} else {
|
|
283
|
-
// No feePayer in requirements — force V1
|
|
284
273
|
useV2 = false;
|
|
285
274
|
}
|
|
286
275
|
|
|
287
276
|
if (!useV2) {
|
|
288
|
-
// V1 fallback: send USDC on-chain, then pass signature
|
|
289
277
|
console.error('[cryptoiz-mcp] V1 mode: sending USDC on-chain...');
|
|
290
278
|
var sig = await sendUSDC(amount);
|
|
291
279
|
console.error('[cryptoiz-mcp] V1 TX confirmed: ' + sig);
|
|
@@ -308,7 +296,6 @@ async function callTool(toolName, args) {
|
|
|
308
296
|
console.error('[cryptoiz-mcp] Auto-fallback to V1 (sendUSDC on-chain)...');
|
|
309
297
|
|
|
310
298
|
try {
|
|
311
|
-
// V1: send USDC on-chain, retry with x-payment
|
|
312
299
|
var fallbackSig = await sendUSDC(amount);
|
|
313
300
|
console.error('[cryptoiz-mcp] V1 fallback TX confirmed: ' + fallbackSig);
|
|
314
301
|
|
|
@@ -327,7 +314,6 @@ async function callTool(toolName, args) {
|
|
|
327
314
|
throw new Error('Payment failed (' + resp2.status + '): ' + errBody);
|
|
328
315
|
}
|
|
329
316
|
|
|
330
|
-
// Read receipt header (V2 or V1)
|
|
331
317
|
var receipt = resp2.headers.get('payment-response') || resp2.headers.get('x-payment-response');
|
|
332
318
|
if (receipt) {
|
|
333
319
|
try {
|
|
@@ -345,13 +331,13 @@ async function callTool(toolName, args) {
|
|
|
345
331
|
// ===== MCP SERVER SETUP =====
|
|
346
332
|
var TOOLS = [
|
|
347
333
|
{
|
|
348
|
-
name: '
|
|
349
|
-
description: 'Get top 20 smart money alpha signals from CryptoIZ Solana DEX scanner. Shows accumulation patterns,
|
|
334
|
+
name: 'get_whale_alpha',
|
|
335
|
+
description: 'Get top 20 smart money alpha signals from CryptoIZ Solana DEX scanner. Shows whale/dolphin accumulation patterns, entry timing, and risk scores. Cost: $0.05 USDC.',
|
|
350
336
|
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
351
337
|
},
|
|
352
338
|
{
|
|
353
|
-
name: '
|
|
354
|
-
description: 'Get divergence signals - hidden accumulation, breakout accumulation, classic divergence between price and
|
|
339
|
+
name: 'get_whale_divergence',
|
|
340
|
+
description: 'Get divergence signals - hidden accumulation, breakout accumulation, classic divergence between price and whale activity. Cost: $0.02 USDC.',
|
|
355
341
|
inputSchema: {
|
|
356
342
|
type: 'object',
|
|
357
343
|
properties: {
|
|
@@ -361,8 +347,18 @@ var TOOLS = [
|
|
|
361
347
|
},
|
|
362
348
|
},
|
|
363
349
|
{
|
|
364
|
-
name: '
|
|
365
|
-
description: 'Get tokens in accumulation phase with holder tier analysis (whale/dolphin/shrimp deltas). Cost: $0.02 USDC.',
|
|
350
|
+
name: 'get_whale_accumulation',
|
|
351
|
+
description: 'Get tokens in accumulation phase with holder tier analysis (whale/dolphin/shrimp deltas). Smart money is entering these tokens. Cost: $0.02 USDC.',
|
|
352
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: 'get_whale_neutral',
|
|
356
|
+
description: 'Get tokens in neutral phase - no clear accumulation or distribution. Watch for phase transitions. Cost: $0.02 USDC.',
|
|
357
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: 'get_whale_distribution',
|
|
361
|
+
description: 'Get tokens in distribution phase - whale selling detected. Smart money is exiting. Consider closing positions or avoiding. Cost: $0.02 USDC.',
|
|
366
362
|
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
367
363
|
},
|
|
368
364
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cryptoiz-mcp",
|
|
3
|
-
"version": "4.15.
|
|
4
|
-
"
|
|
3
|
+
"version": "4.15.14",
|
|
4
|
+
"mcpName": "io.github.dadang11/cryptoiz",
|
|
5
|
+
"description": "CryptoIZ MCP Server - Solana DEX whale intelligence via Claude Desktop with x402 USDC micropayments (V2 Dexter facilitator)",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"bin": {
|
|
@@ -24,13 +25,23 @@
|
|
|
24
25
|
},
|
|
25
26
|
"keywords": [
|
|
26
27
|
"mcp",
|
|
28
|
+
"mcp-server",
|
|
27
29
|
"claude",
|
|
28
30
|
"solana",
|
|
29
31
|
"crypto",
|
|
30
32
|
"trading",
|
|
31
33
|
"x402",
|
|
32
34
|
"usdc",
|
|
33
|
-
"dexter"
|
|
35
|
+
"dexter",
|
|
36
|
+
"whale-tracking",
|
|
37
|
+
"whale-intelligence",
|
|
38
|
+
"smart-money",
|
|
39
|
+
"alpha-signals",
|
|
40
|
+
"divergence",
|
|
41
|
+
"accumulation",
|
|
42
|
+
"distribution",
|
|
43
|
+
"defi",
|
|
44
|
+
"dex"
|
|
34
45
|
],
|
|
35
46
|
"author": "CryptoIZ",
|
|
36
47
|
"license": "MIT",
|
package/setup.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from 'path';
|
|
|
4
4
|
import os from 'os';
|
|
5
5
|
import { execSync } from 'child_process';
|
|
6
6
|
|
|
7
|
-
var VERSION = 'v4.15.
|
|
7
|
+
var VERSION = 'v4.15.14';
|
|
8
8
|
function print(msg) { process.stdout.write(msg + '\n'); }
|
|
9
9
|
|
|
10
10
|
function findConfigPath() {
|
|
@@ -12,7 +12,6 @@ function findConfigPath() {
|
|
|
12
12
|
if (p === 'darwin') {
|
|
13
13
|
candidates.push(path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json'));
|
|
14
14
|
} else if (p === 'win32') {
|
|
15
|
-
// MSIX path FIRST (priority) — most Windows Claude Desktop installs are MSIX
|
|
16
15
|
var localAppData = process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local');
|
|
17
16
|
try {
|
|
18
17
|
var packagesDir = path.join(localAppData, 'Packages');
|
|
@@ -25,7 +24,6 @@ function findConfigPath() {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
} catch(e) {}
|
|
28
|
-
// Standard path as fallback
|
|
29
27
|
var appdata = process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming');
|
|
30
28
|
candidates.push(path.join(appdata, 'Claude', 'claude_desktop_config.json'));
|
|
31
29
|
} else {
|
|
@@ -76,7 +74,6 @@ function injectConfig(cfgPath, entry) {
|
|
|
76
74
|
fs.writeFileSync(cfgPath, JSON.stringify(config, null, 2), 'utf8');
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
// Get private key from command line argument
|
|
80
77
|
var key = (process.argv[2] || '').trim();
|
|
81
78
|
|
|
82
79
|
print('');
|
|
@@ -102,7 +99,6 @@ if (!key) {
|
|
|
102
99
|
process.exit(1);
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
// Validate base58
|
|
106
102
|
var chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
107
103
|
if (key.length < 40 || key.length > 100) { print('ERROR: Invalid key length (' + key.length + ' chars). Expected 44-88.'); process.exit(1); }
|
|
108
104
|
for (var i = 0; i < key.length; i++) {
|