Mezo Agent Toolkit

Testnet only: Mezo testnet, chain 31611

What it is

An AI agent can read Mezo and pay for those reads in MUSD, with no BTC for gas. This page is the live demo: a pay-per-call endpoint (x402) in front of the MezoLens contract, which answers how healthy a MUSD trove is, where it stands in the redemption queue, what a swap on the Mezo DEX would return, and which veBTC and veMEZO locks a wallet holds. It runs on Mezo testnet only, with test money. Nothing here touches Mezo mainnet.

Status

Read from this Worker's settings.

Network
Mezo testnet (eip155:31611)
Price per call
0.001 MUSD
Payee
0xa37a04189696C371f487ff8da414192D62f39A4f
Payee on the explorer
Lens contract
0xBDfD1C0B544319E25b4b99ee1f355e55230f6130
Lens on the explorer
Facilitator
facilitator.vativ.io, a third party that sends the settlement transaction and pays the BTC gas
Paid routes
  • GET /v1/trove/:address Health of one MUSD trove: collateral ratio, debt, liquidation price
  • GET /v1/redemption/:address Where one trove stands in the MUSD redemption queue, with system context
  • GET /v1/pool/quote Quote a swap on the Mezo DEX: output, reserves and price impact
  • GET /v1/ve/:address veBTC and veMEZO locks held by one address

Try it

An unpaid request gets HTTP 402 and a payment challenge. This prints it:

curl -si https://mezo-agent-toolkit.kylne700.workers.dev/v1/trove/0xDA04759E54728B6636Fe48F7c9795c7B609bAaAa | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 -d

To pay for a call, run the toolkit's MCP server on your machine and add it to your agent host. It pays this endpoint in MUSD under spend limits that only you set, and it may call only the hosts you list:

{
  "mcpServers": {
    "mezo": {
      "command": "node",
      "args": [
        "--import",
        "tsx",
        "src/mcp.ts"
      ],
      "cwd": "/path/to/mezo-toolkit",
      "env": {
        "MEZO_KEY_FILE": "/path/to/funded-testnet.key",
        "MEZO_MAX_PER_CALL_MUSD": "0.01",
        "MEZO_MAX_PER_SESSION_MUSD": "0.1",
        "MEZO_PAY_ALLOWED_HOSTS": "mezo-agent-toolkit.kylne700.workers.dev"
      }
    }
  }
}

Recent payments

MUSD transfers to the payee, newest first, read from the chain. They include the toolkit's own test runs. A transfer shows that a payment landed, not that data was delivered.

Reading the chain...