Ns旅行情報Mcpサーバー
モデルコンテキストプロトコル(MCP)サーバーは、Claude AIを通じてNS(オランダ鉄道)の旅行情報へのアクセスを提供します。このサーバーは、Claudeが公式のオランダNS APIを使用してリアルタイムの列車旅行情報や障害情報を取得できるようにします。
概要
ns-mcp-serverとは?
ns-mcp-serverは、オランダ鉄道(NS)からのリアルタイム旅行情報へのアクセスを提供するために設計されたモデルコンテキストプロトコル(MCP)サーバーです。この革新的なサーバーは、ユーザーが公式のNS APIを使用して最新の列車スケジュール、旅行の混乱、およびその他の重要な旅行データを取得できるようにします。これは、ユーザーとオランダ鉄道から利用可能な膨大な旅行情報との架け橋として機能し、重要なデータへの即時アクセスで旅行体験を向上させます。
ns-mcp-serverの特徴
- リアルタイムデータアクセス:サーバーは公式のNS APIに接続し、ユーザーが最新の旅行情報を受け取れるようにします。
- Claude AIとの統合:Claude AIを活用することで、サーバーはユーザーのクエリを解釈し、関連する旅行情報をシームレスに提供できます。
- ユーザーフレンドリーなインターフェース:使いやすさを考慮して設計されており、ユーザーは簡単に列車のスケジュールや混乱にアクセスできます。
- オープンソース:ns-mcp-serverは公開されており、世界中の開発者からのコラボレーションや貢献を促進します。
ns-mcp-serverの使い方
- インストール:以下のコマンドを使用してGitHubからリポジトリをクローンします。
git clone https://github.com/r-huijts/ns-mcp-server.git
- セットアップ:リポジトリのREADMEファイルに記載されているインストール手順に従って、ローカルマシンにサーバーをセットアップします。
- APIアクセス:サーバーを利用してNS APIにリクエストを送信します。Claude AIを通じてクエリを送信し、リアルタイムの旅行情報を取得できます。
- 機能を探る:さまざまなクエリを試して、サーバーの全機能と旅行計画にどのように役立つかを理解します。
よくある質問
ns-mcp-serverはどのプログラミング言語で構築されていますか?
ns-mcp-serverは主にJavaScriptで構築されており、ウェブ技術に精通した開発者にとってアクセスしやすいです。
ns-mcp-serverの使用に費用はかかりますか?
いいえ、ns-mcp-serverはオープンソースで無料で使用できます。ただし、ユーザーは公式のNS APIによって設定された使用制限や条件に注意する必要があります。
ns-mcp-serverプロジェクトに貢献できますか?
もちろんです!貢献は歓迎されます。GitHubリポジトリで問題の報告、機能リクエスト、またはプルリクエストを提出できます。
サーバーのバグや問題を報告するにはどうすればよいですか?
GitHubリポジトリで問題を開くことで、バグや問題を報告できます。遭遇した問題について詳細な情報を提供してください。
ns-mcp-serverのドキュメントはどこにありますか?
ドキュメントは通常、リポジトリのREADMEファイルにあり、コード内のコメントも含まれています。より詳細なガイダンスについては、GitHubの問題やディスカッションセクションも確認できます。
詳細
| <img src="https://upload.wikimedia.org/wikipedia/commons/b/b7/Nederlandse_Spoorwegen_logo.svg" alt="NS Logo" width="380"/> | <img src="https://glama.ai/mcp/servers/tzd5oz5tov/badge" alt="NS Travel Information Server MCP server" width="380"/> | |::|::|
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
):
{
"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:
npx -y @smithery/cli install ns-server --client claude
3. From Source
- Clone this repository
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.example .env
- Add your NS API key to the
.env
file:NS_API_KEY=your_api_key_here
Then 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 - 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
サーバー設定
{
"mcpServers": {
"ns-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--r-huijts--ns-mcp-server--ns-mcp-server",
"node ./build/index.js"
],
"env": {
"NS_API_KEY": "ns-api-key"
}
}
}
}