Mgo

xyz.chain-opsPublished by chain-ops.xyzOfficial publisherv2.2.0Updated Oct 24, 2026

Compare live gas across up to 9 EVM chains and get the cheapest one. x402 pay-per-call on Base.

VerifiedStreamable HTTPWeb executableCloud & InfrastructureFinance

Overview

AI-generated overview

Remote MCP server that compares live gas prices across up to 9 EVM chains and recommends the cheapest chain before a transaction.

What you can do
  • Fetch free real-time gas prices for four major EVM chains, rate limited.
  • Get a cheapest-chain recommendation with savings percentage across four chains.
  • Compare nine networks (including BNB, Polygon, Avalanche, zkSync and Hyperliquid) for cross-chain routing decisions.
  • Paid tiers return the decoded x402 payment requirements, which an x402 client settles in USDC on Base.
When to use it
Useful for trading agents, DeFi bots or any assistant that picks a chain before bridging, deploying a contract or sending a transaction and wants to cut gas cost. The free demo tier is enough for raw price checks; the paid tiers add recommendations and wider chain coverage.
Requirements
Remote Streamable HTTP endpoint, no install. The free demo tool needs nothing. Paid tools require an x402-capable client that can sign an EIP-3009 USDC authorization on Base (eip155:8453) with a funded wallet, typically via an EVM private key in the client environment. Network access to the API and its upstream RPC and price feeds.
Before you install
Paid tools cost $0.001 or $0.002 USDC per call and settle on-chain, so an assistant can spend real funds; the client must hold a private key to sign payments. Payment is not settled when the upstream feed is unavailable. The demo tier is rate limited to 10 requests per hour and 100 per day. Gas and price data come from third-party RPC and price feeds.

Installation

In SourceWeft

  1. Open Mgo in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/xyz.chain-ops%2Fmgo/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "mgo": {
      "type": "http",
      "url": "https://api.mgo.chain-ops.xyz/mcp"
    }
  }
}

README

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

bash
# 1. Install dependenciesnpm install
# 2. Set environment variablescp .env.example .env# Set WALLET_ADDRESS (USDC receiving wallet on Base) and CDP_API_KEY_ID/SECRET (facilitator auth)
# 3. Run locally (same entry point as production)npm start
# 4. Test# Open in browser: http://localhost:3000/gas/demo

Tiers

FeatureDemo (Free)Basic ($0.001)Premium ($0.002)
Chains449
Gas pricesYesYesYes
Cheapest chain recommendationNoYesYes
Savings % calculationNoYesYes
Cost savings estimateNoYesYes
BNB, Polygon, Avalanche, zkSync, HyperliquidNoNoYes
Rate limit10/hr, 100/dayUnlimitedUnlimited

Endpoints

EndpointPaymentDescription
GET /gas/demoFreeRaw 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 /pricesFreeNative token USD prices (ETH, BNB, POL, AVAX, HYPE), 60s cache
POST /mcpFree / x402MCP Streamable HTTP endpoint (tools: get_gas_demo, get_cheapest_chain, get_gas_basic, get_gas_premium)
GET /openapi.jsonFreeOpenAPI 3.1 spec
GET /llms.txt, /skill.mdFreeAI agent discovery files
GET /.well-known/x402, /.well-known/x402.json, /.well-known/mcp.json, /.well-known/agent-card.jsonFreeDiscovery metadata
GET /healthFreeServer health check

Payment Flow (x402 v2)

  1. GET /gas/basic or /gas/premium → 402 with requirements in the PAYMENT-REQUIRED header (base64 JSON). A v1-shaped copy is also in the body for legacy clients.
  2. Client signs an EIP-3009 USDC authorization on Base (eip155:8453)
  3. Resend with PAYMENT-SIGNATURE header → facilitator (Coinbase CDP) verifies → data response with PAYMENT-RESPONSE receipt → USDC settled on-chain

If the upstream RPC / price feed is unavailable the API answers 503 and no payment is settled.

javascript
// Client example (@x402/fetch, x402 v2)const { wrapFetchWithPayment } = require("@x402/fetch");const { x402Client } = require("@x402/core/client");const { ExactEvmScheme } = require("@x402/evm/exact/client");const { privateKeyToAccount } = require("viem/accounts");
const client = new x402Client().register("eip155:*", new ExactEvmScheme(privateKeyToAccount(process.env.EVM_PRIVATE_KEY)));const paidFetch = wrapFetchWithPayment(fetch, client);const res = await paidFetch("https://api.mgo.chain-ops.xyz/gas/basic");

MCP (Claude / Cursor / any MCP client)

Remote Streamable HTTP server, no install:

json
{  "mcpServers": {    "mgo-gas": { "url": "https://api.mgo.chain-ops.xyz/mcp" }  }}

Also published as npm package chain-ops-mgo and in the official MCP Registry (xyz.chain-ops/mgo). Paid tools return the decoded x402 payment requirements; pay with an x402 client against the resource URL.

Operations

  • Access log + /stats (Upstash Redis, key via STATS_KEY; send it as x-stats-key header)
  • Demo rate limit and the CoinGecko price cache are shared through the same Redis
  • Secrets never live in this repo: see .env.example

Deploy to Vercel

bash
npm i -g vercelvercel --prod

Platform Registration

  1. BlockRun — Register MCP server URL
  2. Dexter — One-line facilitator config
  3. x402.org — Automatic llms.txt crawling

Source: README.md at commit f0543bd

Tools

4

get_gas_demo

Get free real-time gas prices for 4 major EVM chains (Ethereum, Base, Arbitrum, Optimism). Rate limited 10/hr.

Takes no parameters.

get_cheapest_chain

Get a direct recommendation for the cheapest EVM chain right now with savings %. Free, rate limited.

Takes no parameters.

get_gas_basic

Find the cheapest EVM chain before sending a transaction. Compares live gas across Ethereum, Base, Arbitrum & Optimism and returns the cheapest chain with savings % (e.g. 'Use Base — saves 99.8% vs Ethereum'). Use before bridging, deploying a contract, or any tx where you can choose the chain. $0.001 USDC via x402 on Base, no API key.

Takes no parameters.

get_gas_premium

Find the cheapest EVM chain across 9 networks before transacting. Covers Ethereum, Base, Arbitrum, Optimism, BNB, Polygon, Avalanche, zkSync & Hyperliquid; returns the cheapest chain with savings % for cross-chain routing decisions. Use when you need the widest chain coverage to route a tx to the lowest-fee network. $0.002 USDC via x402 on Base, no API key.

Takes no parameters.

Version history

1
  1. v2.2.0LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts