NS Travel Information MCP Server

NS Travel Information MCP Server

Connects AI assistants to real-time Dutch train data.

43
Stars
12
Forks
43
Watchers
2
Issues
Provides an MCP server enabling AI assistants, such as Claude, to access and deliver real-time travel information from Nederlandse Spoorwegen (NS). Supports installation via NPM, Smithery, or from source, and requires an NS API key for operation. Offers endpoints for live train departures, arrivals, disruptions, alternative routes, station facilities, and ticket pricing. Designed to integrate seamlessly with AI platforms for enhanced Dutch railway expertise.

Key Features

Real-time train departure and arrival information
Journey disruption and delay alerts
Search for best alternative routes
Ticket price and fare calculation
Station facility and accessibility data
Live journey monitoring
Support for Claude AI assistant integration
Easy deployment via NPM, Smithery, or source
Customizable through environment variables
Embeds NS data into AI context via MCP

Use Cases

Checking if a scheduled train is running on time
Finding alternate routes during service disruption
Planning trips to arrive before a specific time
Identifying the last trains for late travel
Determining station accessibility and facilities
Providing real-time train arrival information
Monitoring journey progress for punctuality
Calculating ticket prices for individuals or groups
Checking availability of rental bikes (OV-fiets) at stations
Alerting to engineering works affecting travel

README

MseeP.ai Security Assessment Badge

NS Travel Information MCP Server

smithery badge npm version

Transform your AI assistant into a Dutch railways expert! This MCP server connects Claude to real-time NS (Nederlandse Spoorwegen) travel information, making it your perfect companion for navigating the Netherlands by train.

Installation

You can install this server in three ways:

1. Using Claude Desktop with NPM Package

Update your Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{
  "mcpServers": {
    "ns-server": {
      "command": "npx",
      "args": [
        "-y",
        "ns-mcp-server"
      ],
      "env": {
        "NS_API_KEY": "your_api_key_here"
      }
    }
  }
}

You can get an API key from NS API Portal

2. Using Smithery

To install NS Travel Information Server automatically via Smithery:

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

3. From Source

  1. Clone this repository
  2. Install dependencies:
    bash
    npm install
    
  3. Copy the example environment file:
    bash
    cp .env.example .env
    
  4. Add your NS API key to the .env file:
    NS_API_KEY=your_api_key_here
    

Then update your Claude configuration file:

json
{
  "mcpServers": {
    "ns-server": {
      "command": "node",
      "args": [
        "/path/to/ns-server/build/index.js"
      ],
      "env": {
        "NS_API_KEY": "your_api_key_here"
      }
    }
  }
}

Make sure to:

  1. Replace /path/to/ns-server with the actual path to your installation
  2. Add your NS API key in the env section. It can be obtained from here https://apiportal.ns.nl/product#product=NsApp

After updating the configuration, restart Claude Desktop for the changes to take effect.

Real-World Use Cases

  • "Is my usual 8:15 train from Almere to Amsterdam running on time?"
  • "Are there any delays on the Rotterdam-Den Haag route today?"
  • "What's the best alternative route to Utrecht if there's maintenance on the direct line?"
  • "Which train should I take to arrive at my office in Amsterdam Zuid before 9 AM?"
  • "Which route to Amsterdam has the fewest transfers with a stroller?"
  • "What's the earliest train I can take to make my 10 AM meeting in The Hague?"
  • "When's the last train back to Groningen after a night out in Amsterdam?"
  • "Are there any weekend engineering works that might affect my Monday morning class?"
  • "Are there OV-fiets bikes available at Utrecht Centraal for my afternoon meeting?"
  • "Is Eindhoven Strijp-S station wheelchair accessible and what platforms does it have?"
  • "What trains are arriving at Utrecht Centraal in the next hour?"
  • "Has the train from Venlo to Schiphol Airport arrived on time?"
  • "How much does a first-class ticket from Amsterdam to Rotterdam cost?"
  • "What's the price for 2 adults and 1 child traveling to Den Haag?"

🔑 Environment Variables

Variable Description
NS_API_KEY Your NS API key (required)

🌟 Features

This MCP server provides comprehensive access to NS train information through the following endpoints:

Real-time Train Information

  • Departures: Get real-time departure information including platform numbers, delays, and travel notes
  • Arrivals: Access upcoming train arrivals with origin stations, platform changes, and status updates
  • Journey Planning: Find optimal travel routes with transfers and real-time updates
  • Service Updates: Check for disruptions, maintenance work, and engineering activities

Pricing Information

  • Ticket Prices: Get accurate pricing for single and return journeys
  • Travel Classes: Compare prices for first and second class travel
  • Group Pricing: Calculate fares for adults and children
  • Discount Options: Check joint journey discounts and special offers
  • Validity Details: View ticket validity periods and travel conditions

Station Information

  • Station Details: Access comprehensive station information including:
    • Facilities and accessibility features
    • Platform layouts and track information
    • OV-fiets (bike rental) availability
    • Location and approach details

Additional Features

  • Multi-language Support: Information available in Dutch and English
  • Flexible Queries: Search by station name, code, or UIC identifier
  • Time Zones: Proper handling of time zones for international stations
  • Status Updates: Track changes, delays, and cancellations in real-time

License

This project is licensed under the MIT License - see the LICENSE file for details

Star History

Star History Chart

Repository Owner

r-huijts
r-huijts

User

Repository Details

Language TypeScript
Default Branch main
Size 73 KB
Contributors 5
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
57.21%
JavaScript
40.56%
Dockerfile
2.24%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • TripGo MCP Server

    TripGo MCP Server

    Remote MCP server providing transport location, departure, and routing tools via the TripGo API.

    TripGo MCP Server acts as a remote Model Context Protocol server that wraps the TripGo API, offering tools for retrieving transport-related locations, departures from transport stops, multi-modal trip planning, and trip URL retrieval. It is deployed on Cloudflare Workers and is accessible directly or via MCP-compatible clients such as Claude Desktop through the mcp-remote proxy. The server supports direct integration for context-aware transport queries and trip management, facilitating enhanced interactions with public transport data.

    • 2
    • MCP
    • skedgo/tripgo-mcp-server
  • Climatiq MCP Server

    Climatiq MCP Server

    MCP server providing AI assistants with real-time carbon emissions calculations via Climatiq API.

    Climatiq MCP Server implements the Model Context Protocol to bridge AI assistants with the Climatiq API for precise carbon emissions calculations. It exposes a set of tools for various emissions scenarios, including electricity use, travel, freight, and more. The server generates resource URIs for detailed emission reports and provides natural language explanations on climate impact. Configuration is streamlined via environment variables, CLI tools, or files, supporting easy integration with platforms like Claude Desktop.

    • 6
    • MCP
    • jagan-shanmugam/climatiq-mcp-server
  • AllTrails MCP Server

    AllTrails MCP Server

    MCP server for seamless AllTrails data access and integration

    AllTrails MCP Server provides Model Context Protocol (MCP) compliant access to AllTrails hiking trail data, enabling AI tools to search for trails and retrieve detailed trail information. It supports searching by national park and fetching comprehensive details such as difficulty, length, elevation, ratings, and route types. The server communicates via standard input/output and is designed for easy integration with MCP-compatible clients like Claude Desktop. Installation is flexible, supporting both virtual environments and system Python setups.

    • 6
    • MCP
    • srinath1510/alltrails-mcp-server
  • Make MCP Server (legacy)

    Make MCP Server (legacy)

    Enable AI assistants to utilize Make automation workflows as callable tools.

    Make MCP Server (legacy) provides a Model Context Protocol (MCP) server that connects AI assistants with Make scenarios configured for on-demand execution. It parses and exposes scenario parameters, allowing AI systems to invoke automation workflows and receive structured JSON outputs. The server supports secure integration through API keys and facilitates seamless communication between AI and Make's automation platform.

    • 142
    • MCP
    • integromat/make-mcp-server
  • MCP Simple Timeserver

    MCP Simple Timeserver

    Provides local and UTC time to AI models via the Model Context Protocol.

    MCP Simple Timeserver provides current local time, timezone, and UTC information to AI models such as Claude by serving as a Model Context Protocol (MCP) tool. It offers two main endpoints: one for retrieving the user's local time and timezone, and another for fetching the current UTC time from an NTP server. The project supports both local and web server deployments and can be integrated into the Claude desktop app to enhance temporal awareness for LLMs.

    • 25
    • MCP
    • andybrandt/mcp-simple-timeserver
  • attio-mcp-server

    attio-mcp-server

    MCP server for enabling Attio CRM access via AI model context clients.

    attio-mcp-server implements a Model Context Protocol (MCP) server that facilitates communication between MCP clients, such as Claude, and the Attio CRM API. It enables reading and writing company notes and records within Attio by leveraging a bearer token for authentication. Designed for Node.js, it provides streamlined integration with Attio for applications utilizing AI-driven model context protocols.

    • 16
    • MCP
    • hmk/attio-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results