比特币AI工具支付服务

Maximum Sats MCP Server是一个基于比特币和闪电网络的付费API服务,提供AI工具和Nostr Web of Trust评分功能,支持按使用量付费。

  • by joelklabo
  • JavaScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 joelklabo/maximumsats-mcp

使用说明

最大卫星MCP服务器

用于比特币人工智能工具和Nostr信任网络评分的MCP服务器。通过Lightning按次付费 L402.

为什么选择MaximumSats?

随着MCP服务器的激增,一个关键问题出现了: 我们如何以去中心化的方式确保MCP API访问的安全并将其货币化?

MaximumSats提供:

  • L402支付端点 -每一个API呼叫都可能需要使用satoshis付款
  • 信任网络(WoT)评分 --Nostr用户的抗Sybil声誉
  • Nostr ID实用程序 --对npub、note、nprofile、nevent、naddr等进行解码/编码

用例

  • 赏金平台 --按任务向猎人支付报酬,使用WoT防止sybil
  • AI代理市场 --每次通话将MCP工具货币化
  • 数据源 --使用L402保护oracle数据
  • 信誉系统 --基于WoT的信任评分

安装

npx maximumsats-mcp

或者添加到您的MCP客户端配置中:

{
  "mcpServers": {
    "maximumsats": {
      "command": "npx",
      "args": ["maximumsats-mcp"]
    }
  }
}

工具

人工智能工具(maximumsats.com)

工具 成本 描述
ask_bitcoin 21 sats 询问比特币/闪电(Llama 3.3 70B)
generate_image 100 sats 文本到图像(FLUX.1 Schnell 12B)

信任网(wot.klabo.world)-50免费/天

工具 说明
wot_score PageRank信任评分(0-100),包括排名和百分位数
wot_sybil_check 5-信号Sybil检测(真/可疑/疑似西比尔)
wot_trust_path 两个公钥之间的逐跳信任路径
wot_network_health 网络指标:51K+节点、基尼系数、密度
wot_follow_quality 跟踪列表质量分析并提出建议
wot_trust_circle 相互信任、力量和凝聚力
wot_anomalies 幽灵追随者、不对称模式、集群检测
wot_predict_link 链路预测(5个拓扑信号)
wot_compare_providers 跨提供商NIP-85信任评分共识
wot_influence 模拟跟随/取消跟随波纹效应

安全和治理功能

MaximumSats是专门为 保护和管理MCP 轨道:

1.付费API访问控制-一次支付,一次重试

每个端点都可以在支付后进行门控。L402流程很简单:

# Request returns HTTP 402 with Lightning invoice
curl -X POST https://maximumsats.com/api/dvm \
  -H "Content-Type: application/json" \
  -d '{"prompt":"hello"}'
# Returns: {"error":"Payment required","payment_request":"lnbc21...","payment_hash":"abc123","amount_sats":21}

# Pay the invoice in your Lightning wallet, then retry with payment_hash in Authorization header:
curl -X POST https://maximumsats.com/api/dvm \
  -H "Content-Type: application/json" \
  -H "Authorization: abc123" \
  -d '{"prompt":"hello"}'
# Returns: {"status":"success","data":{...}}

2.WoT的抗Sybil性

WoT端点根据网络位置对Nostr pubkeys进行评分,这对以下方面很有价值:

  • 防止虚假账户的赏金平台
  • 需要抗sybil的投票系统
  • 声誉引擎
curl https://maximumsats.com/api/wot/npub1...
# Returns: {"score": 45, "rank": 1234, "percentile": 95.5}

3.无中间人——直击雷

  • 闪电网络即时结算
  • 无订阅,按请求付费
  • 匿名,无需KYC

技术实现

MaximumSats使用L402协议(闪电HTTP 402):

// Challenge response includes invoice
{ status: 402, error: "Payment required", invoice: "lnbc...", amount_sats: 21 }

// After payment, include payment_hash in retry
{ status: 402, error: "Payment required", payment_hash: "abc123..." }

// Successful response after payment verification
{ status: 200, data: { ... } }

所有支付都通过闪电网络进行,没有区块链膨胀。

应用程序编程接口

快速示例

开始:一次付款,一次重试L402流程

MaximumSats API使用L402-以下是支付和获得结果的具体方法:

# Step 1: Request (returns 402 with Lightning invoice)
curl -X POST "https://maximumsats.com/api/bolt11-decode" \
  -H "Content-Type: application/json" \
  -d '{"invoice":"lnbc1..."}'

# Response: {"error":"Payment required","payment_request":"lnbc...","payment_hash":"abc123...","amount_sats":21}

# Step 2: Pay the invoice in your Lightning wallet, then retry with payment_hash:
curl -X POST "https://maximumsats.com/api/bolt11-decode" \
  -H "Content-Type: application/json" \
  -H "Authorization: abc123..." \
  -d '{"invoice":"lnbc1..."}'

# Response: {"status":"success","data":{...}}

在支付赏金之前检查用户的声誉

curl -s "https://wot.klabo.world/score/npub1..." | jq '.score'
# Returns: {"score": 42, "rank": 1234, "percentile": 95.5}

付款前解码闪电发票

curl -X POST "https://maximumsats.com/api/bolt11-decode" \
  -H "Content-Type: application/json" \
  -d '{"invoice":"lnbc..."}'
# Returns: amount, description_hash, expiry, payee pubkey

验证Nostr身份(NIP-05)

curl -X POST "https://maximumsats.com/api/nip05-verify" \
  -H "Content-Type: application/json" \
  -d '{"identifier":"bob@nostr.com"}'
# Returns: pubkey, valid boolean, relay hints

许可证

麻省理工学院