gas-prices-today-mcp
This MCP server gives AI assistants current EIA weekly gas and diesel prices and related cost estimates.
Get the latest average retail price per gallon for the US, EIA regions, surveyed states, or surveyed cities, for regular, midgrade, premium, all grades, or diesel.
See price changes from last week and four weeks ago, the year-ago price, recent survey weeks, and the next release date.
Compare EIA-priced states, cities, and regions from cheapest to most expensive against the US average.
Estimate fill-up cost from gallons, using the area EIA average or your own price per gallon.
Estimate trip fuel cost and cents per mile from miles driven and miles per gallon.
Use it read-only with no API key; results include structured JSON, a summary, as-of date, source, and more link.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gas-prices-today-mcp What's the average gas price in Texas this week vs. a year ago?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Tool | What it returns |
| This 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. |
| The states, cities and regions EIA prices, ranked from cheapest to most expensive, against the US average. |
| The 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.
Related MCP server: tankerkoenig-mcp
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/mcpClaude Code
claude mcp add --transport http gas-prices-today https://gas-prices-today-mcp.lipmichal.workers.dev/mcpClaude Desktop
Claude Desktop adds remote servers under Settings, Connectors, Add custom connector. Paste the URL above.
Cursor
Add to ~/.cursor/mcp.json.
{
"mcpServers": {
"gas-prices-today": { "url": "https://gas-prices-today-mcp.lipmichal.workers.dev/mcp" }
}
}VS Code
Add to .vscode/mcp.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-mcp
npm install && npm run build
claude mcp add gas-prices-today -- node $(pwd)/dist/stdio.jsExample 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.
EIA weekly retail gasoline and diesel prices, the per-area tables for regular, midgrade, premium, all grades and diesel, read at call time.
EIA weekly history pages (LeafHandler) for the price a year ago.
EIA PADD definitions for which states belong to which region.
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 install
npm test # builds, then runs the fixture tests and an offline stdio test
node scripts/stdio-transcript.mjs # live stdio round trip, writes .live/stdio-transcript.jsonlLicense
MIT
More from zovo
All free zovo VS Code extensions — file viewers, database clients, formatters. Offline, no telemetry, no sign-up.
Full MCP server catalogue — local-first MCP servers for back-office work: invoices, VAT, PDFs, spreadsheets, payroll.
Hosted no-install MCP endpoints — paste a URL in Claude / Cursor, nothing to install.
Available Tools
3 toolscompare_gas_pricesCompare gas prices by placeARead-onlyIdempotentInspect
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.
Inputs: grade, group.
estimate_fill_up_costEstimate fill-up and trip costARead-onlyIdempotentInspect
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.
Inputs: gallons (required), area, grade, miles, +2 more.
get_gas_pricesGet gas prices todayARead-onlyIdempotentInspect
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.
Inputs: area, grade.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct job: get_gas_prices fetches a single area/grade reading, compare_gas_prices ranks many areas against each other, and estimate_fill_up_cost performs a cost calculation. There is no overlap in intent, and the descriptions make the boundaries explicit (e.g., ranking vs. single lookup).
All three names follow a consistent snake_case verb_noun pattern (get_, compare_, estimate_ + domain object). The verbs are distinct but stylistically uniform, so the convention is predictable.
Three tools is a well-scoped surface for a focused gas-price data server: retrieve, compare, and apply to a cost estimate. Each tool earns its place with no filler or redundancy.
The read-only domain is well covered: current price with weekly/yearly deltas and history, cross-area ranking, and downstream cost math. The one minor gap is there is no way to enumerate valid area names (nine surveyed states, ten cities, regions), so an agent must guess accepted inputs.
Maintenance
Related MCP Connectors
US gas and diesel prices by station, ZIP or city. Paid, on Apify's hosted MCP.
Live US diesel prices and optimized stop-by-stop fuel plans for trucking. Free snapshot tool.
EPA MPG, gas mileage, EV range and annual fuel cost for any car by year, make and model.
Real-time fuel prices, alerts, and cheapest gas stations across 38+ countries.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides access to Korea Petroleum Corporation's Opinet fuel price API for South Korea. Enables querying of current national and regional fuel averages, recent price trends, lowest-price stations, and nearby gas station details through natural language.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to look up real-time fuel prices at over 14,000 German gas stations, find the cheapest E5, E10, or diesel near a place or GPS coordinates, and return only open stations sorted by price.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to retrieve Japan's weekly retail prices for gasoline, diesel, and kerosene from the METI official statistics, covering all 47 prefectures and the national average dating back to 1990. Supports looking up latest weekly prices with week-over-week changes and tax breakdowns, historical series with min/max/average, cheapest-prefecture rankings, and multi-product national trends.-
- AlicenseAqualityBmaintenanceEnables AI assistants to retrieve current EIA residential heating oil and propane prices by state or region, compare weekly and year-ago changes, view historical price series, and estimate heating costs per delivery or million Btu.3MIT