coinopai-mcp 1.2.7 → 1.2.9
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 +54 -43
- package/index.js +41 -9
- package/package.json +5 -2
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
[](https://x402.org)
|
|
8
8
|
[](https://base.org)
|
|
9
9
|
|
|
10
|
-
**
|
|
10
|
+
**Auditable market context with calibrated forecast ranges and outcome verification.**
|
|
11
11
|
|
|
12
12
|
**Source:** https://github.com/forgemeshlabs/coinopai-mcp
|
|
13
13
|
|
|
14
|
-
An MCP server that lets AI agents buy Kronos market
|
|
14
|
+
An MCP server that lets AI agents buy Kronos market context with [x402](https://x402.org) micropayments on Base. Kronos is not a buy/sell oracle: it gives agents calibrated ranges, risk context, decision journals, and audit records they can verify.
|
|
15
15
|
|
|
16
16
|
> This repo is the MCP client layer; paid intelligence is served from hosted CoinOpAI x402 endpoints.
|
|
17
17
|
|
|
18
|
-
>
|
|
18
|
+
> Weak calls and wrong calls are shown too. That's the point.
|
|
19
19
|
|
|
20
20
|
## Why Kronos Is Different
|
|
21
21
|
|
|
22
|
-
Most
|
|
22
|
+
Most market APIs stop after returning a direction. Kronos leads with calibrated ranges and risk context, then assigns a `decision_id` so every decision can be audited against future market behavior.
|
|
23
23
|
|
|
24
|
-
The moat is the
|
|
24
|
+
The moat is the audit loop:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
preflight -> decision -> audit
|
|
@@ -61,45 +61,46 @@ The agent calls a tool → the MCP server receives an `HTTP 402` → automatical
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
-
## The
|
|
64
|
+
## The Auditable Loop ($0.27/cycle)
|
|
65
65
|
|
|
66
66
|
```
|
|
67
67
|
check_trade_preflight ──→ get_crypto_decision ──→ [wait 1h] ──→ audit_trade_decision
|
|
68
68
|
$0.05 $0.15 $0.07
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
Cooldown
|
|
72
|
-
Regime
|
|
73
|
-
|
|
70
|
+
Market state? Directional context Outcome record
|
|
71
|
+
Cooldown context? Confidence context Direction held?
|
|
72
|
+
Regime context? + decision_id Verdict
|
|
73
|
+
Data freshness? + audit hint + pnl_pct
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Every decision is self-verifying. The `decision_id` links the
|
|
76
|
+
Every decision is self-verifying. The `decision_id` links the setup to the outcome. The audit fetches real market prices and produces a verdict. Nothing is hidden.
|
|
77
77
|
|
|
78
78
|
## Current Status
|
|
79
79
|
|
|
80
80
|
**Live**
|
|
81
|
-
-
|
|
81
|
+
- Model context
|
|
82
82
|
- Risk assessment
|
|
83
|
-
- Decision
|
|
83
|
+
- Decision journaling
|
|
84
84
|
- Outcome verification
|
|
85
|
+
- Forecast: conformally-calibrated 80% price range (~0.80 empirical coverage)
|
|
85
86
|
|
|
86
87
|
**Research**
|
|
87
|
-
-
|
|
88
|
+
- Directional edge: none demonstrated in backtest (~51% accurate) — the calibrated range is the validated product, not the direction
|
|
88
89
|
- Forecast vs execution agreement analysis: collecting evidence
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
The calibrated forecast range is live and validated (conformal, ~0.80 coverage). Directional values are supporting context, not standalone trade instructions. Use them with the calibrated range, risk state, and audit record.
|
|
91
92
|
|
|
92
|
-
##
|
|
93
|
+
## Directional Context
|
|
93
94
|
|
|
94
|
-
|
|
|
95
|
+
| Value | Meaning |
|
|
95
96
|
|--------|---------|
|
|
96
|
-
| Positive | Bullish
|
|
97
|
-
| Negative | Bearish
|
|
97
|
+
| Positive | Bullish model context |
|
|
98
|
+
| Negative | Bearish model context |
|
|
98
99
|
| 0.00-0.01 | Weak magnitude |
|
|
99
100
|
| 0.01-0.03 | Moderate magnitude |
|
|
100
101
|
| 0.03+ | Strong magnitude |
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
Directional values are supporting context, not guarantees, human recommendations, or standalone trade instructions. Use them with the calibrated range, risk state, and audit record.
|
|
103
104
|
|
|
104
105
|
---
|
|
105
106
|
|
|
@@ -111,7 +112,7 @@ Signals are probabilistic model outputs, not guarantees or human recommendations
|
|
|
111
112
|
"allowed": true,
|
|
112
113
|
"symbol": "BTC/USD",
|
|
113
114
|
"market_state": "NORMAL",
|
|
114
|
-
"signal_strength":
|
|
115
|
+
"signal_strength": "weak_or_mixed",
|
|
115
116
|
"regime": "TREND",
|
|
116
117
|
"cooldown_remaining_seconds": 0
|
|
117
118
|
}
|
|
@@ -121,10 +122,15 @@ Signals are probabilistic model outputs, not guarantees or human recommendations
|
|
|
121
122
|
```json
|
|
122
123
|
{
|
|
123
124
|
"symbol": "BTC/USD",
|
|
124
|
-
"
|
|
125
|
-
"confidence": 0.
|
|
125
|
+
"directional_bias": "upward",
|
|
126
|
+
"confidence": 0.514,
|
|
127
|
+
"compliance_mode": "market_intelligence_only",
|
|
126
128
|
"regime": "TREND",
|
|
127
129
|
"decision_id": "a3f8c1d2-9472-4dfe-b459-5df17b282614",
|
|
130
|
+
"directional_edge": "none_demonstrated",
|
|
131
|
+
"why_not_high": [
|
|
132
|
+
"Directional confidence is capped by observed historical accuracy, not boosted by signal magnitude."
|
|
133
|
+
],
|
|
128
134
|
"next_step": "Call audit_trade_decision with this decision_id after 1h using window=1h"
|
|
129
135
|
}
|
|
130
136
|
```
|
|
@@ -139,15 +145,7 @@ Signals are probabilistic model outputs, not guarantees or human recommendations
|
|
|
139
145
|
}
|
|
140
146
|
```
|
|
141
147
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| Symbol | Decision | Confidence | 1h Outcome | Verdict |
|
|
145
|
-
|--------|----------|-----------|------------|---------|
|
|
146
|
-
| XRP | SHORT | 1.0 | -0.54% | ✅ GOOD_DECISION |
|
|
147
|
-
| ETH | LONG | 0.68 | -0.32% | ❌ BAD_DIRECTION |
|
|
148
|
-
| BTC | LONG | 0.40 | +0.01% | — NOISE |
|
|
149
|
-
|
|
150
|
-
It gets some right. It gets some wrong. The loop makes both visible.
|
|
148
|
+
Audit verdicts include `GOOD_DECISION`, `BAD_DIRECTION`, `NOISE`, `NO_ACTION_TAKEN`, and `PENDING`. Kronos gets some right, gets some wrong, and exposes both through the same record.
|
|
151
149
|
|
|
152
150
|
---
|
|
153
151
|
|
|
@@ -155,11 +153,13 @@ It gets some right. It gets some wrong. The loop makes both visible.
|
|
|
155
153
|
|
|
156
154
|
| Tool | What it does | Cost | Affiliate |
|
|
157
155
|
|------|-------------|------|-----------|
|
|
158
|
-
| `check_trade_preflight` | Gate check: market allowed, cooldown, regime,
|
|
159
|
-
| `get_crypto_decision` |
|
|
156
|
+
| `check_trade_preflight` | Gate check: market allowed, cooldown, regime, model context | $0.05 | ✓ |
|
|
157
|
+
| `get_crypto_decision` | Probabilistic decision journal + `decision_id` | $0.15 | ✓ |
|
|
160
158
|
| `audit_trade_decision` | Verify against real prices: verdict + PnL% | $0.07 | ✓ |
|
|
161
|
-
| `get_crypto_signals` |
|
|
162
|
-
| `get_crypto_signal_history` | Up to 168h of
|
|
159
|
+
| `get_crypto_signals` | Model context for BTC, ETH, SOL, XRP, ADA | $0.05 | ✓ |
|
|
160
|
+
| `get_crypto_signal_history` | Up to 168h of context history for analysis | $0.05 | ✓ |
|
|
161
|
+
| `get_crypto_forecast` | Conformally-calibrated 80% price range (~0.80 empirical coverage) for BTC, ETH, SOL, XRP, ADA | $0.05 | ✓ |
|
|
162
|
+
| `review_signal_anomaly` | Score signal features for unusual conditions; returns review labels, drivers, and component scores | $0.07 | — |
|
|
163
163
|
| `get_crypto_risk` | Market risk state and cooldown context | $0.02 | — |
|
|
164
164
|
| `search_agent_automations` | Search 819 agent automation prompts | $0.01 | — |
|
|
165
165
|
| `get_agent_automation` | Full prompt + workflow steps by slug | $0.01 | — |
|
|
@@ -189,7 +189,7 @@ Add to `~/.claude/settings.json`:
|
|
|
189
189
|
}
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
Restart Claude Code. The
|
|
192
|
+
Restart Claude Code. The tools appear automatically.
|
|
193
193
|
|
|
194
194
|
### Claude Desktop
|
|
195
195
|
|
|
@@ -237,16 +237,27 @@ Prepared MCP Registry identity: `io.github.forgemeshlabs/coinopai-mcp`. Refresh
|
|
|
237
237
|
const pre = await mcp.call("check_trade_preflight", { symbol: "BTC" })
|
|
238
238
|
if (!pre.allowed) return // cooldown, bad regime, or stale data
|
|
239
239
|
|
|
240
|
-
// Step 2 — get decision ($0.15)
|
|
240
|
+
// Step 2 — get decision journal ($0.15)
|
|
241
241
|
const dec = await mcp.call("get_crypto_decision", { symbol: "BTC" })
|
|
242
|
-
if (dec.suggested_action === "NO_ACTION") return
|
|
243
242
|
|
|
244
243
|
// Store the decision_id — you'll need it to close the loop
|
|
245
|
-
const { decision_id,
|
|
244
|
+
const { decision_id, directional_bias, confidence } = dec
|
|
246
245
|
|
|
247
|
-
//
|
|
246
|
+
// Optional — review a feature set for anomaly context ($0.07)
|
|
247
|
+
const anomaly = await mcp.call("review_signal_anomaly", {
|
|
248
|
+
symbol: "BTC",
|
|
249
|
+
window: "24h",
|
|
250
|
+
features: {
|
|
251
|
+
price_change: 0.018,
|
|
252
|
+
volume_change: 0.42,
|
|
253
|
+
volatility: 0.031,
|
|
254
|
+
signal_confidence: 72,
|
|
255
|
+
risk_score: 31
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
// review_label: "normal_review" | "review" | "elevated_review" | "critical_review"
|
|
248
259
|
|
|
249
|
-
// Step
|
|
260
|
+
// Step 3 — audit 1 hour later ($0.07)
|
|
250
261
|
const audit = await mcp.call("audit_trade_decision", {
|
|
251
262
|
decision_id,
|
|
252
263
|
window: "1h"
|
|
@@ -340,7 +351,7 @@ Normal x402 flow — CoinOpAI receives 100% of the listed price. Nothing changes
|
|
|
340
351
|
|
|
341
352
|
## Disclaimer
|
|
342
353
|
|
|
343
|
-
Decision outputs are probabilistic
|
|
354
|
+
Decision outputs are probabilistic context and journal entries for experimental automated workflows only. Not financial advice. Directional bias alone has not been validated as a standalone trading strategy. Results will vary. Never risk capital you can't afford to lose.
|
|
344
355
|
|
|
345
356
|
---
|
|
346
357
|
|
package/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const TOOLS = [
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
name: "get_crypto_signals",
|
|
71
|
-
description: "Latest Kronos
|
|
71
|
+
description: "Latest Kronos model context for BTC, ETH, SOL, XRP, ADA. Directional values are supporting context, not standalone trade instructions; use them with the calibrated range, risk state, and audit record. Costs $0.05 USDC.",
|
|
72
72
|
inputSchema: {
|
|
73
73
|
type: "object",
|
|
74
74
|
properties: {
|
|
@@ -83,7 +83,7 @@ const TOOLS = [
|
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
name: "get_crypto_signal_history",
|
|
86
|
-
description: "Recent Kronos
|
|
86
|
+
description: "Recent Kronos context history for BTC/ETH/SOL/XRP/ADA. Use it to inspect model context and freshness before or after a decision. Costs $0.05 USDC.",
|
|
87
87
|
inputSchema: {
|
|
88
88
|
type: "object",
|
|
89
89
|
properties: {
|
|
@@ -94,7 +94,7 @@ const TOOLS = [
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
name: "get_crypto_decision",
|
|
97
|
-
description: "
|
|
97
|
+
description: "Create a market-intelligence journal entry from Kronos context. Returns directional_bias, confidence context, compliance metadata, regime, anomaly/calibration context, and a decision_id. Call audit_trade_decision with that ID after the evaluation window to see what happened. Costs $0.15 USDC.",
|
|
98
98
|
inputSchema: {
|
|
99
99
|
type: "object",
|
|
100
100
|
properties: {
|
|
@@ -106,7 +106,7 @@ const TOOLS = [
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
name: "check_trade_preflight",
|
|
109
|
-
description: "Step 1 of the
|
|
109
|
+
description: "Step 1 of the auditable decision loop. Checks market state, cooldown, data freshness, and model context before calling get_crypto_decision. Costs $0.05 USDC.",
|
|
110
110
|
inputSchema: {
|
|
111
111
|
type: "object",
|
|
112
112
|
properties: {
|
|
@@ -131,7 +131,7 @@ const TOOLS = [
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
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.
|
|
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. Directional bias is supporting context; the calibrated range is the validated product. Costs $0.05 USDC.",
|
|
135
135
|
inputSchema: {
|
|
136
136
|
type: "object",
|
|
137
137
|
properties: {
|
|
@@ -139,6 +139,22 @@ const TOOLS = [
|
|
|
139
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
140
|
}
|
|
141
141
|
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "review_signal_anomaly",
|
|
145
|
+
description: "Score a market signal feature set for unusual conditions before downstream analysis. Returns anomaly_score, anomaly_level, review_label, drivers, component scores, and market-intelligence disclaimers. Not financial advice and not a market activity instruction. Costs $0.07 USDC.",
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
symbol: { type: "string", description: "Symbol to review, e.g. BTC, ETH, SOL, XRP, ADA, AAPL, SPY" },
|
|
150
|
+
window: { type: "string", description: "Observation window label, e.g. 24h (default: 24h)" },
|
|
151
|
+
features: {
|
|
152
|
+
type: "object",
|
|
153
|
+
description: "Numeric feature values to score, such as price_change, volume_change, volatility, signal_confidence, risk_score, social_velocity, or onchain_velocity."
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
required: ["symbol", "features"]
|
|
157
|
+
}
|
|
142
158
|
}
|
|
143
159
|
];
|
|
144
160
|
|
|
@@ -192,10 +208,14 @@ async function callPaid(ctx, path, affiliateId, opts = {}) {
|
|
|
192
208
|
const baseUrl = opts.baseUrl || BASE_URL;
|
|
193
209
|
const pyrimidProducts = opts.pyrimidProducts || PYRIMID_PRODUCTS;
|
|
194
210
|
const pathname = new URL(path, baseUrl).pathname;
|
|
211
|
+
const method = opts.method || "GET";
|
|
212
|
+
const body = opts.body;
|
|
213
|
+
const bodyHeaders = body ? { "Content-Type": "application/json" } : {};
|
|
214
|
+
const bodyInit = body ? { body: JSON.stringify(body) } : {};
|
|
195
215
|
|
|
196
216
|
// Use Pyrimid affiliate flow when affiliate_id present and product is registered.
|
|
197
217
|
// Fall back to direct x402 if the affiliate route is unavailable or not yet cataloged.
|
|
198
|
-
if (affiliateId && pyrimidProducts[pathname]) {
|
|
218
|
+
if (method === "GET" && affiliateId && pyrimidProducts[pathname]) {
|
|
199
219
|
try {
|
|
200
220
|
return await callPyrimid(account, path, affiliateId, baseUrl, pyrimidProducts);
|
|
201
221
|
} catch (_) {
|
|
@@ -206,7 +226,7 @@ async function callPaid(ctx, path, affiliateId, opts = {}) {
|
|
|
206
226
|
// Standard x402 EIP-3009 flow
|
|
207
227
|
const url = baseUrl + path;
|
|
208
228
|
const extraHeaders = affiliateId ? { "X-Affiliate-ID": affiliateId } : {};
|
|
209
|
-
const res = await fetch(url, { headers: extraHeaders });
|
|
229
|
+
const res = await fetch(url, { method, headers: { ...bodyHeaders, ...extraHeaders }, ...bodyInit });
|
|
210
230
|
|
|
211
231
|
if (res.status === 402) {
|
|
212
232
|
let body;
|
|
@@ -216,7 +236,9 @@ async function callPaid(ctx, path, affiliateId, opts = {}) {
|
|
|
216
236
|
);
|
|
217
237
|
const paymentPayload = await httpClient.createPaymentPayload(paymentRequired);
|
|
218
238
|
const paidRes = await fetch(url, {
|
|
219
|
-
|
|
239
|
+
method,
|
|
240
|
+
headers: { ...bodyHeaders, ...httpClient.encodePaymentSignatureHeader(paymentPayload), ...extraHeaders },
|
|
241
|
+
...bodyInit,
|
|
220
242
|
});
|
|
221
243
|
if (!paidRes.ok) {
|
|
222
244
|
const errBody = await paidRes.text().catch(() => paidRes.statusText);
|
|
@@ -240,7 +262,7 @@ async function main() {
|
|
|
240
262
|
}
|
|
241
263
|
|
|
242
264
|
const server = new Server(
|
|
243
|
-
{ name: "coinopai-mcp", version: "1.2.
|
|
265
|
+
{ name: "coinopai-mcp", version: "1.2.9" },
|
|
244
266
|
{ capabilities: { tools: {} } }
|
|
245
267
|
);
|
|
246
268
|
|
|
@@ -286,6 +308,16 @@ async function main() {
|
|
|
286
308
|
case "get_crypto_forecast":
|
|
287
309
|
data = await callPaid(paymentContext, `/api/kronos/forecast?symbol=${encodeURIComponent(args.symbol || "BTC")}`, affiliateId);
|
|
288
310
|
break;
|
|
311
|
+
case "review_signal_anomaly":
|
|
312
|
+
data = await callPaid(paymentContext, "/api/anomaly", null, {
|
|
313
|
+
method: "POST",
|
|
314
|
+
body: {
|
|
315
|
+
symbol: args.symbol || "BTC",
|
|
316
|
+
window: args.window || "24h",
|
|
317
|
+
features: args.features || {},
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
break;
|
|
289
321
|
default:
|
|
290
322
|
throw new Error("Unknown tool: " + name);
|
|
291
323
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coinopai-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"mcpName": "io.github.forgemeshlabs/coinopai-mcp",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Auditable market intelligence MCP with x402 payments, calibrated forecast ranges, anomaly review, risk context, and outcome audits",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"coinopai-mcp": "index.js"
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"forgemesh",
|
|
29
29
|
"crypto",
|
|
30
30
|
"signals",
|
|
31
|
+
"forecast",
|
|
32
|
+
"risk",
|
|
33
|
+
"audit",
|
|
31
34
|
"coinbase",
|
|
32
35
|
"base",
|
|
33
36
|
"usdc",
|
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": "
|
|
4
|
+
"description": "Auditable market intelligence with calibrated forecast ranges, anomaly review, 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.
|
|
9
|
+
"version": "1.2.9",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "coinopai-mcp",
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.9",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|