Timetable API Node
Express-based API for Lviv transport timetable data with a read-only MCP endpoint.
Requirements
- Node.js 26 (see
.nvmrc)
Run locally
nvm use
npm install
cp .env.dist .env
make import # first run, and whenever the GTFS feed changes
make startmake import downloads the static GTFS feed (gtfs-import-config.json) and
writes the two stores the server reads: database/Timetable (LokiJS: stops,
routes, shapes, first-stop schedules) and database/gtfs (SQLite: trips and
calendars). Both are gitignored, so a fresh clone has no data until it runs.
make import-slim re-imports only the light tables into SQLite and leaves
database/Timetable alone.
Configuration
All variables are optional; see .env.dist.
| Variable | Default | Purpose |
|---|---|---|
PORT |
8080 |
HTTP port. |
VEHICLES_LOCATION_URL |
https://track.ua-gis.com/gtfs/lviv/vehicle_position |
GTFS-RT vehicle positions feed. |
TRIP_UDPDATES_URL |
https://track.ua-gis.com/gtfs/lviv/trip_updates |
GTFS-RT trip updates feed (the misspelling is the real name). |
MCP_PUBLIC_BASE_URL |
https://api.lad.lviv.ua |
Base URL used in MCP metadata (icon URL). |
NEW_RELIC_LICENSE_KEY |
— | Enables New Relic APM (see Monitoring). |
NEW_RELIC_APP_NAME, NEW_RELIC_LOG_LEVEL |
timetable-api-node, info |
New Relic agent settings. |
PULSE_WORKER_URL, PULSE_SIGNAL_SECRET |
— | Signal a Pulse worker on each /stops/:code/timetable request; both must be set. |
MCP_URL |
https://api.lad.lviv.ua/mcp |
Only for the timetable-mcp stdio proxy: the remote endpoint it forwards to. |






