mcpField
D
deutsche-bahn

deutsche-bahn

github.com/borskiOther78074 installsUpdated 2d ago
Repository

About deutsche-bahn

deutsche-bahn is a Node.js skill for searching German and some international train schedules with db-vendo-client. It supports station lookup, journey planning, and departure boards, but not fares or bookings.

Key features

  1. 01Find stations by name
  2. 02Plan routes between stations
  3. 03Check station departure boards
  4. 04Set date, time, and result count

Use cases

  1. 01Plan rail connections from European airports to Germany
  2. 02Check ICE or TGV schedules between major cities
  3. 03View upcoming departures at a station

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/borski/travel-hacking-toolkit --skill deutsche-bahn

After installing, type/deutsche-bahnin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

package-lock.json
package.json
scripts/
search_trains.mjs

Details

From the project README

Deutsche Bahn Skill

Search German train schedules and plan journeys using the db-vendo-client library (open-source client for bahn.de APIs).

No API key required. No Docker. Just Node.js.

Source: db-vendo-client — wraps bahn.de's internal APIs.

Setup

cd skills/deutsche-bahn && npm install

Commands

Station Search

Find station IDs by name:

node skills/deutsche-bahn/scripts/search_trains.mjs stations "Frankfurt Flughafen"
Journey Planning

Search train routes between two stations (by ID or name):

# By station ID
node skills/deutsche-bahn/scripts/search_trains.mjs journeys 8070003 8000376 --date 2026-05-05 --time 10:00 --results 5

# By station name (auto-resolves to ID)
node skills/deutsche-bahn/scripts/search_trains.mjs journeys "Frankfurt Airport" "Germersheim" --date 2026-05-05
node skills/deutsche-bahn/scripts/search_trains.mjs journeys "Amsterdam Centraal" "Mannheim Hbf" --date 2026-05-15 --time 09:00
node skills/deutsche-bahn/scripts/search_trains.mjs journeys "Paris Est" "Mannheim" --date 2026-05-05
Departure Board

Check upcoming departures from any station:

node skills/deutsche-bahn/scripts/search_trains.mjs departures "Mannheim Hbf" --results 10
node skills/deutsche-bahn/scripts/search_trains.mjs departures 8070003 --date 2026-05-05 --time 14:00

Key Station IDs

German Airports
AirportStation IDStation NameNotes
Frankfurt (FRA)8070003Frankfurt(M) Flughafen FernbfLong-distance (ICE/TGV)
Frankfurt (FRA)8070004Frankfurt(M) Flughafen RegionalbfRegional trains
Munich (MUC)8004154München Flughafen TerminalS-Bahn to München Hbf
Düsseldorf (DUS)8001585Düsseldorf FlughafenS-Bahn + RE
Cologne/Bonn (CGN)8003330Köln/Bonn FlughafenICE station
Berlin (BER)8089021Flughafen BER Terminal 1-2FEX + RE + S-Bahn
Stuttgart (STR)8005773Flughafen/MesseS-Bahn to Stuttgart Hbf
Hamburg (HAM)8002549Hamburg AirportS-Bahn
Major Stations
CityStation IDName
Frankfurt Hbf8000105Frankfurt(Main)Hbf
Mannheim Hbf8000244Mannheim Hbf
Germersheim8000376Germersheim
Karlsruhe Hbf8000191Karlsruhe Hbf
Stuttgart Hbf8000096Stuttgart Hbf
München Hbf8000261München Hbf
Berlin Hbf8011160Berlin Hbf
Köln Hbf8000207Köln Hbf
Düsseldorf Hbf8000085Düsseldorf Hbf
Hamburg Hbf8002549Hamburg Hbf
Heidelberg Hbf8000156Heidelberg Hbf
Speyer Hbf8000076Speyer Hbf
International Stations (reachable by DB trains)
CityStation IDNameTrain from Germany
Amsterdam Centraal8400058Amsterdam CentraalICE from Frankfurt ~4h
Paris Est8700011Paris EstTGV/ICE from Frankfurt ~4h
Zürich HB8503000Zürich HBICE from Frankfurt ~4h
Basel SBB8500010Basel SBBICE from Mannheim ~2.5h
Strasbourg8700018StrasbourgTGV/RE from Karlsruhe ~40min
Brussels Midi8814001Bruxelles-Midi/Brussel-ZuidICE from Frankfurt ~3.5h
Wien Hbf8100003Wien HbfICE from München ~4h
Praha hl.n.5400014Praha hlavní nádražíEC from München/Berlin

Common Airport-to-Germersheim Routes

From AirportRouteTypical DurationTransfers
Frankfurt (FRA)ICE → Mannheim → S3 Germersheim78–105 min1
Stuttgart (STR)S-Bahn → Stuttgart Hbf → ICE Mannheim → S3~2h 30m2
Munich (MUC)S-Bahn → München Hbf → ICE Mannheim → S3~3h 45m2
Paris CDGRER → Paris Est → TGV Mannheim → S3~4h 30m2-3
Amsterdam (AMS)Train → Amsterdam CS → ICE Mannheim → S3~5h2
Zürich (ZRH)Train → Zürich HB → ICE Mannheim → S3~4h2

Parameters

ParamFlagDefaultDescription
Date--dateTodayYYYY-MM-DD format
Time--time08:00HH:MM, departure time
Results--results5 (journeys), 10 (departures)Number of results

Coverage

  • All German trains: ICE, IC/EC, RE, RB, S-Bahn
  • International: ICE to AMS/Brussels/Paris/Zürich/Wien, TGV to Paris, Eurostar connections
  • Local transit: S-Bahn, U-Bahn, trams, buses (if DB data includes them)

Limitations

  • No pricing. DB does not expose ticket prices via API. For fares, check bahn.de directly or use the Trainline API.
  • Rate limits. DB's backend enforces low rate limits. Keep queries reasonable (a few per minute, not hundreds).
  • Schedule data only. Real-time delays are shown when available, but historical data is not retained.
  • Future schedules. DB typically publishes schedules ~6 months out. Dates beyond that may return no results.

When to Use

Load this skill when:

  • Planning train connections from a European gateway airport to a destination in Germany
  • Checking ICE/TGV schedules between major cities
  • Finding last-mile S-Bahn/regional connections (e.g., Mannheim → Germersheim)
  • Comparing train travel time from different airports to decide which to fly into
  • Looking up departure boards at a station

Do NOT use for:

  • Booking tickets (search only — book at bahn.de or trainline.com)
  • Flight searches (use Duffel, Ignav, Skiplagged, etc.)
  • Pricing (not available via API)

Comments

Markdown supported