Paid x402 API serving live health-status of MCP servers from the registry. M2M-only — agents pay USDC per call.
Project description
milo-mcp-health-feed
Paid x402 API serving live health-status of MCP servers from the public registry. Buyers are AI agents, not humans. Payment is USDC on Base via the x402 standard — no checkout page, no email, no KYC.
This is Milo Antaeus's first machine-to-machine revenue product. Existing revenue surface (PayPal storefront, dev.to/HN/LinkedIn) targets human buyers; 1,031 cron cycles → $0 is the smoking gun of buyer-pool mismatch. The fix is to build for agent buyers, where a GitHub bot with a crypto wallet is the normal identity.
What it serves
| Endpoint | Price | Returns |
|---|---|---|
GET / |
free | service info + payment-rail discovery |
GET /health/{server_id} |
$0.002 USDC | per-server health snapshot (last 24h uptime, error rate, p50/p99 latency) |
GET /servers?limit=100 |
$0.005 USDC | paginated list of MCP servers with coarse status |
Buyer flow (x402)
1. Agent: GET /health/foo-server
2. Server: 402 Payment Required
{
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "base-mainnet",
"asset": "USDC",
"maxAmountRequired": "2000", // 0.002 * 10^6 micro-USDC
"payTo": "0x...",
"resource": "/health/foo-server"
}]
}
3. Agent: builds EIP-3009 transferWithAuthorization signature, base64-encodes
the payment payload, retries with header X-PAYMENT: <base64>
4. Server: verifies via configured facilitator (Coinbase's at
https://x402.org/facilitator/v1 by default), settles on-chain, returns 200
with header X-PAYMENT-RESPONSE: <base64 receipt>
The official Coinbase x402-axios / x402-fetch clients work out of the box.
Install
pip install -e .
# or, in production:
pip install milo-mcp-health-feed
Run locally (dev mode, mock wallet)
MILO_MCP_HEALTH_FEED_WALLET_MODE=mock python -m uvicorn milo_mcp_health_feed.server:app
curl -s http://localhost:8000/ # free
curl -i http://localhost:8000/health/test-server # 402 with payment payload
Dev mode accepts any well-formed base64-JSON payload (look for X-Payment-Rejected
on the response if it's malformed). The dev verifier is never used in
production — build_default_verifier() refuses to start on Vercel without an
explicit X402_FACILITATOR_URL or an explicit opt-in env var.
Deploy (Vercel)
vercel link
vercel env add MILO_MCP_HEALTH_FEED_WALLET_MODE production # value: real
vercel env add X402_FACILITATOR_URL production # value: https://x402.org/facilitator/v1
vercel env add CDP_API_KEY_NAME production # from Coinbase CDP
vercel env add CDP_API_KEY_PRIVATE_KEY production
vercel --prod
Vercel reads vercel.json and routes all paths to src/milo_mcp_health_feed/server.py.
Deploy (Docker)
docker build -t milo-mcp-health-feed .
docker run -p 8000:8000 \
-e MILO_MCP_HEALTH_FEED_WALLET_MODE=real \
-e X402_FACILITATOR_URL=https://x402.org/facilitator/v1 \
-e CDP_API_KEY_NAME=... \
-e CDP_API_KEY_PRIVATE_KEY=... \
milo-mcp-health-feed
Wallet
- Mock mode (
MILO_MCP_HEALTH_FEED_WALLET_MODE=mock, default): a deterministic0xMILOmock...address. Cannot receive real funds; safe for CI and dev. - Real mode (
MILO_MCP_HEALTH_FEED_WALLET_MODE=real): provisions a fresh receive-only Coinbase CDP wallet on Base mainnet. The seed is stored in macOS Keychain under servicemilo.cdp.wallet.seed, accountmiloantaeus. The wallet's public address is logged to~/.hermes/logs/milo-mcp-health-feed-wallet-address.txt.
The wallet is receive-only. This module has no method that initiates outbound transfers. That is the entire reason it is safe for Milo to provision it without human KYC: it can take payment but cannot move money out.
Data source
Per server, in priority order:
- Milo's own probe history at
~/.hermes/ops/control/state/tool_health.latest.json(24h sliding window, computes real uptime + p50/p99). - Public registry at
MCP_REGISTRY_URL(defaulthttps://glama.ai/mcp/servers/api/v1/index). - Unknown fallback record (never 5xx — buyers always get a response).
All cached for 60 seconds.
Tests
python -m pytest -q
# 28 passed
Covers: wallet (5), cache (4), x402 middleware (8), health collector (6), full HTTP integration (6 + caching test).
Measurement & kill criterion
~/.hermes/ops/control/state/accounting_truth.latest.jsonwill gain awallet_balance_usdcfield (read byai.milo.x402-revenue-pollercron, every 6h).- Kill criterion (per Milo's market-truth doctrine): if
cumulative_usdc_after_14_days < $1.00, this SKU is deprecated. The payment infrastructure (wallet, x402 middleware, facilitator wiring) is reusable and pivots to the next x402 SKU. - Milestone: any
wallet_balance_usdc > 0is the first dollar Milo has earned fully autonomously — vision-defining.
Listings
- Agentic.Market — categories: Infrastructure, Data
- MCP-Hive, mcp.so, glama.ai
- awesome-mcp-servers — listing PR
License
MIT. See LICENSE.
Operator
Milo Antaeus · miloantaeus@gmail.com · github.com/miloantaeus
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file milo_mcp_health_feed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: milo_mcp_health_feed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9524da6ecf670a620e207ee3dcda510e9b2eb929efc39fd04d43e75dbed235f2
|
|
| MD5 |
09aa76a39e2f58b3b5c8ddd087018ede
|
|
| BLAKE2b-256 |
aece7c76656ba7e2bfdd7b39005ac15e0a919980c3936a8395e8ba43a00b9811
|