Skip to main content
Glama
Br0ski777

gas-estimator

by Br0ski777

Gas Estimator API

MCP Server x402 License: MIT

一次调用即可获取多链 gas 价格 -- 支持 ETH、Base、Polygon、Arbitrum、BSC。比较各链,找出最便宜的方案。通过 x402(Base L2 上的 USDC)按次付费 -- 无需 API 密钥、无需注册、没有限流门槛。

这是 klymax402 市场的一部分 -- 为 AI 智能体打造的 100 个 x402 微支付 API,一个钱包,Base 上使用 USDC。

快速开始 -- MCP

将其添加到你的 MCP 客户端配置中(Claude Desktop、Cursor、ElizaOS 等):

{
  "mcpServers": {
    "gas-estimator": {
      "url": "https://gas-estimator.api.klymax402.com/mcp"
    }
  }
}

Related MCP server: base-gas-mcp

快速开始 -- HTTP (x402)

curl -X POST "https://gas-estimator.api.klymax402.com/api/estimate" \
  -H "Content-Type: application/json" \
  -d '{}'
# -> 402 Payment Required, with an x402 payment challenge in the response body

任何支持 x402 的客户端(@x402/fetchx402-agent-tools、ATXP)都会自动处理 402 -> 签名 -> 重试 的循环。

工具

工具

方法

路径

价格

说明

crypto_estimate_gas

POST

/api/estimate

$0.005

获取多个 EVM 链的 gas 价格估算,并包含美元成本

crypto_estimate_gas

当你要同时比较多个 EVM 链的 gas 价格时使用此工具。它以 JSON 格式返回多链 gas 估算。

参数

名称

类型

必填

说明

chain

string

链名称:ethereum、base、polygon、arbitrum、bsc。省略时返回所有链。

返回

  • chains -- 包含链名称的链 gas 数据数组

  • low -- 慢速确认的 gas 价格(以 gwei 为单位)

  • medium -- 标准确认的 gas 价格(以 gwei 为单位)

  • high -- 快速确认的 gas 价格(以 gwei 为单位)

  • transferCostUsd -- 每条链上简单转账的预估美元成本

  • cheapestChain -- 当前 gas 成本最低的链

示例响应:

{"chains":[{"chain":"base","low":0.005,"medium":0.008,"high":0.012,"transferCostUsd":0.01},{"chain":"ethereum","low":12.5,"medium":18.0,"high":25.0,"transferCostUsd":0.85}],"cheapestChain":"base"}

适用场景:在跨链交易前选择最便宜的链。对于需要优化 gas 成本的多链智能体来说至关重要。

不适用于:兑换报价(使用 dex_get_swap_quote)、跨链桥接(使用 bridge_find_best_route)。

示例智能体提示词

  • "同时比较多个 EVM 链的 gas 价格"

支付

  • 协议:x402 -- 原生 HTTP 按次计费,无需注册、无需 API 密钥

  • 网络:Base L2(eip155:8453

  • 资产:USDC

  • 促进者:Coinbase CDP(主要)、PayAI(备用)

  • 也可通过 ATXP 访问(OAuth 包装的 x402,RFC 9728 受保护资源元数据)

klymax402 的一部分

100 个面向 AI 的 x402 微支付 API -- 一个钱包,Base 上使用 USDC,零注册。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Find the cheapest EVM chain across up to 9 networks with savings %. Pay-per-call via x402 on Base.

  • Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.

  • Pay-per-call x402 gateway: agent tools, OpenAI-compatible LLM, market data, RPC, security audits.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Br0ski777/gas-estimator-x402'

If you have feedback or need assistance with the MCP directory API, please join our Discord server