Mgo

xyz.chain-ops由 chain-ops.xyz 发布官方发布者v2.2.0更新于 Oct 24, 2026

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

已验证Streamable HTTP可网页运行云端与基础设施金融

概览

AI 生成的概览

远程 MCP 服务器,比较最多 9 条 EVM 链的实时 Gas 价格,并在交易前推荐最便宜的链。

可以做什么
  • 获取 4 条主流 EVM 链的免费实时 Gas 价格,有速率限制。
  • 在 4 条链之间给出最便宜链的推荐及节省百分比。
  • 比较 9 条网络(含 BNB、Polygon、Avalanche、zkSync 与 Hyperliquid),用于跨链路由决策。
  • 付费档位返回解码后的 x402 支付要求,由 x402 客户端在 Base 上以 USDC 结算。
适用场景
适合交易代理、DeFi 机器人,或在跨链、部署合约、发送交易前需要选择链并降低 Gas 成本的助手。免费演示档足以查询原始价格;付费档提供推荐与更广的链覆盖。
运行要求
远程 Streamable HTTP 端点,无需安装。免费演示工具无需任何配置。付费工具需要支持 x402 的客户端,能用有余额的钱包在 Base(eip155:8453)上签署 EIP-3009 USDC 授权,通常需在客户端环境中配置 EVM 私钥。需要能访问该 API 及其上游 RPC 与价格源。
安装前请注意
付费工具每次调用花费 0.001 或 0.002 USDC 并在链上结算,助手可能动用真实资金;客户端需持有私钥用于签名支付。上游数据源不可用时不会结算付款。演示档限制为每小时 10 次、每天 100 次。Gas 与价格数据来自第三方 RPC 和价格源。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mgo,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/xyz.chain-ops%2Fmgo/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "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

来源:README.md,提交 f0543bd

工具

4

get_gas_demo

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

无需输入参数。

get_cheapest_chain

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

无需输入参数。

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.

无需输入参数。

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.

无需输入参数。

版本历史

1
  1. v2.2.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分