bruno@cabado:~$ cat projects/fuel-mcp.md

← projects/

Fuel MCP

Exited (src only)

  • MCP
  • LLM
  • APIs

MCP server that connects LLMs to real-time fuel price data in Spain, enabling multi-step queries over the public precioil.es API.

Context

Most fuel-price apps provide fixed filters, but many user questions are inherently multi-step: nearest stations, specific fuel type, historical trend, and best option under constraints. Fuel MCP was built to move from rigid UI workflows to an intent-first conversational layer on top of an existing public API.

What I built

A production-style MCP server around precioil.es, exposing a focused toolset that an LLM can call safely and repeatedly:

  • nearby stations by radius and by municipality/province
  • station detail and station price history retrieval
  • daily average prices (national and province-level)
  • helper tools to enumerate provinces and municipalities for follow-up calls

Technical approach

I implemented the server in Python using FastMCP and HTTPX, with explicit tool contracts so models can plan reliable call sequences. Each tool wraps a concrete API endpoint and returns structured responses suitable for chained reasoning. The runtime supports both STDIO (local MCP clients) and streamable HTTP transport (networked deployments), with logging and error handling to keep failures observable and debuggable.

Outcome

Fuel MCP demonstrates how existing REST capabilities can be converted into conversational infrastructure without replacing the underlying backend. The result is a reusable MCP integration pattern: expose narrowly scoped tools, keep contracts stable, and let LLMs orchestrate complex fuel-price queries on top of live public data.

bruno@cabado:~$ mail hi@brunocabado.com# I share work, research and product experiments in AI systems

$ send-message$ wget cv.pdf$ open linkedin$ open github

© 2026 Bruno Cabado · designed & developed in Galicia with Astro

↑↓ navigate · Enter open · Esc close

key bindings

0–8select window
n / pnext / previous window
ctalk to the agent pane
% / " or -split side by side / stacked (up to 3 panes, each shows a window)
Spacenext layout (side by side → stacked → main + stack → main + row)
qshow pane numbers, then press one to jump there
{ / }swap the focused pane with the main one
Shift+←↑↓→resize (main pane smaller / larger)
o · Ctrl+b ←↑↓→focus next pane · pane in that direction
zzoom the focused pane (again to restore)
xclose the focused pane (closing the main one promotes the split)
ttoggle theme (dark ⇄ latte) · :theme next cycles gruvbox, nord, tokyo, dracula
/ · Ctrl+ksearch the whole site
:command prompt
:set keys offdisable single-key shortcuts (the prefix still works)
Ctrl+bprefix — every key above also works after it; % " x and arrows need it

commands: search · select-window <name|n> · open <query> · ask <question> · split-window [-h|-v] [name] · kill-pane · zoom · swap-pane · layout · theme [mocha|latte|gruvbox|nord|tokyo|dracula] · ls · exit · help
agent: type /clear to reset the conversation