Back to MCP Catalog

NS Dutch Railways Travel Information MCP Server

Travel & TransportationTypeScript
Access real-time Dutch Railways (NS) train information, schedules, and disruptions
Available Tools

getDepartures

Get real-time departure information for a specific station including platform numbers, delays, and travel notes

getArrivals

Access upcoming train arrivals with origin stations, platform changes, and status updates

planJourney

Find optimal travel routes with transfers and real-time updates

getDisruptions

Check for service disruptions, maintenance work, and engineering activities

getTicketPrices

Get accurate pricing for single and return journeys, including different travel classes

getStationInfo

Access comprehensive station information including facilities, accessibility features, and bike rental availability

Transform your AI assistant into a Dutch railways expert with real-time NS (Nederlandse Spoorwegen) travel information. This server connects Claude to the official NS API, providing up-to-date train schedules, platform information, disruptions, and pricing details for navigating the Netherlands by train. With this MCP, you can check train departures and arrivals, plan optimal routes, get ticket pricing, and access detailed station information including facilities and accessibility features. It's the perfect companion for anyone traveling through the Netherlands by train, whether you're a daily commuter or occasional visitor.

NS Dutch Railways Travel Information

This MCP server provides access to real-time train information from NS (Nederlandse Spoorwegen), the Dutch national railway operator. It allows Claude to fetch accurate train schedules, disruptions, pricing, and station information directly from the official NS API.

Installation Options

You can install this server in three different ways:

Option 1: Using NPM Package with Claude Desktop

  1. First, obtain an NS API key from the NS API Portal
  2. Update your Claude Desktop configuration file located at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "ns-server": {
      "command": "npx",
      "args": [
        "-y",
        "ns-mcp-server"
      ],
      "env": {
        "NS_API_KEY": "your_api_key_here"
      }
    }
  }
}
  1. Replace your_api_key_here with your actual NS API key
  2. Restart Claude Desktop for the changes to take effect

Option 2: Using Smithery

You can install the NS Travel Information Server automatically via Smithery:

npx -y @smithery/cli install ns-server --client claude

Option 3: Installing from Source

  1. Clone the repository: git clone https://github.com/r-huijts/ns-mcp-server.git
  2. Navigate to the directory: cd ns-mcp-server
  3. Install dependencies: npm install
  4. Copy the example environment file: cp .env.example .env
  5. Add your NS API key to the .env file: NS_API_KEY=your_api_key_here
  6. Build the project (if needed)
  7. Update your Claude configuration file:
{
  "mcpServers": {
    "ns-server": {
      "command": "node",
      "args": [
        "/path/to/ns-server/build/index.js"
      ],
      "env": {
        "NS_API_KEY": "your_api_key_here"
      }
    }
  }
}

Make sure to replace /path/to/ns-server with the actual path to your installation and add your NS API key.

Usage Examples

Once installed, you can ask Claude questions about Dutch train travel such as:

  • "Is my usual 8:15 train from Almere to Amsterdam running on time?"
  • "What's the best route from Rotterdam to Utrecht with the fewest transfers?"
  • "Are there any disruptions on the Amsterdam-Eindhoven line today?"
  • "When is the next train from Leiden to Den Haag?"
  • "How much does a first-class ticket from Amsterdam to Rotterdam cost?"
  • "Is there bicycle rental available at Utrecht Centraal station?"
  • "What platform does the train to Schiphol Airport depart from?"
  • "Are there any weekend engineering works that might affect my Monday commute?"

The MCP server will connect to the NS API to fetch real-time information and provide accurate answers to these queries.

Features

This MCP provides comprehensive access to NS train information including:

  • Real-time departures and arrivals with platform numbers, delays, and status updates
  • Journey planning with optimal routes, transfers, and real-time updates
  • Service disruptions including maintenance work and engineering activities
  • Ticket pricing for different travel classes, group options, and discounts
  • Station information including facilities, accessibility features, and bike rental availability

Environment Variables

The only required environment variable is:

  • NS_API_KEY: Your NS API key obtained from the NS API Portal

Limitations

  • This MCP only works with the Dutch railway system (NS)
  • Some features may require specific permissions in your NS API key
  • International train information may be limited compared to domestic routes

Related MCPs

Airbnb Search
Travel & TransportationTypeScript

Search for Airbnb listings and get detailed information

National Parks Service
Travel & TransportationTypeScript

Access real-time information about U.S. National Parks

Flightradar24
Travel & TransportationTypeScript

Real-time flight tracking and monitoring using Flightradar24 data

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.