hive-mcp-abtest
Provides A/B experiment management for agents on the Hive network, including deterministic bucket assignment, conversion recording, and statistical significance testing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hive-mcp-abtestcreate experiment 'homepage' with variants control and treatment"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hive-mcp-abtest
A/B experiment runner for the A2A network. An inbound-only MCP shim that gives autonomous agents a deterministic, sticky bucket assignment, a conversion-recording endpoint, and a two-proportion Z-test stat-sig calculator. Pricing is per call via x402 on Base USDC.
$0.001perabtest_assign$0.005perabtest_record_conversionabtest_resultsis free and read-only
The shim does not run experiments on behalf of the caller. It records assignments and conversions for experiments the caller registers, and returns aggregate counts and a Z-test on demand.
How bucket assignment works
Bucket is SHA-256(experiment_id + "|" + agent_did), with the first four bytes read as an unsigned 32-bit integer, modulo the sum of variant weights. The first call writes the result. Subsequent calls return the same row, so assignment is sticky for the lifetime of the SQLite store.
A variant list is [{ id, weight? }, ...]. Weight defaults to 1 per variant. Pass [{id:"control"},{id:"treatment",weight:3}] for a 25/75 split.
Related MCP server: dyoe-agent-tools-mcp
Stat-sig calculator
Two-proportion Z-test with pooled variance over the first two registered variants. Output includes z_score, two-sided p_value, relative_lift, and significant_95 / significant_99 boolean flags.
MCP
Transport: Streamable HTTP, JSON-RPC 2.0
Protocol:
2024-11-05Endpoint:
POST /mcp
Tools:
Tool | Tier | Price |
| 3 | $0.001 |
| 3 | $0.005 |
| 0 | free |
REST
Method | Path | Purpose |
GET |
| List experiments |
POST |
| Create or upsert experiment |
GET |
| Get experiment |
PUT |
| Update experiment |
DELETE |
| Delete experiment |
POST |
|
|
POST |
|
|
GET |
|
|
GET |
| UTC-day assignment + conversion counts |
GET |
| Liveness, version, and DB check |
Storage
SQLite at /tmp/abtest.db with three tables: experiments, assignments, conversions. Override with DB_PATH.
Environment
Variable | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set X402_ENABLED=false to bypass payment gating in local development.
Quickstart
npm install
npm start
# in another shell
curl -s http://localhost:3000/health
curl -s -X POST http://localhost:3000/v1/abtest \
-H 'content-type: application/json' \
-d '{"id":"prompt_v2","name":"prompt v2","variants":[{"id":"control"},{"id":"treatment","weight":3}]}'
curl -s -X POST http://localhost:3000/v1/abtest/assign \
-H 'content-type: application/json' -H 'x-payment: {}' \
-d '{"experiment_id":"prompt_v2","agent_did":"did:hive:demo:1"}'The first call without a paid x402 envelope returns a 402 body with a fresh nonce. Submit a tx hash and payer to /v1/x402/submit to mint a short-lived access token, then retry.
License
MIT. See LICENSE.
Author
Steve Rotzin · steve@thehiveryiq.com · https://www.thehiveryiq.com
Hive Civilization Directory
Part of the Hive Civilization — agent-native financial infrastructure.
Endpoint Directory: https://thehiveryiq.com
Live Leaderboard: https://hive-a2amev.onrender.com/leaderboard
Revenue Dashboard: https://hivemine-dashboard.onrender.com
Other MCP Servers: https://github.com/srotzin?tab=repositories&q=hive-mcp
Brand: #C08D23
This server cannot be deployed
Maintenance
Related MCP Connectors
54 pay-per-call AI services over x402 (USDC on Base): compression, OCR, FX, inference.
x402 gateway: AI agents pay USDC on Base to flip coins (Chainlink VRF, streaks win pots).
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
Pay-per-query x402 business intelligence on Base, settled in USDC via the native 402 payment flow.
Related MCP Servers
AlicenseAqualityCmaintenancePre-trade DeFi intelligence for AI agents. 20 paid x402 endpoints, USDC on Base.2323 npm1MIT- FlicenseAqualityCmaintenancePay-per-call tools for AI agents including trust checks, due diligence, market data, and human-verified approvals, settled in USDC on Base via the x402 protocol.16-
- AlicenseAqualityCmaintenanceProvides AI agents with 10 pay-per-call utility tools (QR generation, DNS lookup, OCR, etc.) using USDC on Base via the x402 protocol, with agent's private key never leaving the agent.1123 npmMIT
- AlicenseNot gradedqualityCmaintenancePer-agent quota meter for the A2A network, enabling quota checks with USDC settlement on Base L2 via x402 envelopes.MIT