NS Travel Information MCP Server
NS 旅行信息 MCP 服务器
将您的AI助手变成荷兰铁路专家!这款MCP服务器将Claude连接到实时NS(荷兰铁路)旅行信息,使其成为您乘坐火车游览荷兰的完美伴侣。
安装
您可以通过三种方式安装此服务器:
1. 使用 Claude Desktop 和 NPM 包
更新您的 Claude 配置文件( ~/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"
}
}
}
}您可以从NS API 门户获取 API 密钥
2. 使用 Smithery
要通过Smithery自动安装 NS 旅行信息服务器:
npx -y @smithery/cli install ns-server --client claude3. 从源头
克隆此存储库
安装依赖项:
npm install复制示例环境文件:
cp .env.example .env将您的 NS API 密钥添加到
.env文件:NS_API_KEY=your_api_key_here
然后更新你的 Claude 配置文件:
{
"mcpServers": {
"ns-server": {
"command": "node",
"args": [
"/path/to/ns-server/build/index.js"
],
"env": {
"NS_API_KEY": "your_api_key_here"
}
}
}
}请确保:
将
/path/to/ns-server替换为安装的实际路径在
env部分添加你的 NS API 密钥。可以从这里获取: https://apiportal.ns.nl/product#product=NsApp
更新配置后,重新启动 Claude Desktop 以使更改生效。
Related MCP server: mcp-ns-railways
真实用例
“我通常乘坐的 8:15 从 阿尔梅勒 到 阿姆斯特丹 的火车准时吗?”
“今天鹿特丹-海牙航线有延误吗?”
“如果直达线路需要维护,前往乌得勒支的最佳替代路线是什么?”
“我应该乘坐哪趟火车才能在上午 9 点之前到达位于阿姆斯特丹南区的办公室?”
“哪条前往阿姆斯特丹的路线携带婴儿车换乘的人数最少?”
“我早上 10 点去海牙开会,最早可以坐几班火车?”
“在阿姆斯特丹度过一夜之后,返回格罗宁根的末班火车是什么时候?”
“周末有工程施工,会影响我周一早上的课吗?”
“乌得勒支中央火车站有 OV-fiets 自行车可供我下午开会使用吗?”
“埃因霍温 Strijp-S 车站是否适合轮椅通行?有哪些站台?”
“未来一小时有哪些列车抵达乌得勒支中央火车站?”
“从 芬洛 到 史基浦机场 的火车准时到达吗?”
“从阿姆斯特丹到鹿特丹的头等舱机票多少钱?”
“2 名成人和 1 名儿童前往海牙的票价是多少?”
🔑 环境变量
多变的 | 描述 |
NS_API_KEY | 您的 NS API 密钥(必需) |
🌟 功能
该 MCP 服务器通过以下端点提供对 NS 列车信息的全面访问:
实时列车信息
出发:获取实时出发信息,包括站台号、延误和旅行须知
到达信息:了解即将到达的列车,包括始发站、站台变更和状态更新
旅程规划:通过换乘和实时更新找到最佳旅行路线
服务更新:检查中断、维护工作和工程活动
定价信息
票价:获取单程和往返旅程的准确价格
旅行舱位:比较一等舱和二等舱的旅行价格
团体票价:计算成人和儿童的票价
折扣选项:查看联合旅行折扣和特别优惠
有效期详情:查看机票有效期和旅行条件
车站信息
车站详情:获取全面的车站信息,包括:
设施和无障碍设施
站台布局和轨道信息
OV-fiets(自行车租赁)可用性
位置和方法详情
附加功能
多语言支持:提供荷兰语和英语的信息
灵活查询:按车站名称、代码或 UIC 标识符搜索
时区:正确处理国际站的时区
状态更新:实时跟踪变更、延误和取消
执照
该项目采用 MIT 许可证 - 有关详细信息,请参阅LICENSE文件
Available Tools
8 toolsget_arrivalsA
Get real-time arrival information for trains at a specific station, including platform numbers, delays, origin stations, and any relevant travel notes. Returns a list of upcoming arrivals with timing, origin, and status information.
Inputs: station, uicCode, dateTime, maxJourneys, +1 more.
get_current_time_in_rfc3339A
Get the current server time (Europe/Amsterdam timezone) in RFC3339 format. This can be used as input for other tools that require date-time parameters.
Inputs: no named parameters.
get_departuresA
Get real-time departure information for trains from a specific station, including platform numbers, delays, route details, and any relevant travel notes. Returns a list of upcoming departures with timing, destination, and status information.
Inputs: station, uicCode, dateTime, maxJourneys, +1 more.
get_disruptionsA
Get comprehensive information about current and planned disruptions on the Dutch railway network. Returns details about maintenance work, unexpected disruptions, alternative transport options, impact on travel times, and relevant advice. Can filter for active disruptions and specific disruption types.
Inputs: isActive, type.
get_ovfietsC
Get OV-fiets availability at a train station
Inputs: stationCode (required).
get_pricesC
Get price information for domestic train journeys, including different travel classes, ticket types, and discounts. Returns detailed pricing information with conditions and validity.
Inputs: fromStation (required), toStation (required), travelClass, travelType, +6 more.
get_station_infoC
Get detailed information about a train station
Inputs: query (required), includeNonPlannableStations, limit.
get_travel_adviceA
Get detailed travel routes between two train stations, including transfers, real-time updates, platform information, and journey duration. Can plan trips for immediate departure or for a specific future time, with options to optimize for arrival time. Returns multiple route options with status and crowding information.
Inputs: fromStation (required), toStation (required), dateTime, searchForArrival.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose targeting specific aspects of train travel information, such as arrivals, departures, disruptions, pricing, station details, and route planning. There is no overlap in functionality, and the descriptions clearly differentiate the scope of each tool, making it easy for an agent to select the correct one without confusion.
All tool names follow a consistent 'get_' prefix pattern with descriptive nouns, such as get_arrivals, get_departures, get_disruptions, etc. This uniform naming convention enhances readability and predictability, allowing agents to easily understand and anticipate the purpose of each tool based on its name.
With 8 tools, the server is well-scoped for providing comprehensive Dutch railway travel information. Each tool serves a specific and necessary function, covering real-time data, disruptions, pricing, station details, and route planning, without being overly broad or lacking in essential features for the domain.
The tool set offers complete coverage for train travel information, including real-time arrivals and departures, disruptions, pricing, station details, bike availability, and route planning. There are no obvious gaps, as it supports core workflows from trip planning to real-time updates and ancillary services like OV-fiets, ensuring agents can handle a wide range of travel-related queries effectively.
Maintenance
Related MCP Connectors
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
MCP server for Open Archives: Dutch genealogical records and historical page transcriptions.
MCP server for tracking parcels using the NetCourier tracking service.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to interact with the Netherlands Railways (NS) API for route planning, pricing, and real-time departure information. It provides tools for searching stations, planning trips with connections, and viewing real-time departure boards.31MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for querying Dutch railway data via the NS API, with planned tools for station search, departures, trip planning, and disruptions.-
- FlicenseAqualityDmaintenanceMCP server for querying German public transport information, including station search, live departures/arrivals, and journey planning.51-
- FlicenseNot gradedqualityDmaintenanceMCP server for querying Belgian railway data (SNCB/NMBS) via the iRail API, enabling station search, liveboard, and journey planning.-