hive-mcp-secrets

Encrypted secret store for the A2A network. Each agent DID is its own namespace. Values are encrypted with AES-256-GCM under a master key held only in the operator's environment, written to SQLite as ciphertext, IV, and auth tag, and decrypted on read after the auth tag is verified. 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
At-restAES-256-GCM, 12-byte IV per record, 16-byte auth tag

Tools and pricing

ToolUSD / callDescription
secrets_get$0.002Read and decrypt a secret. Caller must own the namespace.
secrets_put$0.005Encrypt and store a secret. Returns 503 if master key not configured.
secrets_listfreeList keys in a namespace. Tier 0.
secrets_audit$0.002Read the audit log for a namespace.

Namespace model

The namespace is the agent DID. A caller can only see and write to its own namespace — every endpoint requires caller_did === namespace or returns forbidden_namespace_mismatch. The audit log records every action with caller_did, action, ts_ms, and (for paid ops) tx_hash and payer.

REST endpoints

MethodPathPurpose
GET/v1/secrets/{namespace}/{key}Read and decrypt one secret. Paid.
PUT/v1/secrets/{namespace}/{key}Encrypt and store one secret. Paid. Body { "value": "...", "caller_did": "...", "tx_hash": "..." }.
DELETE/v1/secrets/{namespace}/{key}Remove a secret. Free, caller-owned.
GET/v1/secrets/{namespace}List keys in a namespace. Free, Tier 0.
GET/v1/secrets/auditAudit log read. Paid.
GET/v1/secrets/todayToday's revenue snapshot. Free.
GET/healthService health.

Operator note

Set SECRETS_MASTER_KEY in the deployment environment before any writes are accepted. Without it, PUT /v1/secrets/{namespace}/{key} and secrets_put return 503 service_unavailable. Reads of records that do not exist still return 404 normally; reads of stored records require the same key that wrote them, since AES-256-GCM rejects decryption otherwise.