Thiago Lannes

Projects › Portugal’s public data, inside Claude

Train, metro and tram timetables, inside Claude

MCP server · Personal project · portugal-mcp · 2026

The official timetables of CP (every train in the country), Metro de Lisboa, Carris, Fertagus, Metro do Porto and the buses of Braga, Coimbra, Aveiro, Cascais, Barreiro, the Algarve and Madeira: next departures, direct trips between two stops, and where the buses are right now in Porto, Coimbra and Lisbon.

Example conversation

“Direct trains from Lisboa Oriente to Porto tomorrow morning?”

transit_trips_between

Alfa Pendular 131 · 07:09→ 09:482 h 39
Alfa Pendular 121 · 08:09→ 10:552 h 46
Alfa Pendular 123 · 09:09→ 11:482 h 39

Alfa Pendular 131 at 07:09 gets you to Campanhã at 09:48, and there is one about every hour after. These are timetable times, so check CP for delays on the day.

What it can do

The clever bit

Each operator’s timetable goes into a small local database the first time it is used, and is refreshed only when the operator publishes a new one. Even Carris’ 145 MB of stop times answer in a blink.

Install it

In Claude Code: claude mcp add portugal -- uvx portugal-mcp. In Claude Desktop or Codex: command "uvx", args ["portugal-mcp"].