cryptoiz-mcp 4.3.0 → 4.5.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +26 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "CryptoIZ MCP Server — Solana DEX signals with x402 micropayments. Pay $0.01 USDC per call.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -11,9 +11,22 @@ const SVM_PRIVATE_KEY = process.env.SVM_PRIVATE_KEY || '';
11
11
  const CRYPTOIZ_WALLET = new PublicKey('DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX');
12
12
  const USDC_MINT = new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');
13
13
  const SOL_RPC = 'https://api.mainnet-beta.solana.com';
14
- const AMOUNT = 10000;
15
-
16
- async function payAndFetch(url) {
14
+ // Tiered pricing per tool (USDC 6 decimals)
15
+ const PRICES = {
16
+ get_alpha_scanner: 50000, // $0.05
17
+ get_divergence: 20000, // $0.02
18
+ get_accumulation: 20000, // $0.02
19
+ get_btc_regime: 10000, // $0.01
20
+ };
21
+ const PRICE_LABELS = {
22
+ get_alpha_scanner: '$0.05',
23
+ get_divergence: '$0.02',
24
+ get_accumulation: '$0.02',
25
+ get_btc_regime: '$0.01',
26
+ };
27
+
28
+ async function payAndFetch(url, tool = 'get_alpha_scanner') {
29
+ const AMOUNT = PRICES[tool] || 10000;
17
30
  if (!SVM_PRIVATE_KEY) return { error: 'SVM_PRIVATE_KEY not set.' };
18
31
  const first = await fetch(url);
19
32
  if (first.status !== 402) return first.json();
@@ -367,10 +380,10 @@ function formatStatus() {
367
380
  // TOOL DEFINITIONS
368
381
  // ══════════════════════════════════════════════════════════════════
369
382
  const TOOLS = [
370
- { name: 'get_alpha_scanner', description: 'CryptoIZ Alpha Scanner — Solana smart money signals in markdown table format. Shows contract address, Jupiter trade link, alpha score, class, phase, whale/dolphin signals, sub-scores, risk flags, MC, price. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_score: { type: 'number' }, entry_class: { type: 'string', enum: ['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'] } }, required: [] } },
371
- { name: 'get_divergence', description: 'CryptoIZ Divergence Scanner — 3 types in table format: HIDDEN_ACCUMULATION, BREAKOUT_ACCUMULATION, CLASSIC_DIVERGENCE. Shows CA, Jupiter link, score, confidence, whale holders now vs prev. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'] }, limit: { type: 'number' } }, required: [] } },
372
- { name: 'get_accumulation', description: 'CryptoIZ Accumulation Dashboard — 4-dimension scoring table. Shows CA, Jupiter link, composite + 4 sub-scores (structure/accdist/holder/market), MC, price. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_composite: { type: 'number' } }, required: [] } },
373
- { name: 'get_btc_regime', description: 'CryptoIZ BTC Regime Monitor — BTC macro in table format. Shows price, score, Fear&Greed, OI regime, funding, futures signal, RSI/EMA/MACD 1H, altcoin recommendation. $0.01 USDC/call.', inputSchema: { type: 'object', properties: {}, required: [] } },
383
+ { name: 'get_alpha_scanner', description: 'CryptoIZ Alpha Scanner — Top 20 Solana smart money signals. Returns contract address, DexScreener chart link, alpha score, signal class, phase, whale/dolphin delta, sub-scores, risk flags, MC & price. Cost: $0.05 USDC/call.', inputSchema: { type: 'object', properties: { min_score: { type: 'number' }, entry_class: { type: 'string', enum: ['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'] } }, required: [] } },
384
+ { name: 'get_divergence', description: 'CryptoIZ Divergence Scanner — 3 signal types: HIDDEN_ACCUMULATION, BREAKOUT_ACCUMULATION, CLASSIC_DIVERGENCE. Returns CA, DexScreener chart link, score, confidence, whale holders now vs prev, dolphin delta. Cost: $0.02 USDC/call.', inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'] }, limit: { type: 'number' } }, required: [] } },
385
+ { name: 'get_accumulation', description: 'CryptoIZ Accumulation Dashboard — 4-dimension scoring (Structure/AccDist/Holder/Market). Returns CA, DexScreener chart link, composite score + 4 sub-scores, MC, price, strength label. Cost: $0.02 USDC/call.', inputSchema: { type: 'object', properties: { min_composite: { type: 'number' } }, required: [] } },
386
+ { name: 'get_btc_regime', description: 'CryptoIZ BTC Regime Monitor — Bitcoin macro context for altcoin trading. Returns regime (Bull/Bear/Neutral), price, score/10, Fear&Greed index, OI regime, funding rate, RSI/EMA/MACD (1H), altcoin recommendation. Cost: $0.01 USDC/call.', inputSchema: { type: 'object', properties: {}, required: [] } },
374
387
  { name: 'get_token_ca', description: 'FREE: Get exact contract address for a specific token. Includes Jupiter and Raydium trade links. Use this to avoid buying wrong token (many fake tokens share same names). No USDC payment required.', inputSchema: { type: 'object', properties: { token_name: { type: 'string', description: 'Token name to look up, e.g. "Aliens" or "PENGUIN"' } }, required: ['token_name'] } },
375
388
  { name: 'get_status', description: 'CryptoIZ MCP server status, all available tools, and subscription plans. Platform: https://cryptoiz.org', inputSchema: { type: 'object', properties: {}, required: [] } },
376
389
  ];
@@ -378,7 +391,7 @@ const TOOLS = [
378
391
  // ══════════════════════════════════════════════════════════════════
379
392
  // SERVER
380
393
  // ══════════════════════════════════════════════════════════════════
381
- const server = new Server({ name: 'cryptoiz-mcp', version: '4.3.0' }, { capabilities: { tools: {} } });
394
+ const server = new Server({ name: 'cryptoiz-mcp', version: '4.5.0' }, { capabilities: { tools: {} } });
382
395
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
383
396
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
384
397
  const { name, arguments: args } = request.params;
@@ -386,7 +399,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
386
399
  if (name === 'get_status') return { content: [{ type: 'text', text: formatStatus() }] };
387
400
 
388
401
  if (name === 'get_alpha_scanner') {
389
- const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
402
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`, 'get_alpha_scanner');
390
403
  if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
391
404
  if (args?.min_score && data.signals) { data.signals = data.signals.filter(s => parseFloat(s.alpha_score) >= args.min_score); data.total_signals = data.signals.length; }
392
405
  if (args?.entry_class && data.signals) { data.signals = data.signals.filter(s => s.signal_class === args.entry_class); data.total_signals = data.signals.length; }
@@ -397,20 +410,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
397
410
  const p = new URLSearchParams({ tool: 'get_divergence' });
398
411
  if (args?.timeframe) p.set('tf', args.timeframe);
399
412
  if (args?.limit) p.set('limit', String(args.limit));
400
- const data = await payAndFetch(`${GATEWAY_URL}?${p}`);
413
+ const data = await payAndFetch(`${GATEWAY_URL}?${p}`, 'get_divergence');
401
414
  if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
402
415
  return { content: [{ type: 'text', text: formatDivergence(data) }] };
403
416
  }
404
417
 
405
418
  if (name === 'get_accumulation') {
406
- const data = await payAndFetch(`${GATEWAY_URL}?tool=get_accumulation`);
419
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_accumulation`, 'get_accumulation');
407
420
  if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
408
421
  if (args?.min_composite && data.tokens) { data.tokens = data.tokens.filter(t => parseFloat(t.score_composite) >= args.min_composite); data.total_tokens = data.tokens.length; }
409
422
  return { content: [{ type: 'text', text: formatAccumulation(data) }] };
410
423
  }
411
424
 
412
425
  if (name === 'get_btc_regime') {
413
- const data = await payAndFetch(`${GATEWAY_URL}?tool=get_btc_regime`);
426
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_btc_regime`, 'get_btc_regime');
414
427
  if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
415
428
  return { content: [{ type: 'text', text: formatBTC(data) }] };
416
429
  }
@@ -418,7 +431,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
418
431
  if (name === 'get_token_ca') {
419
432
  const tokenName = args?.token_name || '';
420
433
  if (!tokenName) return { content: [{ type: 'text', text: '❌ Please provide a token_name. Example: "Aliens"' }], isError: true };
421
- const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
434
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`, 'get_alpha_scanner');
422
435
  return { content: [{ type: 'text', text: await getTokenCA(tokenName, data) }] };
423
436
  }
424
437