Skip to main content
Glama

fuel-mcp

Fuel prices near a place, said in one sentence: an MCP server and claude-voice plugin.

Ask for a fuel near a point, and it names the cheapest station in one sentence. The made-up stations sit around the point 0,0, far out at sea. They touch no network, and every answer says it is simulated:

$ uv run fuel-mcp price --simulate --lat 0 --lon 0
Simulated: Diesel is cheapest at Fake Fuel Beta, nineteen seventy-nine, 2 kilometres away. Drivstoffpriser's price is about a day old.
Data: Drivstoffpriser (ODbL), stations © OpenStreetMap contributors

The same tool is served to a voice session over stdio, and the server stops when its input closes:

$ uv run fuel-mcp serve --simulate < /dev/null

The tool

Tool

What it does

fuel_price

Names the cheapest station within about 5 km, its price, distance and age. It reads only.

It takes fuel (diesel, the default, petrol95 or petrol98), and the phone's position as lat, lon and accuracy_m. The search widens by the position's accuracy, which is taken as 100 m when not given. With no position, it asks where. A price more than a week old is never said as current: it is given with the day it was last reported.

Related MCP server: fuel-prices-mcp

Real prices

No price source is on until you list one. Settings live in ~/.config/fuel-mcp/config.toml, never in this repository. Home is used when the voice gives no position:

sources = ["drivstoffpriser"]   # one source; with none listed, nothing is fetched
[home]
lat = 0.0
lon = 0.0

With Drivstoffpriser listed, its export is checked at most once an hour, and only when someone asks (ADR-FM-001). The copy is kept in ~/.cache/fuel-mcp/. Its times are read as Norwegian time, because the app stores the reporting phone's local time.

A mistake in the file is said with the fix:

$ XDG_CONFIG_HOME=tests/settings-examples uv run fuel-mcp price
unknown source 'petrolbot'; the known ones are drivstoffpriser. Fix sources in tests/settings-examples/fuel-mcp/config.toml

The data

Data: Drivstoffpriser (ODbL), stations © OpenStreetMap contributors.

Prices come from Drivstoffpriser, a community project whose open data is free to use for any purpose. Every answer carries that credit in its credit field, and says how old its price is.

The gates

Every one of these runs in continuous integration, and all of them run here:

$ uv run ruff check .
All checks passed!
uv run ruff format --check .   # layout
uv run mypy src                # types
uv run pytest -q               # behaviour
python scripts/mutate.py       # that each rule's own test can fail

CONTRIBUTING.md says what each one is for, and decisions/ records the choices that shaped them, including how a change is made here.

Licence

GPL-3.0-or-later. See LICENSE.

Available Tools

1 tool
fuel_priceA
Read-only

Find the cheapest fuel near a point; changes nothing. Names the cheapest station within about 5 km, its price, how far it is and how old the price is, in one sentence. Read 'say' aloud.

Inputs: lat, lon, fuel, accuracy_m. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of misselection between overlapping tools. Its purpose (find the cheapest nearby fuel price, read-only) is unambiguous.

    Naming Consistency4/5

    A single snake_case name, 'fuel_price', is clean and readable. It is a noun phrase rather than a verb_noun pattern, but with one tool there is no internal inconsistency.

    Tool Count3/5

    The server's scope is genuinely narrow (one lookup), so a single tool is defensible, but 1 tool is on the thin side of the scale. There is no coverage for adjacent needs such as listing multiple stations or choosing fuel type.

    Completeness3/5

    The core read operation is covered, but notable gaps exist: no fuel-type selection (petrol/diesel/etc.), no way to return more than the single cheapest station, and no radius or sort control. These are workable but real limitations.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server for UK fuel prices, enabling queries for cheapest stations, nearby forecourts, and area price summaries using official government open data.
      4
      1
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI assistants to query Austria's public fuel price API to find the cheapest diesel, super, or CNG stations near an address or within a region, including price, address, distance, open status, and navigation links, and to list regions and districts. It runs locally as a read-only stdio MCP server with no API keys required.
      MIT