| | |
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
|:---:|:---:|
NS Travel Information 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):
You can get an API key from NS API Portal
2. Using Smithery
To install NS Travel Information Server automatically via Smithery:
3. From Source
1. Clone this repository
2. Install dependencies:
3. Copy the example environment file:
4. Add your NS API key to the .env file:
Then update your Claude configuration file:
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