Gas Prices Today MCP

io.github.theluckystrike由 GitHub 账号 theluckystrike 发布v1.0.0更新于 Nov 7, 2026

Gas prices today from the EIA weekly survey: US, region, state and city, with year-ago change.

已验证Streamable HTTP可网页运行位置与生活金融

概览

AI 生成的概览

远程 MCP 服务器,让助手获取本周 EIA 美国汽油与柴油平均价格(按地区、州、城市),并支持比价和加油费用估算。

可以做什么
  • 查询本周 EIA 每加仑平均零售价:全美、地区、被调查的州或城市,并给出较上周、四周前和一年前的变化
  • 按价格从低到高排列被调查地区,并与全美均价对比
  • 按加仑数和地区均价或自定单价估算加油费用,并按里程与油耗估算行程油费
  • 每条结果返回结构化 JSON,含摘要、数据日期和来源
适用场景
适合回答美国某州、城市或地区当前汽油或柴油价格、哪里最便宜,以及加满一箱或自驾出行要花多少钱这类问题——模型无法凭记忆回答,因为 EIA 每周一发布新的均价。
运行要求
远程 streamable HTTP 端点,无需令牌、API 密钥或注册。如需本地 stdio 运行,可用 Node 20 或更高版本从仓库构建。需要能访问该托管服务器,它在调用时读取 EIA 页面并最多缓存 15 分钟。
安装前请注意
所有工具均为只读,不索取任何凭据。价格为调查均价而非加油站实际价格;仅九个州和十个城市有直接报价,其他州返回所属地区均价,柴油仅覆盖全美、各地区和加州。结果中会包含第三方页面链接。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "gas-prices-today": {
      "type": "http",
      "url": "https://gas-prices-today-mcp.lipmichal.workers.dev/mcp"
    }
  }
}

README

gas-prices-today-mcp

Gas prices today for AI assistants. Ask for this week's price per gallon in your state or city and get the U.S. Energy Information Administration (EIA) average for regular, midgrade, premium or diesel, the change from last week, last month and a year ago, and what a fill-up or a trip costs.

This is a Model Context Protocol (MCP) server. It reads the EIA weekly retail gasoline and diesel survey at call time and needs no API key.

Tools

ToolWhat it returns
get_gas_pricesThis week's EIA average retail price per gallon (taxes included) for the US, a region, one of nine surveyed states, one of ten surveyed cities or the region of any other state, with the change from last week, four weeks ago and a year ago.
compare_gas_pricesThe states, cities and regions EIA prices, ranked from cheapest to most expensive, against the US average.
estimate_fill_up_costThe cost of a fill-up at the area average or your price, and the cost of a trip from miles and miles per gallon.

Every result has structured JSON, a one-paragraph summary, as_of, source and more (a page on mcpstamp.com). Every tool is marked read-only.

What it knows that your model does not

  • This week's price. EIA publishes new averages every Monday, so a remembered number is stale.
  • Which places EIA prices itself. It covers the US, five regions with sub-regions, nine states (California, Colorado, Florida, Massachusetts, Minnesota, New York, Ohio, Texas, Washington) and ten cities. For any other state the server says so and returns the EIA region that contains it.
  • The price a year ago, read from the EIA weekly history file.

Install

Hosted (Claude.ai custom connector, ChatGPT developer mode)

Paste this URL. No token, no sign-up.

https://gas-prices-today-mcp.lipmichal.workers.dev/mcp

Claude Code

claude mcp add --transport http gas-prices-today https://gas-prices-today-mcp.lipmichal.workers.dev/mcp

Claude Desktop

Claude Desktop adds remote servers under Settings, Connectors, Add custom connector. Paste the URL above.

Cursor

Add to ~/.cursor/mcp.json.

json
{  "mcpServers": {    "gas-prices-today": { "url": "https://gas-prices-today-mcp.lipmichal.workers.dev/mcp" }  }}

VS Code

Add to .vscode/mcp.json.

json
{  "servers": {    "gas-prices-today": { "type": "http", "url": "https://gas-prices-today-mcp.lipmichal.workers.dev/mcp" }  }}

Local stdio

The npm package is not published. Build it from this repository with Node 20 or newer.

git clone https://github.com/theluckystrike/gas-prices-today-mcp && cd gas-prices-today-mcpnpm install && npm run buildclaude mcp add gas-prices-today -- node $(pwd)/dist/stdio.js

Example prompts

  • "What are gas prices today?"
  • "How much is a gallon of regular in Texas right now, and what was it a year ago?"
  • "Which state EIA surveys has the most expensive gas?"
  • "What is the diesel price in California this week?"
  • "What will a 300 mile trip cost at 30 miles per gallon?"

Data sources

Full list with fetch dates in DATA_SOURCES.md.

Limitations

  • State, city and regional averages from a retail survey, not the price at your station.
  • EIA prices nine states and ten cities directly. Other states get their region's average.
  • Diesel is priced for the US, the regions and California only.
  • The hosted server caches EIA pages for up to 15 minutes.

More

More MCP servers that answer questions your assistant cannot answer alone are on mcpstamp.com.

Part of the Zovo MCP collection at https://mcp.zovo.one

Built by theluckystrike.

Development

npm installnpm test                              # builds, then runs the fixture tests and an offline stdio testnode scripts/stdio-transcript.mjs     # live stdio round trip, writes .live/stdio-transcript.jsonl

License

MIT

来源:README.md,提交 ea07e37

工具

3

get_gas_prices

Get gas prices today

Latest EIA weekly average retail price per gallon (taxes included) of regular, midgrade or premium gasoline, all grades or diesel for the US, an EIA region, one of nine surveyed states, one of ten surveyed cities, or the region of any other state, read at call time from eia.gov: price, change from last week and four weeks ago, the price a year ago, the last six survey weeks and the next release date.

输入参数areagrade

compare_gas_prices

Compare gas prices by place

Ranks the areas EIA prices (states, cities, regions) from cheapest to most expensive for a grade this week, with the US average, the cheapest and the most expensive area.

输入参数gradegroup

estimate_fill_up_cost

Estimate fill-up and trip cost

Cost of filling a tank (gallons times this week's EIA average for the area, or your price per gallon), and optionally the fuel cost of a trip from miles and miles per gallon, including cents per mile.

输入参数areagrademilesgallons必填miles_per_gallonprice_per_gallon

版本历史

1
  1. v1.0.0最新Nov 7, 2026

评分

已满足适用检查项的 100%

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

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