mcps

Romanian trains MCP server

Beta: in use, and new or still growing, or reading web pages its service may change.

Ask your assistant how to get from București to Cluj by train on Friday, what leaves Brașov after six tonight, or how late the Iași train is right now, and get the answer for every passenger operator in Romania at once: CFR Călători, Regio Călători, Transferoviar Călători, Interregional Călători, Astra Trans Carpatic, Softrans, Ferotrafic and any other operator that publishes its timetable. A journey can change from one company's train to another's, which no single operator's site shows you.

You need nothing: no account and no key. The server reads the yearly timetables Informatică Feroviară (Infofer) publishes as open data on data.gov.ro, and the delays from Infofer's public live map.

What you can ask

  • "How do I get from București Nord to Sibiu on 15 December, leaving after 6 in the morning? I don't mind one change."
  • "What trains leave Brașov for anywhere this evening, and which company runs each?"
  • "Is there a direct train from Timișoara to Arad on Sunday morning?"
  • "Which days does IR 1621 run in January, and when does it reach Sibiu?"
  • "How late is train 1663 right now, and where is it?"
  • "Which train companies run passenger trains in Romania?"

Station names can be typed without diacritics: "Brasov", "Iasi" and "Ploiesti Vest" are found as Brașov, Iași and Ploiești Vest.

Install

Install in VS Code Install in Cursor Download for Claude Desktop

With Claude Code:

claude mcp add romania-trains -- npx -y @foreverworks/mcp-romania-trains

Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:

{
  "mcpServers": {
    "romania-trains": {
      "command": "npx",
      "args": ["-y", "@foreverworks/mcp-romania-trains"]
    }
  }
}

Each runs the published package on Node 22.19 or newer. It needs no settings.

From a clone

git clone https://github.com/foreverworks/mcps.git && cd mcps
npm ci && npm run build
claude mcp add romania-trains -- node "$PWD/servers/romania-trains/dist/index.js"

In a JSON configuration, the command is node and its one argument the full path of servers/romania-trains/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.

Configuration

None of its own. Dates and times are always Romania's (Europe/Bucharest), whatever the zone of the machine it runs on. The shared variables every server here reads (HTTP transport, limits) are in docs/configuration.md.

First run

The first call downloads every timetable in force, about 20 MB of XML a year and twice that around mid December, when two timetable years overlap. That takes a few seconds; every call after answers from memory. Call health to see what was loaded.

Tools

Tool Access What it does
health read Whether the timetables can be read: operators, trains and stations loaded, the days covered, when data.gov.ro was last read.
operators read Every operator with a current timetable, its trains, timetable years, licence and dataset; operators whose datasets have none.
find_station read Stations matching part of a name, diacritics ignored, closest and busiest first, with their codes.
station_board read A station's departures or arrivals on a day, every operator, in time order; optionally one operator only.
journeys read Journeys between two stations on a day, direct or with changes across operators, each leg with its train, times and distance.
train read One train's stops and times, whether it runs on a day, its next days of running and its whole calendar.
live_trains read Trains running now on Infofer's live map: delay, position (GPS, reported or estimated) and last report, joined to the timetable.

Every tool only reads. A station argument takes a name or the code find_station gives. A name that starts the names of a handful of stations stands for all of them: "Timisoara" is Timișoara Nord, Est, Sud and the rest, so a journey may leave from any of them.

Troubleshooting

"matches several stations". "Bucuresti" alone starts the names of more than a dozen stations. Name one ("Bucuresti Nord") or call find_station and pass a code.

A change between two parts of one station is not found. Infofer gives some stations several codes (București Nord Gr.A and Gr.B are two), and a journey only changes trains at the same code. Asking from or to "Bucuresti Nord" covers both parts, but a change in the middle of a journey from one to the other is not offered.

A journey I know exists is missing. Check the transfer time (min_transfer_minutes, 5 by default) and max_changes (2 by default). Journeys longer than a day, and journeys another one beats on departure, arrival and changes alike, are left out on purpose.

live_trains does not list my train. The map shows only trains running at that moment. A train that has not left yet, has arrived or is not reported is absent. That never means it is cancelled; the map does not say.

How it works

The timetables

Infofer publishes one XML file per operator and timetable year in the data.gov.ro organisation sc-informatica-feroviara-sa. The server asks the portal's catalogue (CKAN) which datasets exist, so a new operator is picked up without a change here, and reads every file whose year range ends this year or later. A timetable year runs from the second Sunday of December to the Saturday before the next one, so in December the ending and the starting year are both loaded, and each day is answered from the one in force. A dataset with no current file (Regiotrans Brașov and Calea Ferată din Moldova stopped publishing) is listed as skipped by operators. The catalogue is read again every six hours, and a file is downloaded again only when it changed.

Each train in the XML is a list of sections between consecutive stations with departure and arrival times in seconds of the day, and a calendar of date ranges with weekdays. The server keeps the stations where passengers get on or off, counts the times past midnight, and treats public holidays as the gaps between ranges, as Infofer writes them. A train is on a day's station board when it is at that station on that day, even if it left its first station the day before.

Journeys

Journeys come from the Connection Scan Algorithm over every operator's trains running that day, the two days before and the day after. Each search finds the earliest arrival; the server repeats it from later departures, adds the direct trains on their own, and keeps the journeys that no other beats on every count.

Live delays

live_trains reads https://mersultrenurilor.infofer.ro/ro-RO/Trains/LoadMapPartial, the data behind Infofer's live map: every running train's delay, an position (mostly estimated) and when it was last reported. It needs no key and no captcha. The server reads it at most once a minute, and only when the tool is called. The pages of Infofer's site that show platforms and the actual time at each station are protected by a captcha, and this server does not request them.

Limitations

  • Platforms and cancellations are not available. The timetables do not hold platforms, and the live map shows neither.
  • Live data is unofficial. Most positions are estimated from traffic control reports; some trains send their own GPS fix, and position_is says which. Delays are as the map shows them at that minute. This server is not affiliated with Infofer, CFR or any operator. Infofer's site terms ask for written consent before its content is used commercially: ask them before you build a product on live_trains.
  • The timetable is the yearly plan. Engineering works, replacement buses and changes made during the year appear only when Infofer publishes a new file.
  • Times are scheduled times. Fares, seat availability and tickets are out of scope.
  • Attribution: timetables © Informatică Feroviară S.A., published on data.gov.ro under each dataset's licence (OGL-ROU-1.0 for most, CC BY 4.0 for Ferotrafic TFI; operators lists each).

Other servers for Romanian trains

Searched 2026-12-03. Neither Infofer nor any operator publishes an MCP server or an API, and no community MCP server for Romanian trains was found. Servers exist for other countries' railways (Deutsche Bahn, SNCF, SBB, National Rail), none for Romania.

Open projects read the same data without MCP:

  • mariuscomper/romania-rail-gtfs converts the 2025-2026 timetables to a static GTFS snapshot, with notes on the data's method and licences.
  • vasile/data.gov.ro-gtfs-exporter (Ruby) exports the XML to GTFS.
  • zandaulion/intarzieri (Python) shows delays, with the XML's fields documented in its README.

This one exists for what none of them does: it reads every operator's current timetables straight from data.gov.ro, follows the yearly change in December by itself, plans journeys across operators, and puts live delays beside the timetable, as tools an assistant can call.