Use with Claude and other AI assistants
The archive has an MCP server. Connect it once and ask your assistant which countries have live train data, what a file contains, or for the code to load a month of delays.
Server address
https://www.train-archive.eu/mcp
Your assistant asks you to sign in the first time, with the same email code as this site. It then acts as you: its requests appear on your Usage page, and you can disconnect it from the Tokens page.
Claude
Claude on the web and in the desktop app
- Open Settings, then Connectors, and choose Add custom connector.
- Name it European Train Archive and paste
https://www.train-archive.eu/mcpas the URL. - Choose Connect and sign in with your email code.
Claude Code
claude mcp add --transport http train-archive https://www.train-archive.eu/mcp
Then run /mcp in Claude Code and choose train-archive to sign in.
Other MCP clients
Any client that speaks MCP over streamable HTTP with OAuth works: add https://www.train-archive.eu/mcp as a remote server and sign in when asked. Clients without OAuth can send an API token instead:
{
"mcpServers": {
"train-archive": {
"type": "http",
"url": "https://www.train-archive.eu/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
Create the token on the Tokens page.
What the assistant can do
list_sources- Sources by country, by kind of data kept, official or community.
get_coverage_summary- What the archive holds across Europe, and since when.
get_source_info- Date range, files, gaps, feed freshness and timetable versions of one source.
list_files- Addresses of the files for a source and a range of days.
preview_file- Columns and a few rows of one file, without downloading it.
connection_risk- How a planned journey would have gone over the past weeks: delays per leg, how often each change was missed, the next trains if it is.
plan_download- DuckDB, Polars and Python code that reads a range of days with your token.
get_guide- How the data is shaped and how to combine it: files to read, matching delays to timetables, stations across countries, which packages to use, known pitfalls.
get_api_token- A token for that code, saved in your environment rather than shown in the chat.
Files never pass through the conversation: the assistant looks at summaries and previews, then runs code that reads the data directly.