coinopai-mcp

coinopai-mcp

Local stdio MCP server for x402-powered paid crypto intelligence, decision verification, and agent automation search over USDC micropayments on Base.

Category
访问服务器

README

coinopai-mcp

npm version npm downloads License: MIT Node.js payments network

Paid decision infrastructure for autonomous agents.

An MCP server that charges AI agents per verified intelligence request — using x402 micropayments on Base. Every decision gets a decision_id. Every decision_id can be audited against real prices.

This repo is the MCP client layer; paid intelligence is served from hosted CoinOpAI x402 endpoints.

Wrong predictions are shown too. That's the point.


Architecture

┌──────────────────────────────────┐
│   Claude Code / AI Agent         │
└──────────────┬───────────────────┘
               │  MCP (stdio)
               ▼
┌──────────────────────────────────┐
│        coinopai-mcp              │
│    npx coinopai-mcp              │
└──────────────┬───────────────────┘
               │  HTTP + 402 payment header
               ▼
┌──────────────────────────────────┐
│      x402.coinopai.com           │
│   Kronos intelligence API        │
└──────────────┬───────────────────┘
               │
               ▼
┌──────────────────────────────────┐
│   Coinbase x402 Facilitator      │
│   USDC settled on Base mainnet   │
└──────────────────────────────────┘

The agent calls a tool → the MCP server receives an HTTP 402 → automatically signs a USDC micropayment → retries with the payment header → data returned. Configure once, pay automatically from the configured low-balance wallet.


The Verified Loop ($0.27/cycle)

check_trade_preflight  ──→  get_crypto_decision  ──→  [wait 1h]  ──→  audit_trade_decision
       $0.05                      $0.15                                      $0.07

   Is now allowed?           CONSIDER_LONG/SHORT              GOOD_DECISION
   Cooldown check?           NO_ACTION                        BAD_DIRECTION
   Regime ok?                + decision_id                    NOISE
   Signal strength?          + next_step hint                 + pnl_pct

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.


Real Output

Step 1 — Preflight (BTC, $0.05)

{
  "allowed": true,
  "symbol": "BTC/USD",
  "market_state": "NORMAL",
  "signal_strength": 0.72,
  "regime": "TREND",
  "cooldown_remaining_seconds": 0
}

Step 2 — Decision (BTC, $0.15)

{
  "symbol": "BTC/USD",
  "suggested_action": "CONSIDER_LONG",
  "confidence": 0.72,
  "regime": "TREND",
  "decision_id": "a3f8c1d2-9472-4dfe-b459-5df17b282614",
  "next_step": "Call audit_trade_decision with this decision_id after 1h using window=1h"
}

Step 3 — Audit (1h later, $0.07)

{
  "decision_id": "a3f8c1d2-9472-4dfe-b459-5df17b282614",
  "direction_held": true,
  "pnl_pct": 0.82,
  "verdict": "GOOD_DECISION"
}

Live results from real runs:

Symbol Decision Confidence 1h Outcome Verdict
XRP SHORT 1.0 -0.54% ✅ GOOD_DECISION
ETH LONG 0.68 -0.32% ❌ BAD_DIRECTION
BTC LONG 0.40 +0.01% — NOISE

It gets some right. It gets some wrong. The loop makes both visible.


Tools

Tool What it does Cost
check_trade_preflight Gate check: market allowed, cooldown, regime, signal strength $0.05
get_crypto_decision CONSIDER_LONG/SHORT/NO_ACTION + decision_id $0.15
audit_trade_decision Verify against real prices: verdict + PnL% $0.07
get_crypto_signals Live directional signals for BTC, ETH, SOL, XRP, ADA $0.05
get_crypto_risk Market risk state + regime detection $0.02
get_crypto_signal_history Up to 168h of signal history $0.05
search_agent_automations Search 819 agent automation prompts $0.01
get_agent_automation Full prompt + workflow steps by slug $0.01
list_automation_categories All 35 automation categories with counts $0.005

No API keys. No subscriptions. Pay per call in USDC.


Install

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "coinopai": {
      "command": "npx",
      "args": ["-y", "coinopai-mcp"],
      "env": {
        "WALLET_PRIVATE_KEY": "0x<your-base-wallet-private-key>"
      }
    }
  }
}

Restart Claude Code. The 9 tools appear automatically.

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "coinopai": {
      "command": "npx",
      "args": ["-y", "coinopai-mcp"],
      "env": {
        "WALLET_PRIVATE_KEY": "0x<your-base-wallet-private-key>"
      }
    }
  }
}

Smithery

Install via Smithery. Configure a dedicated low-balance payment wallet. Do not use your primary wallet.


Get a Wallet

  1. Install Coinbase Wallet or any EVM wallet
  2. Switch to Base network
  3. Buy or bridge USDC ($1 = ~3 full verified cycles)
  4. Use a dedicated low-balance Base wallet for agent payments and provide its private key locally via environment variable.

Your wallet key stays local. It never leaves your machine. Each payment is a signed micropayment — not a blanket approval.


Agent Code Example

// Step 1 — gate check ($0.05)
const pre = await mcp.call("check_trade_preflight", { symbol: "BTC" })
if (!pre.allowed) return  // cooldown, bad regime, or stale data

// Step 2 — get decision ($0.15)
const dec = await mcp.call("get_crypto_decision", { symbol: "BTC" })
if (dec.suggested_action === "NO_ACTION") return

// Store the decision_id — you'll need it to close the loop
const { decision_id, suggested_action, confidence } = dec

// Step 3 — act on the decision here...

// Step 4 — audit 1 hour later ($0.07)
const audit = await mcp.call("audit_trade_decision", {
  decision_id,
  window: "1h"
})
// verdict: "GOOD_DECISION" | "BAD_DIRECTION" | "NOISE"
console.log(audit.verdict, audit.pnl_pct + "%")

Every decision response includes a next_step field — your agent always knows when and how to audit.

Symbol unavailable? If a symbol isn't in the current Kronos cycle:

{
  "status": "UNAVAILABLE_THIS_CYCLE",
  "available_symbols": ["BTC/USD", "ETH/USD", "XRP/USD"],
  "retry_hint_seconds": 900
}

Route to an available symbol or wait 15 minutes for the next cycle.


Payment Stack

Component Value
Protocol x402
Scheme ExactEvmScheme (EIP-3009 transferWithAuthorization)
Network Base mainnet (eip155:8453)
Token USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
Facilitator Coinbase

Disclaimer

Decision outputs are probabilistic signals for experimental automated workflows only. Not financial advice. Early system with a small sample size. Results will vary. Never risk capital you can't afford to lose.


License

MIT — see LICENSE

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选