Live on Base mainnet

Build AI agents
that pay.

Pay-per-call on-chain data for AI agents, priced in USDC on Base.
Start with MGO: live gas comparison across 9 EVM chains from $0.001 per call. No API key, no subscription.

npm install @chain-ops/agent-sdk viem
Read quickstart Try the free demo ↗ GitHub ↗
x402 V1 + V2 supported ERC-8004 agent identity MIT licensed · OpenAPI 3.1 · MCP

Why this exists

Two protocols. No bridge.

x402 gives AI agents a payment rail. ERC-8004 gives them an on-chain identity.

They don't talk to each other yet.

Until now, wiring them together meant five manual steps — mint the identity, set up the payment middleware, attach the identity to each request, update reputation after settlement, and check trust before sending money.

@chain-ops/agent-sdk gives you the payment call, the identity registration and the trust lookup in one package. Automatic identity attachment and reputation updates are on the roadmap.

Quickstart

Three calls. No API keys.

typescript
// 1. Create an agent from a private key
import { createAgent } from "@chain-ops/agent-sdk";

const agent = createAgent({
  account: process.env.PRIVATE_KEY as `0x${string}`,
  network: "base",
});

// 2. Register on ERC-8004 (one-time)
await agent.registerAgent({
  name: "my-gas-optimizer",
  description: "Finds the cheapest EVM chain",
  tags: ["gas", "evm"],
});

// 3. Pay for any x402 resource: 402 → sign USDC authorization → retry, handled for you
const { body } = await agent.pay(
  "https://api.mgo.chain-ops.xyz/gas/basic"
);
// → { recommendation: { cheapestChain: "Optimism", action: "Use Optimism — saves ~97% vs Ethereum" } }

x402 V1 + V2. EIP-3009 USDC authorization signed for you. One call, no API key. Read the full docs →

In production

Running in production.

Our own gas-optimizer API, MGO, runs on @x402/express and accepts payments from @chain-ops/agent-sdk or any x402 client. Every paid call settles in USDC on Base mainnet.

Client @chain-ops/agent-sdk

Reads the 402, signs the USDC authorization, retries: agent.pay()

x402 V2 · USDC on Base
Server api.mgo.chain-ops.xyz

MGO gas optimizer · 9 EVM chains · @x402/express · Bazaar extension

LIVE

MGO — Multi-chain Gas Optimizer

Compare real-time gas prices across 9 EVM chains. $0.001 per call basic, $0.002 premium (adds BNB, Polygon, Avalanche, zkSync, Hyperliquid).

9 EVM chains
$0.001 per call
x402 V2 USDC on Base
MCP remote server

Also from chain-ops: x402Hub (trust board for x402 services, live), HyperPulse (Hyperliquid perp intelligence, live), Insider Scanner (Polymarket detection, paused).