Compare live gas across up to 9 EVM chains and get the cheapest one. x402 pay-per-call on Base.
One address for any MCP client. No sign-in needed on this server.
4 read
Grouped by tool name. At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
An x402-native API that compares real-time gas prices across up to 9 EVM chains and recommends the cheapest one. Built for trading agents, DeFi bots, and any AI agent that needs to optimize transaction costs.
# 1. Install dependencies
npm install
# 2. Set environment variables
cp .env.example .env
# Set WALLET_ADDRESS to your USDC receiving wallet on Base
# 3. Run locally
npm run dev
# 4. Test
# Open in browser: http://localhost:3000/gas/demo
| Feature | Demo (Free) | Basic ($0.001) | Premium ($0.002) |
|---|---|---|---|
| Chains | 4 | 4 | 9 |
| Gas prices | Yes | Yes | Yes |
| Cheapest chain recommendation | No | Yes | Yes |
| Savings % calculation | No | Yes | Yes |
| Cost savings estimate | No | Yes | Yes |
| BNB, Polygon, Avalanche, zkSync, Hyperliquid | No | No | Yes |
| Rate limit | 10/hr, 100/day | Unlimited | Unlimited |
| Endpoint | Payment | Description |
|---|---|---|
GET /gas/demo | Free | Raw gas prices only (10/hr rate limit) |
GET /gas/basic | $0.001 USDC (x402) | 4-chain comparison + recommendation + savings |
GET /gas/premium | $0.002 USDC (x402) | 9-chain full comparison |
GET /llms.txt | Free | AI agent discovery file |
GET /health | Free | Server health check |
GET /gas/basic or /gas/premium → 402 response with payment requirementsX-PAYMENT header → facilitator verifies → data response → on-chain settlement// Client example (x402-axios)
const { withPayment } = require("x402-axios");
const client = withPayment(axios.create(), walletClient);
const response = await client.get("https://api.mgo.chain-ops.xyz/gas/basic");
npm run mcp
Add to Claude Desktop config:
{
"mcpServers": {
"mgo-gas": {
"command": "node",
"args": ["/path/to/x402-gas-api/mcp-server.js"]
}
}
}
npm i -g vercel
vercel --prod