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 分