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 分