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

@railroute-ts/mcp

v0.2.0

Published

Model Context Protocol server exposing railroute-ts rail-route tools (rail_route, rail_route_alternatives, rail_station_search) for Europe and India to AI agents.

Readme

@railroute-ts/mcp

npm version license

A Model Context Protocol server that exposes railroute-ts to AI agents, so they can compute real railway routes across Europe, India, North America and China ("how far is Rotterdam to Genoa by rail, and does it cross a gauge break?") instead of guessing.

It is a thin wrapper over the railroute-ts public API — no new routing logic. Everything runs locally over stdio; the Europe, India and China (OpenStreetMap) and North America (FRA/BTS NARN) rail networks are bundled, so there are no API keys and no network calls.

Pairs with @searoute-ts/mcp for multimodal sea + rail freight distance and emissions.

Tools

rail_route

Shortest railway route between two points. Returns distance in km, optional duration, gauge changes, train-ferry km, snap distances and the route GeoJSON.

| Argument | Type | Notes | | --- | --- | --- | | origin, destination | station name / UIC code string or [lon, lat] | required | | network | "europe" | "corridor" | "india" | "north-america" | "china" | "cis" | "eurasia" | default europe; corridor = Rhine-Alpine only, faster; india = Indian Railways mainline, accepts IR codes (NDLS, CSMT, MAS, HWH); north-america = US/Canada/Mexico (FRA NARN, coordinates only); china = mainland China + Mongolia incl. HSR; cis = Russia/Kazakhstan/Belarus/Ukraine/Caucasus/Central Asia; eurasia = china + cis + europe merged for land-bridge routes | | speedKmh | number | fills an estimated duration in hours | | electrifiedOnly | boolean | only electrified track | | ferries | boolean | false forbids train ferries (Messina, Rostock–Trelleborg …) | | gaugeChangePenaltyKm | number | extra km per gauge break, to discourage them | | maxSnapDistanceKm | number | reject inputs too far from the rail network | | includeGeometry | boolean | include the route GeoJSON (default true) |

rail_route_alternatives

Up to k distinct routes (Yen's K-shortest), sorted by distance — e.g. Gotthard vs. Lötschberg–Simplon across the Alps. Same options as rail_route; geometry off by default.

rail_station_search

Substring search over the bundled stations — 12,886 European (OSM uic_ref) and 8,476 Indian (OSM ref = Indian Railways code) — or an exact code. Returns name, UIC code and coordinates — resolve "vienna main station" to Wien Hauptbahnhof before routing. Coverage follows OSM tagging: strong in DE/AT/CH/FR/PL/IT, weak in Portugal and Sweden (pass [lon, lat] there).

Install & run

npm install -g @railroute-ts/mcp   # or use npx, below

Claude Code / claude CLI

claude mcp add railroute -- npx -y @railroute-ts/mcp

Claude Desktop / any MCP client

{
  "mcpServers": {
    "railroute": {
      "command": "npx",
      "args": ["-y", "@railroute-ts/mcp"]
    }
  }
}

Then ask: "Rail distance from Wien Hauptbahnhof to Berlin Hauptbahnhof at 80 km/h?"Rail route: 754.14 km, ~9.43 h.

Multimodal with searoute

Add both servers and the agent can chain them:

Shanghai → Rotterdam by sea (sea_route, ~19,700 km via Suez), then Rotterdam → Genoa by rail (rail_route, ~1,180 km via the Gotthard base tunnel).

Development

npm install
npm test        # vitest, exercises the tools directly (no MCP transport)
npm run dev     # tsx src/index.ts — stdio server

License

MIT © Mayur Rawte. Network data © OpenStreetMap contributors, ODbL.