european-trains-mcp
v0.1.3
Published
MCP server for real-time European train search. Timetables, prices, delays, and booking links across most of Europe.
Maintainers
Readme
european-trains-mcp
Real-time European train search for AI assistants. Search any route the Deutsche Bahn network knows about, that's most of Europe.
What it does
search_trains- find journeys with times, prices, duration, changes, and a booking linkfind_station- search for stations by name with IDs and available servicesget_disruptions- check current delays and cancellations at any station
Tested routes
Berlin > München, Budapest > Wien, Prague > Berlin
Amsterdam > Brussels, Copenhagen > Hamburg, Zagreb > Wien
Budapest > Zell am See, Bucharest > Budapest, Zurich > MilanPrices available on DB-operated services (ICE, IC, RE). Timetables available for ÖBB, MÁV, DSB, SNCB, NS, and more.
Setup
Claude Code
claude mcp add european-trains -- npx -y european-trains-mcpClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"european-trains": {
"command": "npx",
"args": ["-y", "european-trains-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"european-trains": {
"command": "npx",
"args": ["-y", "european-trains-mcp"]
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"european-trains": {
"command": "npx",
"args": ["-y", "european-trains-mcp"]
}
}
}Example
"Find me trains from Budapest to Zell am See tomorrow"
Journey 1 of 5
Budapest-Keleti > Zell am See
Depart: 06:40, Arrive: 13:42
Duration: 7h 2min, 2 changes, EC 342 > RJX 262 > IR 716
Price unavailable
Book: https://www.trainline.com/search?...&outward_time=06:40
Journey 2 of 5
..."Any delays at Berlin Hbf?"
Disruptions at Berlin Hbf: 12 affected departures
FLX 1238 > Hamburg Hbf: +133min (planned 15:08)
ICE 1101 > München Hbf: +5min (planned 15:36)
...Requirements
Node.js 22 or later. Check with node -v. If you use nvm: nvm install 22 && nvm alias default 22.
No API key needed
Uses db-vendo-client to talk directly to Deutsche Bahn's API. No registration, no key.
How it works
The Deutsche Bahn API covers train routes across most of Europe, not just Germany. One query can return journeys from Budapest to Prague, Copenhagen to Hamburg, or Brussels to Amsterdam.
This server wraps that API with caching, retry logic, Zod validation, and booking links.
Affiliate disclosure
Journey results include a Trainline booking link. These don't affect search results or rankings. Data comes from the Deutsche Bahn API.
To disable booking links:
{
"mcpServers": {
"european-trains": {
"command": "npx",
"args": ["-y", "european-trains-mcp"],
"env": { "DISABLE_AFFILIATE": "true" }
}
}
}Roadmap
- [ ] SNCF API for better French coverage and pricing
- [ ] NS API for Dutch pricing
- [ ] Seat availability
- [ ] Return ticket search
Contributing
PRs welcome. Open an issue first for major changes.
License
MIT
