Gas Fee Predictor

io.github.higherbeing由 GitHub 账号 higherbeing 发布v1.0.2更新于 Oct 24, 2026

Live Ethereum and L2 gas fees: current gas, cheapest L2, forecast, ETH price, cost estimates.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

只读 MCP 服务器,让助手获取以太坊与 L2 实时 Gas 费用、ETH 价格、成本估算和 Gas 预测。

可以做什么
  • 查询以太坊主网当前 Gas 价格,附 ETH/USD 价格与立即发送或等待的建议
  • 对比 Arbitrum、Base、Optimism、Polygon 的实时 L2 费用并找出最便宜的一个
  • 估算 ETH 转账、ERC-20/USDC 转账、Uniswap 兑换、NFT 铸造或自定义 Gas 单位的美元成本
  • 获取最长 24 小时的逐小时 Gas 预测及下一个更便宜的时间窗口
  • 查看所选时间范围内的近期 Gas 历史,含最小值、最大值和平均值
适用场景
适合回答现在 Gas 多少钱、该现在发送还是等待、哪个 L2 最便宜,以及某个链上操作大约需要多少美元等问题。
运行要求
可使用托管的 streamable HTTP 端点(无需安装、无需账号),或通过 stdio 运行 npm 包 gasfeepredictor-mcp,后者需要 Node 18 或更高版本。无需 API 密钥或认证。可通过可选变量 GASFEE_API_BASE 覆盖 API 地址。
安装前请注意
只读且无需认证,不索取任何凭据。数据来自第三方 API,约每 30 至 60 秒刷新一次,属于估算值,不应视为保证的成交价格。npm 包提供的工具数量少于托管端点。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "gas-fee-predictor": {
      "type": "http",
      "url": "https://api.gasfeepredictor.com/api/mcp"
    }
  }
}

README

Gas Fee Predictor — MCP Server

Live Ethereum + Layer-2 gas-fee data for AI agents, via the Model Context Protocol. Read-only, no API key, no account. Every answer carries a citation back to gasfeepredictor.com.

There are two ways to connect. Prefer the hosted one — there is nothing to install.


1. Hosted endpoint (recommended)

If your client supports remote MCP servers — ChatGPT and Claude connectors, Cursor, VS Code, and most current clients do — paste this URL and you are done:

https://api.gasfeepredictor.com/api/mcp

Streamable HTTP, unauthenticated, no install, no config file, nothing to keep updated. It exposes 7 tools — two more than the npm package (get_gas_forecast and get_gas_history).

Client config, if your client wants JSON rather than a URL box
json
{  "mcpServers": {    "gasfeepredictor": {      "type": "streamable-http",      "url": "https://api.gasfeepredictor.com/api/mcp"    }  }}

Verify it yourself:

bash
curl -s -X POST https://api.gasfeepredictor.com/api/mcp \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

2. npm package (stdio)

For clients that speak stdio only. Requires Node ≥ 18.

json
{  "mcpServers": {    "gasfeepredictor": {      "command": "npx",      "args": ["-y", "gasfeepredictor-mcp"]    }  }}

Claude Desktop keeps that file at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. Restart the client, then ask: "What's the Ethereum gas fee right now, and is it cheaper on an L2?"

Env varDefaultPurpose
GASFEE_API_BASEhttps://api.gasfeepredictor.comOverride the API base (e.g. for self-hosting).

Tools

ToolWhat it answersHostednpm
get_current_gas"What's the Ethereum gas fee right now?" — low/avg/high Gwei, ETH price, send-now-vs-wait.✅✅
get_l2_gas"Cheapest L2 right now?" — live Arbitrum / Base / Optimism / Polygon fees.✅✅
get_eth_priceCurrent ETH/USD and 24h change.✅✅
best_time_to_transactSend now or wait? Next cheaper window + expected savings.✅✅
estimate_transaction_costUSD cost of an ETH transfer / USDC transfer / Uniswap swap / NFT mint (or custom gas), per tier.✅✅
get_gas_forecastForward-looking hourly gas forecast, up to 24h ahead.✅—
get_gas_historyRecent historical mainnet gas over a chosen window, with min/max/avg.✅—

Notes

  • Read-only and unauthenticated — it only reads public gas data.
  • Upstream data refreshes every ~30–60s.
  • Served from api.gasfeepredictor.com, not the apex, so automated clients are not challenged by the CDN's bot protection.
  • MIT licensed.

Changelog

1.1.0 — get_current_gas and estimate_transaction_cost now fall back to /api/eth-price when the dashboard payload returns ethPrice: null (upstream price cooldown). Previously they rendered ETH ≈ $undefined or failed outright while the price endpoint was serving fine.

来源:README.md,提交 f9c8ae4

工具

7

get_current_gas

Get the current Ethereum mainnet gas price (low / average / high, in Gwei) plus the live ETH/USD price and a send-now-vs-wait recommendation. Use this to answer "what is the gas fee right now".

无需输入参数。

get_l2_gas

Compare live Layer-2 gas fees across Arbitrum, Base, Optimism, and Polygon (Gwei and the estimated wallet fee in USD for a standard transfer), and identify the cheapest right now. Use for "cheapest L2" / "L2 gas fees" questions.

无需输入参数。

get_eth_price

Get the current ETH/USD spot price and its 24-hour change.

无需输入参数。

best_time_to_transact

Find out whether to send a transaction now or wait — returns the current recommendation, expected savings, and when the next cheaper gas window is predicted.

无需输入参数。

estimate_transaction_cost

Estimate the current USD gas cost of a specific Ethereum mainnet action (ETH transfer, ERC-20/USDC transfer, Uniswap swap, or NFT mint), or a custom gas-units amount, at the chosen priority tier.

输入参数tieraction必填gas_units

get_gas_forecast

Get the forward-looking hourly Ethereum gas forecast (up to 24 hours ahead) with the predicted cheapest window. Use for "when will gas be cheaper", "should I wait until tomorrow", or planning a transaction.

输入参数hours

get_gas_history

Get recent historical Ethereum mainnet gas prices over a chosen window, with min/max/average. Use to answer "what has gas been doing", "was gas cheaper yesterday", or to compare the current price against a recent baseline.

输入参数range

版本历史

2
  1. v1.0.2最新Oct 12, 2026
  2. v1.0.1Sep 16, 2026

评分

已满足适用检查项的 100%

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

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