Hive Flag

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

Feature flag service for safe rollouts across the Hive agent fleet

已验证Streamable HTTP可网页运行开发者工具AI 与机器学习

概览

AI 生成的概览

面向智能体集群的功能开关服务:按 DID 定向、按比例灰度,可评估、列出、查看、创建、更新和删除开关。

可以做什么
  • 为指定 DID 评估某个开关,返回解析后的取值和命中的规则
  • 列出并查看某个 DID 拥有的开关及其近期评估记录
  • 创建带默认值和有序定向规则的开关
  • 更新开关或将其标记删除,仅限所有者操作
  • 定向规则支持精确 DID 匹配、DID 前缀金丝雀和粘性百分比灰度
适用场景
适合让助手在不重新部署智能体的情况下关闭失控行为、把新工具先开放给部分 DID 做金丝雀,或把配置变更逐步放量到一定比例的智能体。对已在 Hive 生态中使用 DID 标识智能体的团队更有意义。
运行要求
远程 Streamable-HTTP 端点,无需本地安装(README 也提供了 Node.js 自托管方式)。付费调用需要向服务钱包在 Base L2 上转入 USDC,并在请求体或 x402-tx-hash 请求头中提供交易哈希;服务通过 Base RPC 地址读取回执进行校验。
安装前请注意
多数工具按次收费(flag_eval、flag_create、flag_update、flag_delete),以 Base 上的 USDC 支付,需要发起真实链上交易并提交交易哈希。创建、更新和删除会改动已存储的开关状态,更新与删除仅限所有者。开关数据与评估请求会发送到第三方托管服务。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

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

README

hive-mcp-flag

[srotzin/hive-mcp-flag MCP server]

Feature flag service for the A2A network — Hive Civilization. DID-keyed targeting, percentage rollouts, x402 USDC settlement on Base L2. MCP 2024-11-05. Inbound only.

Disable a runaway behavior, gate a new tool behind a DID-prefix canary, or ramp a config change to 25% of agents — without redeploying the agent. LaunchDarkly-shaped semantics, agent-native primitives.

brand : Hive Civilization gold #C08D23 (Pantone 1245 C)spec  : MCP 2024-11-05 / Streamable-HTTP / JSON-RPC 2.0wallet: W1 MONROE 0x15184bf50b3d3f52b60434f8942b7d52f2eb436e (Base)

Quick start

bash
git clone https://github.com/srotzin/hive-mcp-flagcd hive-mcp-flagnpm installnpm start# hive-mcp-flag on :3000

Hosted endpoint: https://hive-mcp-flag.onrender.com/mcp

Tools and pricing

ToolUSD / callNotes
flag_eval$0.0005Evaluate a flag for a DID; returns resolved value and matched rule.
flag_listfreeList flags owned by a DID.
flag_describefreeFull flag definition and recent evaluations.
flag_create$0.001Create a flag with default value and targeting rules.
flag_update$0.0005Update default value or targeting rules. Owner-only.
flag_delete$0.001Tombstone a flag. Owner-only.

All payments are inbound. Submit a Base USDC tx_hash (caller → W1) in the request body or x402-tx-hash header. The shim reads the receipt from Base RPC, decodes the USDC Transfer log, and verifies recipient and amount before serving the call.

Targeting rules

Rules evaluate in declared order. First match wins. If none match, the flag's default_value is returned.

json
[  { "type": "did_match",  "dids": ["did:hive:0xabc"], "value": true },  { "type": "did_prefix", "prefix": "did:hive:",      "value": true },  { "type": "rollout",    "percent": 25,              "value": true }]

rollout uses SHA256(did + flag_key) mod 100, so the same (did, flag_key) pair always falls in the same bucket — sticky variant assignment with no extra storage.

REST API

POST   /v1/flag/eval                # body: { flag_key, evaluating_did, tx_hash }GET    /v1/flag/list?owner_did=...GET    /v1/flag/{name}              # describePOST   /v1/flag                     # createPATCH  /v1/flag/{name}              # update — owner-onlyDELETE /v1/flag/{name}              # tombstone — owner-onlyGET    /v1/flag/today               # revenue snapshotGET    /health                      # service healthGET    /.well-known/mcp.json        # MCP discoveryPOST   /mcp                         # JSON-RPC 2.0

MCP example

json
{  "jsonrpc": "2.0", "id": 1, "method": "tools/call",  "params": {    "name": "flag_eval",    "arguments": {      "flag_key": "new_routing_v2",      "evaluating_did": "did:hive:0xabc",      "tx_hash": "0xBASE_TX_PAYING_$0.0005_USDC_TO_W1"    }  }}

Real rails

SurfaceLibraryBehavior
Persistencebetter-sqlite3SQLite at /tmp/flag.db, WAL mode, transactional create/update.
Signature verificationethers.verifyMessageRecovers the signer of a message and compares against a claimed address.
Payment verificationethers.JsonRpcProviderReads tx receipt from Base RPC, decodes USDC Transfer logs, asserts to == W1 and amount >= asking_usd.

Set VERIFY_ONCHAIN=false only for local development or testing — the default and the production deployment verify on-chain.

Environment

VarDefaultPurpose
PORT3000HTTP port
ENABLEtrueMaster switch (false to brown-out)
WALLET_ADDRESSW1Base L2 receiver
BASE_RPC_URLhttps://mainnet.base.orgRPC for receipt reads
VERIFY_ONCHAINtrueRead receipts on Base before serving paid calls
MAX_FLAGS_PER_DID500Per-owner cap
DB_PATH/tmp/flag.dbSQLite file

Caps

  • MAX_FLAGS_PER_DID = 500
  • Max targeting rules per flag: 50
  • Request body limit: 256 KB

Out of scope (v1.1+)

Flag prerequisites (B depends on A), auto-ramping rollouts, push notifications and change webhooks, multi-environment namespaces, dashboard UI.

Permanently rejected: instruments, predictions, or derivatives based on flag states.


Hive Civilization · MIT · github.com/srotzin/hive-mcp-flag

Hive Civilization Directory

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

Brand: #C08D23

来源:README.md,提交 41f2733

工具

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

版本历史

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

评分

已满足适用检查项的 85%

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

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

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

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