hive-mcp-flag

Feature flag service for the A2A network. Create flags with DID-keyed targeting and percentage rollouts, evaluate them at runtime by agent DID, and roll config changes out without redeploying. Inbound only. Real rails — USDC on Base L2.

Protocol

MCP version2024-11-05 / Streamable-HTTP / JSON-RPC 2.0
EndpointPOST /mcp
DiscoveryGET /.well-known/mcp.json
HealthGET /health
SettlementUSDC on Base L2 — verified on-chain

Tools and pricing

ToolUSD / callDescription
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.

Targeting rule shape

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

Rules evaluate in declared order; first match wins. Rollout uses SHA256(did + flag_key) mod 100, so each DID lands in a sticky bucket.

REST endpoints

MethodPathPurpose
POST/v1/flag/evalEvaluate a flag for a DID.
GET/v1/flag/listList flags by owner DID.
GET/v1/flag/{name}Describe one flag.
POST/v1/flagCreate a flag.
PATCH/v1/flag/{name}Update a flag. Owner-only.
DELETE/v1/flag/{name}Tombstone a flag. Owner-only.
GET/v1/flag/todayToday's revenue snapshot.
GET/healthService health.