https://github.com/r-huijts/ns-mcp-server
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.
https://github.com/r-huijts/ns-mcp-server
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/r-huijts/ns-mcp-server
- Owner: r-huijts
- License: mit
- Created: 2024-12-04T11:32:38.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T08:45:18.000Z (3 months ago)
- Last Synced: 2025-08-26T10:46:22.115Z (3 months ago)
- Language: TypeScript
- Size: 71.3 KB
- Stars: 39
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - ns-mcp-server - MCP Server for accessing Dutch Railways (NS) travel information, including schedules and real-time updates. An example of an MCP Server for transportation. ([Read more](/details/ns-mcp-server.md)) `mcp` `transportation` `real-time` `open-data` (Data Access & Integration MCP Servers)
- metorial-index - NS Travel Information Server - Provides real-time travel information for Dutch Railways (NS), enabling users to access schedules, train statuses, and travel-related queries. (APIs and HTTP Requests)
- awesome-mcp-zh - NS Travel Information MCP Server
- awesome-mcp-servers - NS Travel Information MCP Server - Access Dutch Railways (NS) travel information, schedules, and real-time updates (Legend / 🚆 <a name="travel-and-transportation"></a>Travel & Transportation)
- awesome-mcp-servers - NS Travel Information MCP Server - Access Dutch Railways (NS) travel information, schedules, and real-time updates (Legend / 🚆 <a name="travel-and-transportation"></a>Travel & Transportation)
- awesome-mcp-servers - NS Travel Information MCP Server - オランダ鉄道(NS)の旅行情報、スケジュール、およびリアルタイムの更新にアクセス (サーバー実装 / 🚆 <a name="travel-and-transportation"></a>旅行と交通)
- awesome-mcp-servers - NS Travel Information MCP Server - 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. (Table of Contents / Travel and Transportation)
- awesome-mcp-servers - NS Travel Information MCP Server - 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. (Table of Contents / Travel and Transportation)
- toolsdk-mcp-registry - ❌ ns-travel-information - time Dutch Railways data for trip planning. (node) (Travel & Transportation / How to Submit)
- awesome-mcp-servers - **ns-mcp-server** - 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. `typescript` `mcp` `server` `api` `ai` `npm install r-huijts/ns-mcp-server` (🌐 Web Development)
README
[](https://mseep.ai/app/r-huijts-ns-mcp-server)
|
|
|
|:---:|:---:|
# NS Travel Information MCP Server
[](https://smithery.ai/server/ns-server)
[](https://www.npmjs.com/package/ns-mcp-server)
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](https://apiportal.ns.nl/)
### 2. Using Smithery
To install NS Travel Information Server automatically via [Smithery](https://smithery.ai/server/ns-server):
```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](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](LICENSE) file for details