The world railway atlas as MCP tools: notable train routes, night trains, journey times.
com.trainrouter/atlas MCP Server
The com.trainrouter/atlas MCP server exposes the “World Train Map Atlas” as MCP tools, providing notable train routes, night trains, and journey times. The dataset is positioned as open data with route key facts and geometry derived from worldtrainmap.com.
🛠️ Key Features
Notable train routes as tool-accessible data
Night trains and journey-time information
Route key facts plus geometry per train route
Open-data focus, aligned with worldtrainmap.com
🚀 Use Cases
Build geo-based railway route features using route geometry
Support travel and rail-planning workflows with journey times
Filter or present routes across countries and train categories (e.g., night trains)
⚡ Developer Benefits
Structured dataset with key facts and GIS-ready geometry
Broad coverage: 961 train routes across 118 countries (≈432,800 km)
⚠️ Limitations
Documentation excerpt does not specify tool input/output formats, beyond routes, night trains, journey times, and geometry
Free-text search over every route in the World Train Map atlas — matches route name, cities, train name, operator and countries, with optional category/country filters. Accent-insensitive; every word of the query must match. Returns compact per-route facts with id and worldtrainmap.com URL, sorted by renown with route-name matches first; with no query it lists the whole atlas by renown. Use get_route with a returned id for full detail, famous_routes for a ready-made top list, city_pair for A-to-B journey times.
Parameters4
query
string
optional
Free text matched against name, cities, train, operator and countries — e.g. "glacier", "Tokyo", "Amtrak". Omit to browse all routes by renown.
category
string
optional
Only routes in this category.
country
string
optional
Only routes crossing this country — full name or 2-letter ISO code ("Switzerland" or "CH").
limit
integer
optional
Max routes returned. Default 10, max 50.
Raw schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Free text matched against name, cities, train, operator and countries — e.g. \"glacier\", \"Tokyo\", \"Amtrak\". Omit to browse all routes by renown."
},
"category": {
"type": "string",
"enum": [
"high-speed",
"classic",
"night",
"scenic",
"heritage",
"mountain",
"luxury"
],
"description": "Only routes in this category."
},
"country": {
"type": "string",
"description": "Only routes crossing this country — full name or 2-letter ISO code (\"Switzerland\" or \"CH\")."
},
"limit": {
"type": "integer",
"description": "Max routes returned. Default 10, max 50."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
get_route
Full record for one atlas route by exact id: distance, fastest time, top speed, operator, rolling stock, opening year, ridership, story, on-route sights, photo and page URL, plus country-hub links. An unknown id returns up to 5 close-match suggestions instead of failing. Use search_routes first when you only have a name or city.
Parameters1
id
string
required
Exact route id in kebab-case, e.g. "glacier-express" — take it from search_routes, famous_routes or routes_in_country results.
Raw schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Exact route id in kebab-case, e.g. \"glacier-express\" — take it from search_routes, famous_routes or routes_in_country results."
}
},
"required": [
"id"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
famous_routes
The world's most famous train journeys in World Train Map's renown order (rank 1 = most famous: Trans-Siberian, Glacier Express, Orient Express lineage, Shinkansen…), as compact facts with id and URL per route. Best first call for bucket-list and "greatest train trips" questions; use search_routes to find something specific, get_route for full detail on one route.
Every atlas route crossing one country, sorted by renown, plus that country's worldtrainmap.com hub URL when it exists. An unrecognised country returns an error, not an empty list. Use for "trains in X" questions; use search_routes to combine a country with text or category filters, night_trains for sleepers only.
Parameters1
country
string
required
Country name or 2-letter ISO code, e.g. "Japan" or "JP". Accent-insensitive; unambiguous partial names resolve.
Raw schema
{
"type": "object",
"properties": {
"country": {
"type": "string",
"description": "Country name or 2-letter ISO code, e.g. \"Japan\" or \"JP\". Accent-insensitive; unambiguous partial names resolve."
}
},
"required": [
"country"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
night_trains
Sleeper routes from the atlas, sorted by renown — all of them by default, or only those starting or ending in a given city — with the per-city night-train guide URL when one exists. Use for overnight and sleeper questions; city_pair for concrete A-to-B times; search_routes for other route categories.
Parameters1
city
string
optional
Optional city filter matched against route endpoints (accent-insensitive), e.g. "Vienna".
Raw schema
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "Optional city filter matched against route endpoints (accent-insensitive), e.g. \"Vienna\"."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
city_pair
Journey facts between two cities (European coverage): fastest and typical duration, whether direct trains run, fewest changes, operators and the guide URL — plus legendary atlas routes on that corridor. Direction-insensitive. Figures are sampled from public schedule data, not live times — treat as planning estimates. An uncovered pair returns an error with a search_routes tip.
Parameters2
from
string
required
Origin city, e.g. "London". City name only, no station needed; accent-insensitive.
to
string
required
Destination city, e.g. "Paris".
Raw schema
{
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Origin city, e.g. \"London\". City name only, no station needed; accent-insensitive."
},
"to": {
"type": "string",
"description": "Destination city, e.g. \"Paris\"."
}
},
"required": [
"from",
"to"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
atlas_stats
One-call snapshot of what the World Train Map atlas covers: total route count, countries, combined length in km, the category list, number of city-pair guides, data snapshot date, and direct URLs to the main browse pages (world map, all routes, Europe/USA maps, night trains, scenic, by-country, city-to-city). Takes no parameters. Call it to learn what this server can answer, to cite dataset totals, or to link a browse page — it returns no individual routes; use search_routes or famous_routes for those.
1,538 train routes · 120 countries · ≈ 531,400 km of route, every route with its key facts and its line, from worldtrainmap.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), the scenic lines people fly in just to ride (Glacier Express, Bernina Express, the Jacobite), and the heritage and mountain railways around them.
🗺️ Explore it interactively:worldtrainmap.com
🤖 Use it from an AI assistant: free MCP server at https://worldtrainmap.com/mcp (how to connect), or run it from this repo: npm install && npm start (mcp/)
The site was renamed. It was TrainRouter at trainrouter.com until 11 August 2026 and is now World Train Map at worldtrainmap.com. The old domain redirects path for path, so old links still work, and https://trainrouter.com/mcp still answers directly rather than redirecting, because JSON-RPC clients do not follow redirects. The repository, the Zenodo DOI and the MCP registry name (com.trainrouter/atlas) keep their old identifiers on purpose: renaming them would break more than it would tidy.
Two licences
Since the 8 November 2026 cut (release v1.2.0) the files carry two licences, because the lines and the facts come from different places:
The licence notice for the three files, written by the exporter
The lines are derived from OpenStreetMap: 1,396 of the 1,538 are drawn node for node from OSM route relations, 26 are snapped onto the OSM rail graph by map matching, and the other 116 have no record of their origin, which is not evidence that they are ours, so they are treated as derived too. The whole GeoJSON is therefore ODbL, including the facts repeated in its properties; the same facts stay CC BY 4.0 in the CSV and JSON. If you only need the facts, use those two files and the ODbL never applies.
data/ in this repo, Hugging Face, Kaggle (facts only)
1,538
8 November 2026
the same routes as the live site that day
Zenodo (the citable DOI)
1,538
8 November 2026
release v1.2.0
The MCP server
1,516
7 October 2026
deployed separately from the site, so it lags it a little; its atlas_stats tool reports the current figure
Earlier releases (v1.0.0 and v1.1.0 on 12 July, the 23 July cut of 961 routes) labelled every file CC BY 4.0. The 12 July lines were hand-placed, but the 23 July cut already held a handful of corridors traced from OpenStreetMap (Brenner, Oslo–Göteborg, Oslo–Stockholm, the Pustertalbahn), and those lines were ODbL all along; this release is the first that says so file by file.
Service top speed, where a credible figure exists (1,262 of 1,538 rows)
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, which is rare: 89 of the 1,538 rows carry one
countries_iso / countries
string
|-separated, in travel order (CSV); structured objects in JSON
highlight
string
One-line description of what makes the route notable
fame_rank
number
1 = most famous (the atlas's own renown ranking)
url
string
The route's page on worldtrainmap.com
Three more properties, in routes.geojson only:
Field
Type
Notes
geometry_source
string|null
osm_relation (drawn from the OSM route relations in osm_relations), osm_map_matched (snapped onto the OSM rail graph), or null where no record of the line's origin exists
osm_relations
string|null
|-separated ids of the OSM relations the line was drawn from, e.g. 2905798 for Eurostar London–Paris
geometry_licence
string
ODbL-1.0 on every feature
The GeoJSON FeatureCollection also carries license and attribution members, so the credit travels with the file.
Facts are compiled from public references, not from any licensed dataset: operators' own figures, timetables, press material and encyclopaedic articles. A few distance and top-speed figures were measured on OpenStreetMap track instead; they are a small, insubstantial extract of the OpenStreetMap database. Individual facts like these aren't copyrightable; the licence covers the curated compilation.
Geometry began as hand-placed waypoints in July 2026 and has since been redrawn from OpenStreetMap: from route relations where mappers describe the service, and by map matching onto the OSM rail graph where they do not. Each feature says which, where a record exists.
Facts are approximate published values: distance, top speed, journey time, operator, opening year and ridership. 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; those tiles are not part of this dataset.
License & attribution
Facts (data/routes.csv, data/routes.json): CC BY 4.0. Credit World Train Map; a link to https://worldtrainmap.com, or to the route page in url, satisfies it.
Zenodo (archived, DOI):doi.org/10.5281/zenodo.21322030, the concept DOI, which always resolves to the latest published release. Zenodo allows one licence label per record, so from v1.2.0 the record is labelled ODbL, which covers the whole archive; the fact files inside it are also CC BY 4.0
Until 24 August 2026 this README and the site linked a Kaggle mirror at kaggle.com/datasets/albanius/.... That account name has never been ours and the link was dead from the day it was written; the mirror above is the real one.
The files are generated from the atlas source by the site's exporter, which writes routes.csv, routes.json, routes.geojson and data/LICENSE together, so the notice cannot drift from the files. New versions land here first; publishing a GitHub release mints a fresh Zenodo DOI and pushes the mirrors via sync-mirrors.yml, whose jobs each skip themselves when their API token is not configured.
Also in this repo
mcp/ — source of the World Train Map MCP server (live at https://worldtrainmap.com/mcp, listed in the Official MCP Registry as com.trainrouter/atlas), which serves the atlas as tools for Claude and other MCP clients. It is deployed from the site's own atlas rather than from data/, and it serves facts only, no geometry. Its atlas_stats tool reports exactly what it is serving.