UK fuel prices MCP server — official Fuel Finder open data (every UK forecourt, 30-minute freshness): cheapest petrol/diesel near a postcode, area price stats, station details
Project description
fuel-prices-mcp
UK fuel prices MCP server — ask Claude "where's the cheapest unleaded near LL57?" and get real answers from the official Fuel Finder open data: every UK forecourt, prices updated within 30 minutes of a change, as required by the Motor Fuel Price (Open Data) Regulations 2025.
First of its kind: the first MCP server for the UK's statutory fuel price scheme (as of July 2026 — the scheme itself only went live in February 2026). Free forever: government open data plus keyless postcode geocoding.
Tools
| Tool | What it does |
|---|---|
fuel_find_cheapest |
Cheapest stations for a fuel near a postcode, ranked by price, each compared to the local median, with the tank-of-fuel savings spread |
fuel_nearby_stations |
Forecourts near a location, nearest first, with all fuel prices, brand and amenities |
fuel_area_summary |
Min/median/max per fuel for an area — "is 142.9 actually a good price here?" |
fuel_data_status |
Diagnostics: credentials configured, stations loaded, cache age |
Fuels: unleaded (E10), super unleaded (E5), diesel (B7), premium diesel, B10 and HVO. Prices are pence per litre. All tools read-only.
Setup
1. Register for Fuel Finder access (free)
The API needs a GOV.UK One Login (free): start here. You'll get an OAuth client ID and secret.
2. Install
uv tool install fuel-prices-mcp
3. Configure your MCP client
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"fuelprices": {
"command": "uvx",
"args": ["fuel-prices-mcp"],
"env": {
"FUEL_FINDER_CLIENT_ID": "your-client-id",
"FUEL_FINDER_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Claude Code:
claude mcp add fuelprices -e FUEL_FINDER_CLIENT_ID=... -e FUEL_FINDER_CLIENT_SECRET=... -- uvx fuel-prices-mcp
Example
You: Cheapest diesel within 10 miles of CF10 1EP?
Claude (via
fuel_find_cheapest): The cheapest is 146.9p/litre at a supermarket forecourt 2.1 miles away — 5.0p under the local median. The spread in your area is 16.0p/litre, which is about £8.80 on a 55-litre tank, so it's worth the detour past the two nearest stations.
How it works
The server fetches the full UK dataset (stations + prices, batch-paginated), joins it, and caches it in memory for 5 minutes — so repeated questions don't hammer the API while staying inside the Fair Use Policy's freshness expectation. Postcodes resolve via postcodes.io (keyless); distances and statistics are computed locally. Permanently closed stations are excluded; prices older than 7 days are flagged as stale.
Fair Use Policy compliance
This server is built to comply with the Fuel Finder Aggregator Fair Use Policy: prices are presented unbiased and ranked by objective criteria (price, distance), timestamps and metadata pass through unmodified, the in-memory cache refreshes within the policy's 5-minute freshness expectation, and every response includes the official Report a Discrepancy link. If you build a public-facing service on top of this server, the Fair Use Policy applies to you directly — read it when you register.
Limitations
- Prices are self-reported by forecourts under the statutory scheme; errors and lag happen — treat the pump price as final.
- The scheme covers road fuel at registered UK forecourts; it does not include EV charging or LPG prices.
- Postcode geocoding needs internet access to postcodes.io;
lat,loninput works without it. - Not affiliated with the CMA, DESNZ or GOV.UK.
Privacy
Your credentials stay in your MCP client's config. Lookups go directly from your machine to the government API and postcodes.io — no third-party servers, no logging, no telemetry.
Contributing
Issues and PRs welcome. Run the checks before submitting:
uv run pytest
uv run ruff check src tests
Credits
Built by Dwain Barnes / EryriLabs — HuggingFace. Contains public sector information from the Fuel Finder scheme, licensed under the Open Government Licence v3.0. Geocoding by postcodes.io.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuel_prices_mcp-0.1.0.tar.gz.
File metadata
- Download URL: fuel_prices_mcp-0.1.0.tar.gz
- Upload date:
- Size: 169.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b81e9a10d1e4453582e86fffc3622aaddf95248e06333ad4308c0f2ef39f19e
|
|
| MD5 |
9fb124920d5c42956249cbc4593788b0
|
|
| BLAKE2b-256 |
7f77f3f233cfbddc42c0423b3048f0c8aa79a9d8bf1ee051b4d503eb46db3537
|
Provenance
The following attestation bundles were made for fuel_prices_mcp-0.1.0.tar.gz:
Publisher:
release.yml on dwain-barnes/fuel-prices-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fuel_prices_mcp-0.1.0.tar.gz -
Subject digest:
3b81e9a10d1e4453582e86fffc3622aaddf95248e06333ad4308c0f2ef39f19e - Sigstore transparency entry: 2218564307
- Sigstore integration time:
-
Permalink:
dwain-barnes/fuel-prices-mcp@d9f3acaa4a6ecc6afbeb1970416a1789f614be6b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dwain-barnes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9f3acaa4a6ecc6afbeb1970416a1789f614be6b -
Trigger Event:
release
-
Statement type:
File details
Details for the file fuel_prices_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fuel_prices_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e911ba1eb881ed131457a25da703d550ac6b5271c00e2bf64609e5ffa60ce31
|
|
| MD5 |
e6ab264ab3b8d74a5cc6fe93aad3751a
|
|
| BLAKE2b-256 |
6af217820c37dd8b8403cf303089b650e80cf54798e7eaaa6401834829c92b10
|
Provenance
The following attestation bundles were made for fuel_prices_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on dwain-barnes/fuel-prices-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fuel_prices_mcp-0.1.0-py3-none-any.whl -
Subject digest:
9e911ba1eb881ed131457a25da703d550ac6b5271c00e2bf64609e5ffa60ce31 - Sigstore transparency entry: 2218564333
- Sigstore integration time:
-
Permalink:
dwain-barnes/fuel-prices-mcp@d9f3acaa4a6ecc6afbeb1970416a1789f614be6b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dwain-barnes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d9f3acaa4a6ecc6afbeb1970416a1789f614be6b -
Trigger Event:
release
-
Statement type: