首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
首页
学习
活动
专区
圈层
工具
MCP广场
MCP广场 >详情页
ns-mcp-server云托管模式2025-06-170分享
github
提供荷兰铁路(NS)旅行信息的MCP服务器。
By r-huijts
2025-06-170
github
详情内容
NS Logo NS旅行信息服务器MCP服务器

NS旅行信息MCP服务器

smithery徽章
npm版本

将您的AI助手变成荷兰铁路专家!这个MCP服务器将Claude连接到实时NS(荷兰铁路公司)旅行信息,使其成为您在荷兰乘火车出行的完美伴侣。

安装

您可以通过三种方式安装此服务器:

1. 使用Claude桌面版和NPM包

更新您的Claude配置文件(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "ns-server": {
      "command": "npx",
      "args": [
        "-y",
        "ns-mcp-server"
      ],
      "env": {
        "NS_API_KEY": "您的API密钥"
      }
    }
  }
}

您可以从NS API门户获取API密钥。

2. 使用Smithery

要通过Smithery自动安装NS旅行信息服务器:

npx -y @smithery/cli install ns-server --client claude

3. 从源代码安装

  1. 克隆此仓库
  2. 安装依赖项:
    npm install
    
  3. 复制示例环境文件:
    cp .env.example .env
    
  4. 将您的NS API密钥添加到.env文件中:
    NS_API_KEY=您的API密钥
    

然后更新您的Claude配置文件:

{
  "mcpServers": {
    "ns-server": {
      "command": "node",
      "args": [
        "/path/to/ns-server/build/index.js"
      ],
      "env": {
        "NS_API_KEY": "您的API密钥"
      }
    }
  }
}

请确保:

  1. /path/to/ns-server替换为您的实际安装路径
  2. env部分添加您的NS API密钥。可以从这里获取https://apiportal.ns.nl/product#product=NsApp

更新配置后,重新启动Claude桌面版以使更改生效。

实际应用场景

  • "我通常8:15从阿尔梅勒到阿姆斯特丹的火车是否准点?"
  • "今天鹿特丹到海牙的路线是否有延误?"
  • "如果直达线路有维护,去乌得勒支的最佳替代路线是什么?"
  • "我应该乘坐哪班火车才能在上午9点前到达阿姆斯特丹南部的办公室?"
  • "带着婴儿车去阿姆斯特丹,哪种路线换乘最少?"
  • "我最早可以乘坐哪班火车参加海牙上午10点的会议?"
  • "在阿姆斯特丹夜生活后,回格罗宁根的末班车是什么时候?"
  • "周末的工程作业是否会影响我周一早上的课程?"
  • "乌得勒支中央车站是否有OV-fiets自行车可供我下午的会议使用?"
  • "埃因霍温Strijp-S车站是否适合轮椅通行,有哪些站台?"
  • "未来一小时有哪些火车到达乌得勒支中央车站?"
  • "从芬洛到史基浦机场的火车是否准点到达?"
  • "从阿姆斯特丹到鹿特丹的头等舱票价是多少?"
  • "两位成人和一位儿童前往海牙的票价是多少?"

🔑 环境变量

变量 描述
NS_API_KEY 您的NS API密钥(必需)

🌟 功能特点

此MCP服务器通过以下端点提供全面的NS火车信息访问:

实时火车信息

  • 出发信息:获取包括站台号、延误和旅行提示在内的实时出发信息
  • 到达信息:获取包括始发站、站台变更和状态更新在内的即将到达的火车信息
  • 行程规划:查找带有换乘和实时更新的优化旅行路线
  • 服务更新:检查中断、维护工作和工程活动

票价信息

  • 票价:获取单程和往返行程的准确票价
  • 旅行等级:比较头等舱和二等舱的价格
  • 团体票价:计算成人和儿童的票价
  • 折扣选项:检查联合旅程折扣和特别优惠
  • 有效期详情:查看票证的有效期和旅行条件

车站信息

  • 车站详情:访问包括以下内容的全面车站信息:
    • 设施和无障碍功能
    • 站台布局和轨道信息
    • OV-fiets(自行车租赁)可用性
    • 位置和接近详情

其他功能

  • 多语言支持:提供荷兰语和英语的信息
  • 灵活查询:按车站名称、代码或UIC标识符搜索
  • 时区处理:正确处理国际车站的时区
  • 状态更新:实时跟踪变更、延误和取消

许可证

此项目根据MIT许可证授权 - 详情请参阅LICENSE文件

通过SSE URL连接服务
Server已在腾讯云托管,可在连接后免费调用和在线进行工具测试~
工具测试
已支持Server下的8个工具,可选择工具进行在线测试
get_disruptions
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.
get_travel_advice
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.
get_departures
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.
get_ovfiets
Get OV-fiets availability at a train station
get_station_info
Get detailed information about a train station
get_current_time_in_rfc3339
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.
get_arrivals
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.
get_prices
Get price information for domestic train journeys, including different travel classes, ticket types, and discounts. Returns detailed pricing information with conditions and validity.
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档