npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flo-thereal/interrail-mcp-server

v2.1.0

Published

MCP server for Interrail/Eurail timetable search, pass pricing, and reservation checks

Readme

Interrail MCP Server

CI npm version Node.js >=20 License: MIT

An MCP server for planning Interrail/Eurail trips with AI assistants. It wraps the same timetable backend used by interrail.com/timetable and adds pass pricing, reservation checks, and currency conversion.

Disclaimer: This is an unofficial client for the Eurail timetable API. It is not affiliated with or endorsed by Eurail/Interrail. Use at your own discretion.

Features

  • Live timetable search across Europe via the official Interrail timetable backend
  • Reservation intelligence — knows which trains (TGV, Eurostar, Nightjet, Frecciarossa, ...) need seat reservations with an Interrail pass and what they cost
  • Pass pricing for all 2026-season pass types, with youth/senior discounts
  • Currency conversion for 14+ European currencies with live rates and 1-hour caching
  • Robust by design — 30s timeouts with friendly errors, fully tested offline (89 tests, ~99% line coverage), plus a weekly live-API probe in CI

Tools

| Tool | Description | |------|-------------| | search_stations | Search European stations and get UIC IDs | | find_journeys | Find train connections between two stations | | check_pass_validity | Check reservation requirements and estimated costs per leg | | get_pass_pricing | Look up Interrail pass prices by age and class | | convert_currency | Convert amounts between European currencies |

See TOOLS_SPEC.md for detailed schemas and behavior.

Install

npm install -g @flo-thereal/interrail-mcp-server

Or run without installing:

npx -y @flo-thereal/interrail-mcp-server

Requires Node.js 20+.

MCP configuration

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "interrail": {
      "command": "npx",
      "args": ["-y", "@flo-thereal/interrail-mcp-server"]
    }
  }
}

Claude Code

Add to .mcp.json:

{
  "mcpServers": {
    "interrail": {
      "command": "npx",
      "args": ["-y", "@flo-thereal/interrail-mcp-server"]
    }
  }
}

OpenCode

Add to opencode.json:

{
  "mcp": {
    "interrail": {
      "type": "local",
      "command": ["npx", "-y", "@flo-thereal/interrail-mcp-server"],
      "enabled": true
    }
  }
}

Example prompts

Once connected, just ask your AI assistant things like:

  • "Find trains from Paris to Stuttgart next Tuesday morning and tell me if I need seat reservations with my Interrail pass."
  • "I'm 26 — how much is a 7-day Interrail pass, and is 1st class worth it?"
  • "Plan a night-train leg from Vienna to Venice and estimate the couchette supplement."
  • "Convert 2,400 CZK to EUR."

Typical workflow

  1. search_stations — resolve city/station names to UIC IDs
  2. find_journeys — get connection options with times and train names
  3. check_pass_validity — see which legs need reservations and estimated costs
  4. get_pass_pricing — compare pass options for your age/class
  5. convert_currency — budget in local currencies

Development

git clone https://github.com/flo-thereal/interrail-mcp-server.git
cd interrail-mcp-server
npm install
npm run build
npm start

| Command | What it does | |---|---| | npm run lint | Typecheck src/ and tests/ (no emit) | | npm run build | Compile src/ to dist/ | | npm test | Run the test suite (offline, mocked network) | | npm run test:coverage | Tests + coverage report (enforced thresholds) | | npm run probe | Smoke-test the real upstream APIs (needs npm run build first) |

Project structure

src/
  stdio-server.ts    entry point (stdio transport)
  mcp-server.ts      tool definitions + request handlers
  eurail-client.ts   HTTP client for the Eurail timetable API
  formatting.ts      API response → tool output shaping
  reservations.ts    reservation/supplement rules per train type
  pricing.ts         2026-season Interrail pass price table
  currency.ts        exchange-rate fetching, caching, conversion
tests/
  unit/              pure-logic tests (mocked fetch)
  integration/       end-to-end MCP protocol tests (in-memory transport)
  fixtures/          recorded-style API payloads
scripts/
  probe-live-api.mjs live upstream smoke test

Testing philosophy

The suite runs fully offline: all HTTP is stubbed, and the integration tests speak real MCP to the server over the SDK's in-memory transport — no processes spawned. Because the upstream Eurail API is unofficial and can change without notice, a weekly GitHub Action probes the live APIs and fails loudly (email notification) if their shape changes.

Releasing

Releases are published to npm by GitHub Actions via trusted publishing (OIDC — no long-lived npm tokens).

One-time setup: on the package access page, add GitHub Actions as a trusted publisher for the flo-thereal/interrail-mcp-server repository with workflow filename publish.yml (the filename must match exactly).

To release: bump version in package.json, create a GitHub release with a matching vX.Y.Z tag, and the publish workflow runs lint + tests and publishes with provenance.

License

MIT