A public, read-only Model Context Protocol server that lets AI agents query both live and scheduled Amtrak transit data:
| Tool | Description |
|---|---|
get_feed_header | Feed metadata: version, timestamp, and counts of trip updates / vehicles / alerts. |
get_trip_updates | Real-time arrival/departure predictions. Filters: routeId, tripId. |
get_vehicle_positions | Live train positions (lat/long, bearing, speed, current stop). Filters: routeId, tripId, vehicleId. |
get_service_alerts | Active service alerts / advisories. Filter: routeId. |
| Tool | Description |
|---|---|
get_routes | List routes. Filters: routeId, query (name search). |
get_stops | List stations. Filters: stopId, query (name search), or lat/lon/radiusKm (nearby). |
get_trips | List scheduled trips. Filters: routeId, tripId, headsign, limit. |
get_trip_schedule | Full itinerary of a trip: stops in order with scheduled times. Requires tripId. |
get_stop_departures | Scheduled departures/arrivals at a station. Requires stopId, optional routeId. |
get_calendar | Service days/date range for a tripId or serviceId. |
get_agency | Transit agency info. Filter: agencyId. |
Realtime times are ISO-8601; static schedule times are HH:MM:SS; delays are in seconds.
get_feed_header, get_trip_updates,
get_vehicle_positions, get_service_alerts) share a single 60-second cache
of the raw GTFS-RT feed, stored in SQLite. The upstream feed is fetched at most
once per minute; every tool reads from the same cached copy.refresh-gtfs.ts interval, which re-downloads the GTFS.zip and re-ingests via
ingest-gtfs.ts. You can also run ingest-gtfs.ts manually at any time.Point your MCP client at the server's URL (streamable HTTP transport). For example, in a Claude Code / MCP config:
{ "mcpServers": { "amtrak-gtfs": { "type": "http", "url": "https://<your-subdomain>.val.run" } } }
You can also test it quickly in the Cloudflare MCP playground.
Ask your agent: "Where is Amtrak train 287743 right now, and what are its upcoming stops?"
It will call get_vehicle_positions and get_trip_updates (live) and
get_trip_schedule (scheduled) to answer.
@modelcontextprotocol/server), compatible with
MCP 2.0 (2026-07-28 spec) and the legacy spec.