coinopai-mcp 1.2.5 → 1.2.7

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 CHANGED
@@ -7,16 +7,28 @@
7
7
  [![payments](https://img.shields.io/badge/payments-x402%20USDC-0052FF)](https://x402.org)
8
8
  [![network](https://img.shields.io/badge/network-Base-0052FF)](https://base.org)
9
9
 
10
- **Paid decision infrastructure for autonomous agents.**
10
+ **Directional market intelligence with built-in outcome verification.**
11
11
 
12
12
  **Source:** https://github.com/forgemeshlabs/coinopai-mcp
13
13
 
14
- An MCP server that charges AI agents per verified intelligence request — using [x402](https://x402.org) micropayments on Base. Every decision gets a `decision_id`. Every `decision_id` can be audited against real prices.
14
+ An MCP server that lets AI agents buy Kronos market intelligence with [x402](https://x402.org) micropayments on Base. Kronos does not just generate signals: every decision gets a `decision_id`, and every `decision_id` can be audited against later market prices.
15
15
 
16
16
  > This repo is the MCP client layer; paid intelligence is served from hosted CoinOpAI x402 endpoints.
17
17
 
18
18
  > Wrong predictions are shown too. That's the point.
19
19
 
20
+ ## Why Kronos Is Different
21
+
22
+ Most signal APIs stop after making a prediction. Kronos assigns a `decision_id` and lets every decision be audited against future market behavior.
23
+
24
+ The moat is the verification loop:
25
+
26
+ ```
27
+ preflight -> decision -> audit
28
+ ```
29
+
30
+ Trust the process less. Verify the record more.
31
+
20
32
  ---
21
33
 
22
34
  ## Architecture
@@ -63,6 +75,32 @@ check_trade_preflight ──→ get_crypto_decision ──→ [wait 1h] ─
63
75
 
64
76
  Every decision is self-verifying. The `decision_id` links the prediction to the outcome. The audit fetches real market prices and produces a verdict. Nothing is hidden.
65
77
 
78
+ ## Current Status
79
+
80
+ **Live**
81
+ - Signals
82
+ - Risk assessment
83
+ - Decision guidance
84
+ - Outcome verification
85
+
86
+ **Research**
87
+ - Forecast intelligence: validation in progress
88
+ - Forecast vs execution agreement analysis: collecting evidence
89
+
90
+ Forecast outputs are not exposed publicly. Validation comes first.
91
+
92
+ ## Signal Scale
93
+
94
+ | Signal | Meaning |
95
+ |--------|---------|
96
+ | Positive | Bullish directional read |
97
+ | Negative | Bearish directional read |
98
+ | 0.00-0.01 | Weak magnitude |
99
+ | 0.01-0.03 | Moderate magnitude |
100
+ | 0.03+ | Strong magnitude |
101
+
102
+ Signals are probabilistic model outputs, not guarantees or human recommendations.
103
+
66
104
  ---
67
105
 
68
106
  ## Real Output
@@ -120,9 +158,9 @@ It gets some right. It gets some wrong. The loop makes both visible.
120
158
  | `check_trade_preflight` | Gate check: market allowed, cooldown, regime, signal strength | $0.05 | ✓ |
121
159
  | `get_crypto_decision` | CONSIDER\_LONG/SHORT/NO\_ACTION + `decision_id` | $0.15 | ✓ |
122
160
  | `audit_trade_decision` | Verify against real prices: verdict + PnL% | $0.07 | ✓ |
123
- | `get_crypto_signals` | Live directional signals for BTC, ETH, SOL, XRP, ADA | $0.05 | ✓ |
124
- | `get_crypto_signal_history` | Up to 168h of signal history | $0.05 | ✓ |
125
- | `get_crypto_risk` | Market risk state + regime detection | $0.02 | — |
161
+ | `get_crypto_signals` | Directional market intelligence for BTC, ETH, SOL, XRP, ADA | $0.05 | ✓ |
162
+ | `get_crypto_signal_history` | Up to 168h of signal history for analysis | $0.05 | ✓ |
163
+ | `get_crypto_risk` | Market risk state and cooldown context | $0.02 | — |
126
164
  | `search_agent_automations` | Search 819 agent automation prompts | $0.01 | — |
127
165
  | `get_agent_automation` | Full prompt + workflow steps by slug | $0.01 | — |
128
166
  | `list_automation_categories` | All 35 automation categories with counts | $0.005 | — |
package/index.js CHANGED
@@ -25,10 +25,12 @@ const USDC_ABI = parseAbi([
25
25
  ]);
26
26
  // Paths with registered Pyrimid product IDs — other paths fall back to standard x402
27
27
  const PYRIMID_PRODUCTS = {
28
- "/api/kronos/signals": { productId: 1n, priceUsdc: 50000n },
28
+ "/api/kronos/signals": { productId: 1n, priceUsdc: 50000n },
29
29
  "/api/kronos/decision": { productId: 2n, priceUsdc: 150000n },
30
- "/api/kronos/preflight": { productId: 4n, priceUsdc: 50000n },
31
- "/api/kronos/audit": { productId: 5n, priceUsdc: 70000n },
30
+ "/api/kronos/preflight": { productId: 4n, priceUsdc: 50000n },
31
+ "/api/kronos/audit": { productId: 5n, priceUsdc: 70000n },
32
+ "/api/kronos/risk": { productId: 6n, priceUsdc: 20000n },
33
+ "/api/kronos/history": { productId: 7n, priceUsdc: 50000n },
32
34
  };
33
35
  const IMAGEGEN_URL = "https://imagegen.coinopai.com";
34
36
  const PYRIMID_PRODUCTS_IMAGEGEN = {
@@ -66,7 +68,7 @@ const TOOLS = [
66
68
  },
67
69
  {
68
70
  name: "get_crypto_signals",
69
- description: "Latest hourly directional signals for BTC, ETH, SOL, XRP, ADA from the Kronos model. Positive = bullish, negative = bearish. Costs $0.05 USDC.",
71
+ description: "Latest Kronos directional market intelligence for BTC, ETH, SOL, XRP, ADA. Positive = bullish, negative = bearish; magnitude under 0.01 is weak, 0.01-0.03 moderate, 0.03+ strong. Costs $0.05 USDC.",
70
72
  inputSchema: {
71
73
  type: "object",
72
74
  properties: {
@@ -76,12 +78,12 @@ const TOOLS = [
76
78
  },
77
79
  {
78
80
  name: "get_crypto_risk",
79
- description: "Current crypto market risk state (NORMAL/ELEVATED/HIGH), regime detection, equity tracking, signal streaks. Costs $0.02 USDC.",
81
+ description: "Current market risk state and cooldown context for Kronos decisions. Useful as supporting context, not a standalone trading command. Costs $0.02 USDC.",
80
82
  inputSchema: { type: "object", properties: {} }
81
83
  },
82
84
  {
83
85
  name: "get_crypto_signal_history",
84
- description: "Historical 15-minute crypto signals from Kronos up to 168 hours of BTC/ETH/SOL/XRP/ADA data. Costs $0.05 USDC.",
86
+ description: "Recent Kronos signal history for BTC/ETH/SOL/XRP/ADA. Use it to inspect directional context before or after a decision. Costs $0.05 USDC.",
85
87
  inputSchema: {
86
88
  type: "object",
87
89
  properties: {
@@ -92,7 +94,7 @@ const TOOLS = [
92
94
  },
93
95
  {
94
96
  name: "get_crypto_decision",
95
- description: "Get a probabilistic trade decision from Kronos then verify it. Returns CONSIDER_LONG/SHORT/NO_ACTION with confidence, regime, and a decision_id. Call audit_trade_decision with that ID after 1h to see if the decision was right. Full loop: preflight ($0.05) → decision ($0.15) → audit ($0.07) = $0.27 per verified cycle. Costs $0.15 USDC.",
97
+ description: "Get probabilistic decision guidance from Kronos, then verify it. Returns CONSIDER_LONG/SHORT/NO_ACTION with confidence, regime, and a decision_id. Call audit_trade_decision with that ID after the evaluation window to see whether the direction held. Costs $0.15 USDC.",
96
98
  inputSchema: {
97
99
  type: "object",
98
100
  properties: {
@@ -104,7 +106,7 @@ const TOOLS = [
104
106
  },
105
107
  {
106
108
  name: "check_trade_preflight",
107
- description: "Step 1 of the trade loop — checks if conditions allow a trade. Returns allowed:true/false, market state, cooldown, signal strength, warnings. If allowed, proceed to get_crypto_decision. Costs $0.05 USDC.",
109
+ description: "Step 1 of the verified decision loop. Checks market state, cooldown, data freshness, and signal strength before calling get_crypto_decision. Costs $0.05 USDC.",
108
110
  inputSchema: {
109
111
  type: "object",
110
112
  properties: {
@@ -116,7 +118,7 @@ const TOOLS = [
116
118
  },
117
119
  {
118
120
  name: "audit_trade_decision",
119
- description: "The accountability step verify any decision against real prices. Pass the decision_id from get_crypto_decision and a window (1h/4h/24h). Returns: did the direction hold? What was the PnL%? Verdict: GOOD_DECISION, BAD_DIRECTION, or NOISE. Every decision should be audited. Costs $0.07 USDC.",
121
+ description: "The accountability step. Verify a Kronos decision_id against later market prices. Returns whether direction held, PnL%, and a verdict: GOOD_DECISION, BAD_DIRECTION, NOISE, or NO_ACTION_TAKEN. Costs $0.07 USDC.",
120
122
  inputSchema: {
121
123
  type: "object",
122
124
  properties: {
@@ -126,6 +128,17 @@ const TOOLS = [
126
128
  },
127
129
  required: ["decision_id"]
128
130
  }
131
+ },
132
+ {
133
+ name: "get_crypto_forecast",
134
+ description: "Conformally-calibrated price forecast: an honest 80% prediction interval (range_80, ~0.80 empirical coverage) plus point return and upside probability for BTC/ETH/SOL/XRP/ADA. The directional point has no demonstrated backtest edge (~51% accurate) — the calibrated range is the validated product. Costs $0.05 USDC.",
135
+ inputSchema: {
136
+ type: "object",
137
+ properties: {
138
+ symbol: { type: "string", description: "Symbol: BTC, ETH, SOL, XRP, ADA (default: BTC)" },
139
+ affiliate_id: { type: "string", description: "Optional Pyrimid affiliate ID (af_xxxxx). Affiliate earns a commission from within the listed price — no extra cost to you." }
140
+ }
141
+ }
129
142
  }
130
143
  ];
131
144
 
@@ -221,15 +234,13 @@ async function callPaid(ctx, path, affiliateId, opts = {}) {
221
234
 
222
235
  async function main() {
223
236
  let ctx;
224
- try {
225
- ctx = buildHttpClient();
226
- } catch (e) {
227
- process.stderr.write("[coinopai-mcp] " + e.message + "\n");
228
- process.exit(1);
237
+ function getPaymentContext() {
238
+ if (!ctx) ctx = buildHttpClient();
239
+ return ctx;
229
240
  }
230
241
 
231
242
  const server = new Server(
232
- { name: "coinopai-mcp", version: "1.2.5" },
243
+ { name: "coinopai-mcp", version: "1.2.7" },
233
244
  { capabilities: { tools: {} } }
234
245
  );
235
246
 
@@ -240,36 +251,40 @@ async function main() {
240
251
  try {
241
252
  // Affiliate ID: tool arg takes precedence, then env fallback, then none
242
253
  const affiliateId = args.affiliate_id || process.env.PYRIMID_AFFILIATE_ID || null;
254
+ const paymentContext = getPaymentContext();
243
255
  let data;
244
256
  switch (name) {
245
257
  // Low-value utility endpoints — no affiliate routing
246
258
  case "search_agent_automations":
247
- data = await callPaid(ctx, `/api/search?q=${encodeURIComponent(args.query || "")}&limit=${args.limit || 20}`, null);
259
+ data = await callPaid(paymentContext, `/api/search?q=${encodeURIComponent(args.query || "")}&limit=${args.limit || 20}`, null);
248
260
  break;
249
261
  case "get_agent_automation":
250
- data = await callPaid(ctx, `/api/automation/${encodeURIComponent(args.slug)}`, null);
262
+ data = await callPaid(paymentContext, `/api/automation/${encodeURIComponent(args.slug)}`, null);
251
263
  break;
252
264
  case "list_automation_categories":
253
- data = await callPaid(ctx, "/api/categories", null);
265
+ data = await callPaid(paymentContext, "/api/categories", null);
254
266
  break;
255
267
  case "get_crypto_risk":
256
- data = await callPaid(ctx, "/api/kronos/risk", null);
268
+ data = await callPaid(paymentContext, "/api/kronos/risk", affiliateId);
257
269
  break;
258
270
  // High-value endpoints — affiliate routing enabled
259
271
  case "get_crypto_signals":
260
- data = await callPaid(ctx, "/api/kronos/signals", affiliateId);
272
+ data = await callPaid(paymentContext, "/api/kronos/signals", affiliateId);
261
273
  break;
262
274
  case "get_crypto_signal_history":
263
- data = await callPaid(ctx, `/api/kronos/history?hours=${args.hours || 24}`, affiliateId);
275
+ data = await callPaid(paymentContext, `/api/kronos/history?hours=${args.hours || 24}`, affiliateId);
264
276
  break;
265
277
  case "get_crypto_decision":
266
- data = await callPaid(ctx, `/api/kronos/decision?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
278
+ data = await callPaid(paymentContext, `/api/kronos/decision?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
267
279
  break;
268
280
  case "check_trade_preflight":
269
- data = await callPaid(ctx, `/api/kronos/preflight?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
281
+ data = await callPaid(paymentContext, `/api/kronos/preflight?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
270
282
  break;
271
283
  case "audit_trade_decision":
272
- data = await callPaid(ctx, `/api/kronos/audit?decision_id=${encodeURIComponent(args.decision_id)}&window=${encodeURIComponent(args.window || "4h")}`, affiliateId);
284
+ data = await callPaid(paymentContext, `/api/kronos/audit?decision_id=${encodeURIComponent(args.decision_id)}&window=${encodeURIComponent(args.window || "4h")}`, affiliateId);
285
+ break;
286
+ case "get_crypto_forecast":
287
+ data = await callPaid(paymentContext, `/api/kronos/forecast?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
273
288
  break;
274
289
  default:
275
290
  throw new Error("Unknown tool: " + name);
@@ -282,6 +297,9 @@ async function main() {
282
297
 
283
298
  const transport = new StdioServerTransport();
284
299
  await server.connect(transport);
300
+ process.stdin.resume();
301
+ process.stdin.on("end", () => process.exit(0));
302
+ setInterval(() => {}, 1 << 30);
285
303
  }
286
304
 
287
305
  main();
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "coinopai-mcp",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "mcpName": "io.github.forgemeshlabs/coinopai-mcp",
5
- "description": "MCP server for CoinOpAI agent automation prompts and crypto signals via x402 micropayments on Base",
5
+ "description": "Directional crypto market intelligence MCP with x402 payments, decision guidance, and built-in outcome verification",
6
6
  "main": "index.js",
7
7
  "bin": {
8
8
  "coinopai-mcp": "index.js"
package/server.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.forgemeshlabs/coinopai-mcp",
4
- "description": "Kronos crypto signals + trade decisions + 819 automation prompts. x402 micropayments, USDC/Base.",
4
+ "description": "Directional crypto market intelligence with decision guidance, outcome verification, and x402 micropayments on Base.",
5
5
  "repository": {
6
6
  "url": "https://github.com/forgemeshlabs/coinopai-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.2.5",
9
+ "version": "1.2.6",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "coinopai-mcp",
14
- "version": "1.2.5",
14
+ "version": "1.2.6",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },