A Model Context Protocol (MCP) server that provides access to NS (Dutch Railways) travel information through Claude AI. This server enables Claude to fetch real-time train travel information and disruptions using the official Dutch NS API.
Configuration
View docs{
"mcpServers": {
"kallivdh-ns-mcp-server": {
"command": "npx",
"args": [
"-y",
"ns-mcp-server"
],
"env": {
"NS_API_KEY": "your_api_key_here"
}
}
}
}This MCP server connects Claude to real-time NS travel information, letting you ask for train schedules, pricing, station details, and service updates to plan trips around the Netherlands with confidence.
You use this server by configuring your MCP client to talk to one of the available startup methods. Once the server is running, you can ask for real-time departures and arrivals, plan journeys with transfers, check disruptions or maintenance, and compare ticket prices and options. You can query station details, OV-fiets availability, accessibility features, and route options with time-zone aware results. The system supports Dutch and English and lets you search by station name, station code, or UIC code.
Prerequisites: ensure you have Node.js and npm installed on your machine. You will also need an NS API key to access NS travel information.
Choose one of the installation methods below and follow the steps exactly as shown.
Option A: Claude Desktop configuration using NPM package (npx) for quick setup.
Option B: Smithery automated installation.
Option C: From source (build from repository and run locally).
Environment variable required by all methods: NS_API_KEY. This key is obtained from NS API Portal and must be kept secure.
The MCP server exposes endpoints and capabilities for real-time train information, pricing, and station details, with multi-language support and robust query options. Use the provided environment variable and command sequences to ensure the server runs and connects correctly.
If the server does not start, verify that NS_API_KEY is correctly set in the environment for the running process. Check that Node.js is installed and that your path to the built index.js (for local runs) is correct.
Restart the client after updating the MCP server configuration to apply changes.
Retrieve real-time departures with platform numbers, delays, and travel notes.
Fetch upcoming train arrivals with origins, platform changes, and status updates.
Find optimal travel routes with transfers and live updates.
Check disruptions, maintenance, and engineering works affecting service.
Get pricing for single, return, and different travel classes.
Check bike rental availability at stations.
Access detailed station information including facilities and accessibility.