mgo-gas
Provides gas price comparison and optimization for Polygon chain, recommending the cheapest transaction costs across multiple EVM networks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mgo-gasWhat's the cheapest EVM chain for a transaction right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MGO — Multi-chain Gas Optimizer
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.
Quick Start
# 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/demoRelated MCP server: base-gas-mcp
Tiers
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 |
Endpoints
Endpoint | Payment | Description |
| Free | Raw gas prices only (10/hr rate limit) |
| $0.001 USDC (x402) | 4-chain comparison + recommendation + savings |
| $0.002 USDC (x402) | 9-chain full comparison |
| Free | AI agent discovery file |
| Free | Server health check |
Payment Flow (x402 Protocol)
GET /gas/basicor/gas/premium→ 402 response with payment requirementsClient signs EIP-712 USDC authorization (using x402-axios or x402-fetch)
Resend with
X-PAYMENTheader → 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");MCP Server (Claude / Cursor)
npm run mcpAdd to Claude Desktop config:
{
"mcpServers": {
"mgo-gas": {
"command": "node",
"args": ["/path/to/x402-gas-api/mcp-server.js"]
}
}
}Deploy to Vercel
npm i -g vercel
vercel --prodPlatform Registration
BlockRun — Register MCP server URL
Dexter — One-line facilitator config
x402.org — Automatic llms.txt crawling
This server cannot be deployed
Maintenance
Related MCP Connectors
Find the cheapest EVM chain across up to 9 networks with savings %. Pay-per-call via x402 on Base.
EVM gas, Chainlink prices, token-safety, swap quotes, ENS, OFAC & NFT via x402.
Pay-per-call x402 API for AI trading agents — pre-trade honeypot/rug-pull safety checks before you buy, plus DEX slippage, funding rates, and Polymarket arbitrage.
Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
Related MCP Servers
- FlicenseAqualityCmaintenanceProvides AI agents with real-time gas prices and blockchain data from Base, with metered access via x402 payment protocol.4-
- AlicenseAqualityCmaintenanceEnables agents to fetch live Base mainnet gas prices by paying $0.001 USDC per call via the x402 payment standard.110 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to access crypto/web3 data across 5 chains with pay-per-call billing in USDC via x402, no API key required, and built-in spend caps.3619 npmMIT
- AlicenseAqualityCmaintenanceCompare real-time gas prices across up to 9 EVM chains and get the cheapest-chain recommendation. Pay-per-call via x402 (USDC on Base). No API key.4MIT