Hive Cdn

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

Edge content delivery for autonomous agents — signed manifests, A2A authentication

已验证Streamable HTTP可网页运行云端与基础设施文件与存储

概览

AI 生成的概览

面向智能体间对象的远程边缘缓存:助手可按键存储、读取和清除对象,读取支持 ETag 条件请求,并通过 x402 以 USDC 计费。

可以做什么
按键存储对象,可设置缓存 TTL(免费)。按键读取缓存对象,支持 ETag 与 If-None-Match,内容未变时返回 304 且不计出站流量。幂等地清除单个键。通过 REST 端点查看每日计数、价格和服务健康状态。
适用场景
适用于智能体流水线反复读取相同的智能体卡片、能力清单或签名信封,并需要带条件 GET 的共享边缘缓存的场景。若只需要私有存储则不太适用,因为键没有访问控制。
运行要求
远程 Streamable-HTTP 端点,无需本地运行时或软件包。读取需要预付访问令牌:在 Base L2 上提交 USDC 链上支付证明后获取,并通过 X-Hive-Access 请求头发送。需要能访问该端点的网络。
安装前请注意
读取会产生费用:每请求 0.0002 美元,另加每 GB 出站 0.05 美元,1.00 美元预付包通过 Base L2 上的 USDC 结算至配置的钱包。写入和清除免费,但会覆盖或删除缓存数据。键没有访问控制,不要存放私密内容;缓存除 SQLite 文件外不持久。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

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

README

hive-mcp-cdn

[srotzin/hive-mcp-cdn MCP server]

Edge cache for A2A capabilities — Hive Civilization

A small, inbound-only MCP server that caches arbitrary objects (agent cards, capability manifests, signed envelopes, anything an A2A pipeline reads more than once). Two-tier storage with an in-memory LRU and a SQLite warm tier, ETag and If-None-Match support, a purge endpoint, and per-request and per-GB metering through x402.

Council provenance: Ad-hoc, user-promoted 2026-04-27.


What this is

Most A2A traffic is reads — the same agent card, the same capability list, the same signed proof — fanned out across a fleet that has no shared cache. hive-mcp-cdn is the missing edge cache. Agents put objects under a key and fetch them back through a cheap, ETag-aware GET.

  • 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
  • Brand gold: Pantone 1245 C / #C08D23
  • Mode: Inbound only. ENABLE=true default.

Pricing

SurfacePriceCharged on
Per request$0.0002 USDCEvery /v1/cdn/get, hit or miss.
Per GB egress$0.05 USDCBody bytes returned in 200 responses. 304 responses do not bill egress.
Prepay bundle$1.00 USDCBuys an access token; reads draw from the prepaid balance until depletion.

Settlement on Base L2 USDC. The recipient is the WALLET_ADDRESS env var.

Tools

ToolTierDescription
cdn_cache_get2 ($0.0002/req + $0.05/GB)Read a cached object by key. Honors if_none_match.
cdn_cache_put0 (free)Store under a key with optional Cache-Control: max-age=....
cdn_purge0 (free)Purge a single key. Idempotent.

REST endpoints

MethodPathPurpose
GET/v1/cdn/get?key=...Read. Sends ETag, Cache-Control, X-Cache, Age. Honors If-None-Match.
POST/v1/cdn/putWrite { key, body, content_type?, cache_control? }.
POST/v1/cdn/purgePurge { key }.
GET/v1/cdn/todayDaily counters: requests, hits, misses, bytes served, revenue.
POST/v1/x402/proof/submitSubmit on-chain proof, mint access token.
GET/v1/x402/pricingPricing schedule.
GET/v1/x402/statsOpen nonces and active tokens.
GET/healthService health and cache stats.
GET/.well-known/mcp.jsonMCP discovery descriptor.
GET/Landing page.

Storage model

Two tiers, both managed by the shim:

  • Hot (LRU): an in-process Map with insertion-order recency. Bounded by CDN_LRU_MAX_ENTRIES and CDN_LRU_MAX_BYTES. Misses fall through to warm and promote on read.
  • Warm (SQLite): better-sqlite3 at CDN_DB_PATH (default /tmp/cdn.db). One cache table with body, ETag, content type, size in bytes, created and expiry timestamps. A second egress table aggregates daily counters.

size_bytes is tracked per row and is the basis for the egress meter. ETags are computed once at write time as the SHA-256 hex of the body, truncated to 32 chars and double-quoted.

x402 flow

The first call to /v1/cdn/get without a token returns:

json
{  "error": "payment_required",  "payment": {    "nonce": "<uuid>",    "amount_usd": 1.0,    "pricing": {      "per_request_usd": 0.0002,      "per_gb_egress_usd": 0.05    },    "accepts": [{ "chain": "base", "asset": "USDC", "recipient": "0x15184b..." }],    "expires_at": 1777220000,    "tier": 2,    "product": "cdn_prepaid_bundle"  }}

Submit proof to /v1/x402/proof/submit:

json
{ "nonce": "...", "payer": "0x...", "chain": "base", "tx_hash": "0x..." }

…then call /v1/cdn/get with X-Hive-Access: hive_<token>. Each request decrements the prepaid balance by per_request + (bytes / 1GB) * per_gb_egress. The residual balance rides the X-Hive-Balance-USD response header.

Cache semantics

  • Cache-Control: max-age=<s> on PUT sets the TTL. Default 300 seconds. Capped at 7 days.
  • ETag is a strong validator (SHA-256 prefix in quotes).
  • If-None-Match: <etag> on GET returns 304 Not Modified with no body and no egress charge.
  • Expired entries are dropped lazily on read and on a 60-second sweep.
  • A PUT over an existing key replaces the body, ETag, content type, TTL, and resets the hit counter.

Environment

VarDefaultPurpose
PORT3000HTTP port.
ENABLEtrueMaster switch. false runs /health only.
WALLET_ADDRESS0x15184bf50b3d3f52b60434f8942b7d52f2eb436eRecipient for x402 fees.
CDN_PRICE_PER_REQUEST_USD0.0002Per-request fee.
CDN_PRICE_PER_GB_EGRESS_USD0.05Per-GB egress fee.
CDN_PREPAY_BUNDLE_USD1.0Default prepay bundle size.
CDN_DEFAULT_TTL_S300Default TTL for objects without explicit max-age.
CDN_LRU_MAX_ENTRIES1024Hot-tier entry cap.
CDN_LRU_MAX_BYTES67108864Hot-tier byte cap (64 MiB).
CDN_MAX_OBJECT_BYTES4194304Per-object size limit (4 MiB).
CDN_DB_PATH/tmp/cdn.dbSQLite warm-tier path.

What this server will not do

  • Make outbound requests of any kind. The cache only holds what was put into it.
  • Resolve URLs, fetch origins, or revalidate against a backing store.
  • Enforce per-key access control. Treat keys as opaque namespaces and gate them upstream if you need privacy.
  • Persist beyond the SQLite file. On a fresh container with a new /tmp, the cache is empty.

License

MIT.

Hive Gamification

This MCP server is part of the Hive Civilization gamification surface (10-mechanic capability taxonomy).

Surface tags: gamification.spec.v1 · gamification.surface.public · gamification.signal.read-only · gamification.settlement.real-rails

Real rails on Base L2 (USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). Read-only signal layer. Brand gold #C08D23.

Hive Civilization Directory

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

Brand: #C08D23

来源:README.md,提交 b7ef8e8

工具

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

版本历史

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

评分

已满足适用检查项的 85%

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

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

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

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