SuperAPIAI Directory

ns-mcp-server

github.com · AI developer platforms

Dutch Railways (NS) travel information, schedules and real-time updates.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

Purpose

ns-mcp-server is a Model Context Protocol (MCP) server designed to turn Claude AI into a Dutch railway travel expert. It connects Claude with real-time travel information from the Dutch railway (NS), enabling the AI assistant to query train schedules, delays, disruptions, fares, and station facilities, among other things, helping users plan train travel in the Netherlands.

Main capabilities

The server provides the following endpoint capabilities through the official NS API:

Real-time train information

  • Departure information: Get real-time departure information, including platform numbers, delays, and travel notes.
  • Arrival information: Get information on upcoming arriving trains, including origin station, platform changes, and status updates.
  • Trip planning: Find optimal travel routes, including transfers and real-time updates.
  • Service updates: Check disruptions, maintenance work, and engineering activities.

Fare information

  • Fares: Get accurate prices for one-way and round-trip journeys.
  • Travel class: Compare first-class and second-class prices.
  • Group fares: Calculate adult and child fares.
  • Discount options: View joint travel discounts and special offers.
  • Validity details: View ticket validity and travel conditions.

Station information

  • Station details: Get comprehensive station information, including facilities and accessibility features, platform layout and track information, OV-fiets (bicycle rental) availability, location, and arrival details.

Additional features

  • Multilingual support: Information is provided in Dutch and English.
  • Flexible queries: Search by station name, code, or UIC identifier.
  • Time zone handling: Correctly handle time zones for international stations.
  • Status updates: Track changes, delays, and cancellations in real time.

How to use

The server can be installed in three ways:

  1. Use Claude Desktop with the NPM package: Update the Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json), the API key can be obtained from the NS API Portal.
  2. Use Smithery: Automatically install the NS Travel Information Server via Smithery.
  3. Manual installation: Clone the repository, install dependencies (npm install), copy the example environment file (cp .env.example .env), in the .env file add the NS API key (NS_API_KEY=your_api_key_here), then update the Claude configuration file, replacing /path/to/ns-server with the actual installation path, and add the NS API key in the env section (available from https://apiportal.ns.nl/product#product=NsApp After updating the configuration, restart Claude Desktop for the changes to take effect.

Use cases

This server is suitable for a variety of real-world scenarios, such as:

  • Checking whether frequently used trains are on time (e.g., "Is my usual 8:15 train from Almere to Amsterdam on time?").
  • Checking whether there are delays on a specific route (e.g., "Are there delays on the Rotterdam-Den Haag route today?").
  • Finding alternative routes when the direct line is under maintenance (e.g., "If the direct line is under maintenance, what is the best alternative route to Utrecht?").
  • Planning arrival times (e.g., "Which train should I take to arrive at my office at Amsterdam Zuid before 9 o'clock?").
  • Considering the number of transfers (e.g., "Which route to Amsterdam has the fewest transfers with a stroller?").
  • Checking first and last trains (e.g., "What is the earliest train I can take to attend a 10 o'clock meeting in The Hague?" or "What time is the last train back to Groningen after a night out in Amsterdam?").
  • Checking whether weekend engineering works affect Monday classes.
  • Checking station facilities (e.g., "Does Utrecht Centraal have OV-fiets bicycles?" or "Is Eindhoven Strijp-S station wheelchair accessible, and what platforms does it have?").
  • Checking arrival information (e.g., "Which trains arrive at Utrecht Centraal in the next hour?" or "Did the train from Venlo to Schiphol Airport arrive on time?").
  • Checking fares (e.g., "What is the first-class fare from Amsterdam to Rotterdam?" or "What is the price for 2 adults and 1 child to Den Haag?").

Limitations

Using this server requires an NS API key, which must be obtained from the NS API Portal. The project uses the MIT license. Regarding specific details such as API call limits, rate limits, or data update frequency, official information is not currently available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools