Trainrouter Atlas
π βοΈ - World train-route atlas for AI assistants β search 744 notable train routes (high-speed, scenic, night trains) and get facts and geometry for each. Hosted at https://trainrouter.com/mcp (Streamable HTTP, no auth); data CC BY 4.0.
Quick Install
{
"mcpServers": {
"flightmussy-trainrouter-atlas": {
"command": "npx",
"args": [
"-y",
"flightmussy-trainrouter-atlas"
]
}
}
}Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.
Documentation Overview
TrainRouter Atlas β the world's legendary train routes, as open data
961 train routes Β· 118 countries Β· β 432,800 km of route β every route with its key facts and hand-traced geometry, from trainrouter.com, the interactive world railway map.
High-speed spines (Eurostar, TGV, Shinkansen, AVE), classic long-distance runs (Trans-Siberian, California Zephyr), night trains (Nightjet, the Ghan) and the scenic lines people fly in just to ride (Glacier Express, Bernina Express, the Jacobite).
πΊοΈ Explore it interactively: trainrouter.com
π€ Use it from an AI assistant: free MCP server at https://trainrouter.com/mcp (how to connect) β or run it from this repo: npm install && npm start (mcp/)
Files
| File | Contents |
|---|---|
data/routes.csv | One row per route β all facts, no geometry |
data/routes.json | Same records with structured country objects |
data/routes.geojson | LineString per route (lon/lat waypoints) + all facts as properties |
Schema
| Field | Type | Notes |
|---|---|---|
id | string | Stable slug, e.g. glacier-express |
name | string | Route/service name |
from, to | string | Terminus cities |
category | enum | high-speed Β· classic Β· night Β· scenic |
train | string | Rolling stock, e.g. e320 Β· Class 374 |
operator | string | Operating company |
distance_km | number | Route length |
top_speed_kmh | number | Service top speed |
duration | string | Published journey time, e.g. 2 h 16 min |
opened | number | Year the line/service entered service |
pax_per_year | number|null | Approx. annual ridership where published |
countries_iso / countries | string | |-separated, in travel order (CSV); structured objects in JSON |
highlight | string | One-line description of what makes the route legendary |
fame_rank | number | 1 = most famous (TrainRouter renown ranking) |
url | string | The route's page on trainrouter.com |
Quick start
import pandas as pd
routes = pd.read_csv("data/routes.csv")
routes.nsmallest(10, "fame_rank")[["name", "from", "to", "distance_km"]]
import geopandas as gpd
gdf = gpd.read_file("data/routes.geojson")
gdf.plot(column="category", figsize=(16, 8))
Sources, accuracy & provenance
- No upstream dataset. This atlas is hand-built β not derived from OpenStreetMap, Overpass, Wikidata, Natural Earth or any other licensed dataset β so it carries no third-party licensing obligations and the CC BY 4.0 licence is the author's to grant.
- Geometry is hand-traced at map scale: each route's
LineStringis a set of hand-placed[lon, lat]waypoints following the line's real corridor through its stops β deliberately schematic (smoothed for display), not survey-grade alignment, and not extracted from OSM or any geodata source. - Facts are approximate published values: distance, top speed, journey time, operator, opening year and approximate ridership are compiled from public references (operators' own figures, timetables, press material, encyclopaedic articles). Individual facts like these aren't copyrightable; the licence covers the curated compilation. Good for exploration and visualization, not operations.
- Curated, not exhaustive: the world's notable routes, not every line on earth. Route names and the one-line
highlights are the author's own wording. - Deliberately excluded (they live only on the site, to keep provenance clean): per-route stories and sights, photos (Wikimedia Commons, separately licensed), and the city-to-city journey guides (derived from public schedule feeds).
- Basemap β data: the interactive site renders these routes over OpenFreeMap (OpenStreetMap) tiles, but those tiles are not part of this dataset β the geometry here is the author's own hand-traced lines. OSM Β© OpenStreetMap contributors.
License & attribution
- Data (
data/): CC BY 4.0 β free to use, share and adapt, with attribution to TrainRouter. A link tohttps://trainrouter.com(or the specific route page inurl) satisfies attribution. (full notice) - Code (the MCP server in
mcp/): MIT.
Also available on
- Kaggle: kaggle.com/datasets/albanius/world-train-routes-trainrouter-atlas
- Hugging Face: huggingface.co/datasets/Flightmussy/trainrouter-atlas
- Zenodo (archived, DOI): doi.org/10.5281/zenodo.21322030 β always resolves to the latest version
Citing
TrainRouter Atlas: the world's legendary train routes (2026). trainrouter.com. DOI: 10.5281/zenodo.21322030. https://github.com/Flightmussy/trainrouter-atlas
Updating
The data is generated from the TrainRouter atlas source. New versions land here first; publishing a GitHub release mints a fresh Zenodo DOI and (once the repo's KAGGLE_API_TOKEN/HF_TOKEN secrets are configured) syncs the Kaggle and Hugging Face mirrors automatically via sync-mirrors.yml.
Also in this repo
mcp/β source of the TrainRouter MCP server (live athttps://trainrouter.com/mcp, listed in the Official MCP Registry ascom.trainrouter/atlas), which serves this atlas as tools for Claude and other MCP clients.