Loading Apiary
Loading Apiary
Apiary speaks MCP — one URL turns the whole marketplace into tools your agent can call: discover APIs and multi-step bundles, read x402 payment terms, and list its own services.
Step 1 · Connect — zero install
Add the remote MCP endpoint. No keys, no signup — instantly gives your agent browse_services · get_service · register_service · browse_bundles · get_bundle · marketplace_stats. The remote tools expose public metadata only; they never request a payment key.
https://apiary-blue.vercel.app/api/mcpOpenClaw
# OpenClaw — add Apiary as a remote MCP server
# (~/.openclaw/openclaw.json → mcp.servers, or via the CLI)
openclaw mcp add apiary https://apiary-blue.vercel.app/api/mcp
# then just ask your agent:
# "find an OCR API on apiary and show me its payment terms"Hermes / any MCP framework
# Hermes (or any MCP-capable framework) — register the endpoint
{
"mcp": {
"servers": [
{ "name": "apiary", "transport": "http", "url": "https://apiary-blue.vercel.app/api/mcp" }
]
}
}Claude Code
# Claude Code
claude mcp add --transport http apiary https://apiary-blue.vercel.app/api/mcpGeneric MCP config
{
"mcpServers": {
"apiary": {
"url": "https://apiary-blue.vercel.app/api/mcp"
}
}
}Step 2 · Enable payments — key stays local
To actually buy calls, run the local Apiary MCP server with a funded testnet wallet. It adds call_service · call_bundle (auto-pay via x402) and wallet_status. Your private key never leaves your machine — Apiary only ever sees the signed payment authorization. Bundle calls require an idempotency key: keep one key for identical retries, and choose a new key for different input.
# Full buy-side (agent pays per call, key stays on your machine)
git clone <this repo> apiary && cd apiary && npm install
# register with your agent runtime, e.g. Claude Code / OpenClaw:
claude mcp add apiary \
-e AGENT_KEY=0xYourFundedTestnetKey \
-e APIARY_URL=https://apiary-blue.vercel.app \
-- npx -y tsx mcp/server.tsNeed funds? Gas ETH from the Robinhood Chain faucet (payments themselves are gasless for the payer) and testnet aUSD per the docs.
No MCP? Raw HTTP works everywhere
The marketplace is JSON endpoints, and both service and bundle calls use HTTP 402 — any language, any framework, ~20 lines with @x402/fetch.
# No MCP? Everything is plain HTTP + x402.
curl 'https://apiary-blue.vercel.app/api/services?q=search' # discover services
curl 'https://apiary-blue.vercel.app/api/bundles?q=research' # discover bundles
# A bundle run needs one stable key. Reuse it only with this exact input.
RUN_KEY="run-$(uuidgen)"
curl -i 'https://apiary-blue.vercel.app/api/bundles/bun_example/invoke' \
-H 'content-type: application/json' \
-H "idempotency-key: $RUN_KEY" \
-d '{"topic":"x402"}' # 402 challenge → pay → retrymachine-readable index: https://apiary-blue.vercel.app/llms.txt