Hive Barter

io.github.srotzin由 GitHub 账号 srotzin 发布v1.0.0更新于 Oct 24, 2026

Multi-party agent barter — non-cash capability exchange with cryptographic receipts

已验证Streamable HTTP可网页运行金融开发者工具商业与电商

概览

AI 生成的概览

远程 MCP 服务器,扫描支持 402 的 MCP 端点、探测其报价,并在 Base 上发出预签名的 USDC 还价。

可以做什么
  • 从公开注册表发现支持 402 的 MCP 端点及其最近报价
  • 向目标发送最多五次询价,估算其保留价格
  • 按设定的底价比例生成一次性预签名还价
  • 在链上结算被接受的还价并记录价差
  • 查看当日与累计盈亏:发出的询价、成交的还价、已实现 USDC 价差
适用场景
适合运行自动化代理间套利流程的运营者,让助手查找付费 MCP 端点、探测价格并在固定上限内发出小额 USDC 还价。对普通研究或编程任务没有用处。
运行要求
远程端点 hive-mcp-barter.onrender.com,使用 Streamable HTTP(POST /mcp),README 建议通过 npx mcp-remote 连接。真实结算需要已充值的 Base 钱包和用于签名的 PRIVATE_KEY 环境变量,并需设置 ENABLE_OUTBOUND=true 才会运行外呼循环。可选配置包括 BASE_RPC、MAX_DAILY_SPEND_USD、MAX_SINGLE_COUNTER_USD 和 COUNTER_PCT。
安装前请注意
还价会花费真实的 Base 链上 USDC,且预签名交易本身就是全部承诺,目标可直接广播而无需再次确认。签名需要已充值钱包的 PRIVATE_KEY,README 明确警告切勿提交该密钥。启用 ENABLE_OUTBOUND 会启动自动循环,探测第三方端点并下单,服务器还会携带归属标头向外部注册表和目标发送请求。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hive Barter,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.srotzin%2Fhive-mcp-barter/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "hive-barter": {
      "type": "http",
      "url": "https://hive-mcp-barter.onrender.com/mcp"
    }
  }
}

README

hive-mcp-barter

[srotzin/hive-mcp-barter MCP server]

Outbound 402 arbitrage agent — Hive Civilization

Probes 402-enabled MCP endpoints, counter-offers below asking, and settles when the spread clears our resale floor. Pure protocol — no DMs, no spam. Attribution headers on every request.

Council provenance: Ad-hoc, user-promoted 2026-04-27 (Tier A position 1).


What this is

hive-mcp-barter is a Model Context Protocol server that runs an outbound arbitrage loop on top of the 402 payment surface. It scans public MCP registries for 402-enabled endpoints, probes them with standard quote requests, and — when target_asking × counter_pct still lands below our resale floor — issues a single-shot, pre-signed counter-offer. The target accepts by broadcasting our pre-signed transaction; there is no haggle, no second round, and no human-readable outreach.

  • Protocol: MCP 2024-11-05 over Streamable-HTTP / JSON-RPC 2.0
  • Transport: POST /mcp
  • Discovery: GET /.well-known/mcp.json
  • Health: GET /health
  • Settlement: USDC on Base L2 — real rails, no mock, no simulated
  • Brand gold: Pantone 1245 C / #C08D23

Tools

ToolTierDescription
barter_discover0 (free)List 402-enabled MCP endpoints from a public registry (glama, smithery, mcp.so) with last-seen asking prices.
barter_quote_curve0 (free)Build a demand curve for a target by sending up to 5 probes at descending floor pcts. Returns the reservation-price estimate.
barter_arbitrage_book0 (free)Today's P&L: probes sent, counters accepted, USDC realized spread.

REST endpoints

MethodPathPurpose
POST/v1/barter/discoverScan registries for 402 endpoints.
POST/v1/barter/probeSend a 402-style quote request to a target.
POST/v1/barter/counterBuild a signed counter-offer at the configured floor pct.
POST/v1/barter/settleResolve an accepted counter on-chain and book the spread.
GET/v1/barter/ledgerRunning P&L, attempts, wins, spread.
GET/v1/barter/todayToday aggregate (Tier 0, free).
GET/healthService health.

Counter-offer envelope

json
{  "x402_version": 1,  "intent": "counter_offer",  "originator_did": "did:hive:morph",  "asking_seen_usd": "0.05",  "offer_usd": "0.0325",  "offer_atomic_usdc_base": "32500",  "tx_pre_signed": "0x...",  "expires": "2026-04-27T20:30:00Z",  "attribution": {    "agent": "hive-mcp-barter",    "attribution_id": "barter-{uuid}",    "policy": "single-shot-no-haggle"  }}

The pre-signed transaction is the entire commitment. The target accepts by broadcasting; we never have to re-sign on accept.

Resale floor

CategoryOur buy floorOur resell
LLM tokens$0.000020 / token$0.000040 / token
Oracle reads$0.0008 / read$0.0015 / read
Storage writes$0.00012 / write$0.00025 / write
KYC checks$0.04 / check$0.08 / check

If target_asking × counter_pct ≤ our_resell × 0.95, we counter. Otherwise we skip — there is no margin.

Risk controls

CapValue
Max single counter$0.50 USDC
Max daily outbound spend$25 USDC
Max probes per target / 24h1
Max distinct targets / hr30
Per-target blacklist3+ no-response

All caps fail-closed. Configurable via env vars; missing or invalid env always falls back to the stricter default.

Configuration

EnvRequiredDefaultNotes
PORTno3000
ENABLE_OUTBOUNDnofalseDefault-off. The 5-min cron loop only runs when set to true.
WALLET_ADDRESSno0x15184…436eW1 MONROE on Base.
USDC_BASEno0x833589…2913USDC contract on Base.
BASE_RPCnohttps://mainnet.base.org
HIVECOMPUTE_URLnohttps://hivecompute-g2g7.onrender.com/v1/compute/chat/completionsUsed twice daily for resale revaluation.
MAX_DAILY_SPEND_USDno25
MAX_SINGLE_COUNTER_USDno0.50
COUNTER_PCTno0.65
PRIVATE_KEYyes (to sign)—Hex private key for the wallet that funds counter-offers. Never commit this. Without it, /v1/barter/counter returns an unsigned envelope and the cron loop will not place real bids.

Signing is opt-in. The repo does not include a key. To enable real counter-offers, set PRIVATE_KEY in the Render dashboard (or your deployment env). To enable the 5-min cron loop, set ENABLE_OUTBOUND=true.

Run locally

bash
git clone https://github.com/srotzin/hive-mcp-barter.gitcd hive-mcp-barternpm installnpm start# server up on http://localhost:3000/mcpcurl http://localhost:3000/healthcurl http://localhost:3000/.well-known/mcp.jsoncurl http://localhost:3000/v1/barter/today

Connect from an MCP client

Claude Desktop / Cursor / Manus — add to your mcp.json:

json
{  "mcpServers": {    "hive_mcp_barter": {      "command": "npx",      "args": ["-y", "mcp-remote@latest", "https://hive-mcp-barter.onrender.com/mcp"]    }  }}

Hive Civilization

Part of the Hive Civilization — sovereign DID, USDC settlement, agent-to-agent rails. Companion shims include hive-mcp-evaluator, hive-mcp-compute-grid, hive-mcp-depin, hive-mcp-agent-storage, hive-mcp-agent-kyc, and hive-mcp-trade.

License

MIT (c) 2026 Steve Rotzin / Hive Civilization

Hive Civilization Directory

Part of the Hive Civilization — agent-native financial infrastructure.

Brand: #C08D23

来源:README.md,提交 0ec5c78

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分