Back to Browse

X402 Gas Api MCP Server

Developer ToolsLow Risk9.8MCP RegistryRemote
Free

Server data from the Official MCP Registry

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

About

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

Remote endpoints: streamable-http: https://api.mgo.chain-ops.xyz/mcp

Security Report

9.8
Low Risk9.8Low Risk

Valid MCP server (1 strong, 1 medium validity signals). 1 known CVE in dependencies Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.

4 tools verified · Open access · 2 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

file_system

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

How to Connect

Remote Plugin

No local installation needed. Your AI client connects to the remote endpoint directly.

Add this to your MCP configuration to connect:

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

Documentation

View on GitHub

From the project's GitHub 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

# 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

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 /llms.txtFreeAI agent discovery file
GET /healthFreeServer health check

Payment Flow (x402 Protocol)

  1. GET /gas/basic or /gas/premium → 402 response with payment requirements
  2. Client signs EIP-712 USDC authorization (using x402-axios or x402-fetch)
  3. Resend with X-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");

MCP Server (Claude / Cursor)

npm run mcp

Add 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 --prod

Platform Registration

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

Reviews

No reviews yet

Be the first to review this server!