mcpField
H
Hive Flag

Hive Flag

Remote
hiveagentiq.comDeveloper Tools0Updated 26w ago

About Hive Flag

Hive Flag is a feature-flag service for the Hive agent network, using DID-based and percentage targeting. It lets operators evaluate and change flags without redeploying agents, and verifies paid calls with USDC on Base.

Key features

  1. 01DID and prefix targeting
  2. 02Percentage-based rollouts
  3. 03Sticky variant assignment
  4. 04Create, update, and delete flags
  5. 05Verify Base USDC payments

Use cases

  1. 01Gate a new tool for a DID prefix
  2. 02Roll out configuration to a share of agents
  3. 03Disable runaway behavior without redeploying

MCP support

This MCP server provides tools to evaluate, list, describe, create, update, and delete flags. Paid requests are verified against Base USDC transaction receipts.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://hive-mcp-flag.onrender.com/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

Details

From the project 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.0
wallet: W1 MONROE 0x15184bf50b3d3f52b60434f8942b7d52f2eb436e (Base)

Quick start

git clone https://github.com/srotzin/hive-mcp-flag
cd hive-mcp-flag
npm install
npm 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.

[
  { "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}              # describe
POST   /v1/flag                     # create
PATCH  /v1/flag/{name}              # update — owner-only
DELETE /v1/flag/{name}              # tombstone — owner-only
GET    /v1/flag/today               # revenue snapshot
GET    /health                      # service health
GET    /.well-known/mcp.json        # MCP discovery
POST   /mcp                         # JSON-RPC 2.0

MCP example

{
  "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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.