乗換案内MCP 🚃 / Norikae MCP
](https://www.npmjs.com/package/norikae-mcp) 
可以搜索日本的电车换乘MCP(Model Context Protocol)服务器。 Yahoo!使用换乘指南的数据,可以搜索从车站到车站的最佳路线。
*用于在日本搜索火车路线的MCP(模型上下文协议)服务器。 使用雅虎!交通数据,以找到车站之间的最佳路线。*
机能/Features
- 🚉 从车站到车站的换乘路线检索/Station-to-station route search
- 🔀 経由駅の指定(最大3駅)/ Via station specification (up to 3 stations)
- ⏰ 指定时刻での検索(出発・到着时刻指定)/Departure or arrival time specification
- 💰 IC运赁の表示/IC card fare display
- 🔄 乘り换え回数・所要时间の比较/Transfer count and travel time comparison
必要条件 / Requirements
- Node.js 18以上 / Node.js 18+
安装/Installation
npm install -g norikae-mcp或者,npx直接运行/Or run directly with npx:
npx norikae-mcp设定/Configuration
Claude Desktop での设定/Claude Desktop Configuration
请打开配置文件并添加以下内容:
*打开配置文件并添加以下内容:*
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
窗户: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"norikae": {
"command": "npx",
"args": ["-y", "norikae-mcp"]
}
}
}设置后Claude Desktop中所述修改相应参数的值。
*保存后,重新启动Claude Desktop。*
Cursor 中的设置/Cursor Configuration
~/.cursor/mcp.json 或项目 .cursor/mcp.json 添加:
*添加以下内容 ~/.cursor/mcp.json 或者你的项目 .cursor/mcp.json:*
{
"mcpServers": {
"norikae": {
"command": "npx",
"args": ["-y", "norikae-mcp"]
}
}
}可用工具/Available Tools
search_route
搜索从车站到车站的电车路线。
*搜索车站之间的火车路线。*
参数/Parameters:
| |参数|类型|必需|说明/Description | |||
|---|---|---|---|
from | string | ✅ | 出発駅名/Departure station (e.g., 东京,新宿) |
to | string | ✅ | 到着駅名 / Arrival station (e.g., 九段下, 横浜) |
via | string\[\] | - | 経由駅名の配列(最大3駅)/ Via stations array (max 3) |
year | number | - | 出発年 / Year (default: current) |
month | number | - | 出発月 / Month (default: current) |
day | number | - | 出発日 / Day (default: current) |
hour | 数字 | - | 時 / 小时(默认值:当前) |
minute | 数字 | - | 分 / 分钟(默认值:当前) |
搜索选项/Search Options:
| 参数|类型|默认|说明/Description | ||||||
|---|---|---|---|---|---|---|
timeType | departure | arrival | first_train | last_train | unspecified | departure |时间指定类型/Time type |
ticket | ic | cash | ic 运费类型/Fare type | |||
seatPreference | non_reserved | reserved | green | non_reserved | 座席指定 / Seat preference | |
walkSpeed | fast | slightly_fast | slightly_slow | slow | slightly_slow 走路的速度Walking speed | |
sortBy | time | transfer | fare | time |排列顺序/Sort order |
交通工具选项/Transport Options:
| 参数|类型|默认|说明/Description | ||
|---|---|---|
useAirline | 布尔值 | true 坐飞机Use airlines |
useShinkansen | 布尔值 | true 使用新干线Use Shinkansen |
useExpress | 布尔值 | true 使用收费特快Use express trains |
useHighwayBus | 布尔值 | true 使用高速巴士Use highway buses |
useLocalBus | 布尔值 | true 坐公交车/Use local buses |
useFerry | 布尔值 | true 坐渡船/Use ferries |
使用示例(自然语言-可选)/Usage Examples (Natural Language → Options)
AI中描述的场景,使用下列步骤创建明细表,以便在概念设计中分析体量的周长。
*当你用自然语言询问人工智能时,会自动设置相应的选项。*
基本搜索/Basic Search
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
从东京到九段下 from: 東京, to: 九段下 | |
从新宿到横滨的方法 from: 新宿, to: 横浜 | |
| “如何从东京到涩谷” | from: 東京, to: 渋谷 |
| “新宿至横滨路线” | from: 新宿, to: 横浜 |
指定经由站/Via Stations
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
从东京到新宿,经由表参道 from: 東京, to: 新宿, via: ["表参道"] | |
从涩谷经由池袋、原宿和新宿 from: 渋谷, to: 池袋, via: ["原宿", "新宿"] | |
从品川经过上野、东京站和秋叶原 from: 品川, to: 上野, via: ["東京", "秋葉原"] | |
| “从东京经表参道到新宿” | from: 東京, to: 新宿, via: ["表参道"] |
| 涩谷至池袋,途经原宿和新宿 | from: 渋谷, to: 池袋, via: ["原宿", "新宿"] |
时刻指定/Time Specification
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“10点30分出发” hour: 10, minute: 30 | |
“早上8点的电车” hour: 8 | |
“明天早上9点” day: (tomorrow), hour: 9 | |
| “上午10:30出发” | hour: 10, minute: 30 |
| “早上8点的火车” | hour: 8 |
到着时刻指定/Arrival Time (timeType)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“想18点到达” timeType: arrival, hour: 18 | |
“为了赶上9点的会议” timeType: arrival, hour: 9 | |
| “我想在下午6点前到达” | timeType: arrival, hour: 18 |
| “需要参加上午9点的会议” | timeType: arrival, hour: 9 |
始発・终电/First/Last Train (timeType)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“始发” timeType: first_train | |
“最早的电车” timeType: first_train | |
“想坐末班车回去” timeType: last_train | |
“末班车呢?” timeType: last_train | |
| “今天的第一班火车” | timeType: first_train |
| “最后一班回家的火车” | timeType: last_train |
座席指定 / Seat Preference (seatPreference)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“在自由席上” seatPreference: non_reserved (默认) | |
在指定席 seatPreference: reserved | |
“用绿色车” seatPreference: green | |
“奢侈地坐绿色车” seatPreference: green | |
| “非预订座位” | seatPreference: non_reserved |
| “请预留座位” | seatPreference: reserved |
| “绿色汽车/头等舱” | seatPreference: green |
运费类型/Fare Type (ticket)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“用IC运费” ticket: ic (默认) | |
“以车票的价格” ticket: cash | |
用Suica ticket: ic | |
| “使用IC卡” | ticket: ic |
| “请付现金” | ticket: cash |
歩く速度 / Walking Speed (walkSpeed)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“因为很急,所以快走” walkSpeed: fast | |
“想慢慢走” walkSpeed: slow | |
“因为脚不好所以慢慢地” walkSpeed: slow | |
| “我赶时间,快走” | walkSpeed: fast |
| “慢慢走,我有行李” | walkSpeed: slow |
排列顺序/Sort Order (sortBy)
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“最早的路线” sortBy: time (默认) | |
“最便宜的路线” sortBy: fare | |
“换乘少就好” sortBy: transfer | |
| “最快路线” | sortBy: time |
| “最便宜的路线” | sortBy: fare |
| “Fewest转会” | sortBy: transfer |
交通手段の除外 / Excluding Transport Types
| 你的问题Your Question | 识别的选项/Recognized Options |
|---|---|
“不要使用新干线” useShinkansen: false | |
“仅在原有线路上” useShinkansen: false, useExpress: false | |
“不想坐巴士” useHighwayBus: false, useLocalBus: false | |
| “没有新干线” | useShinkansen: false |
| “仅限本地列车” | useShinkansen: false, useExpress: false |
| “请不要乘坐公共汽车” | useHighwayBus: false, useLocalBus: false |
组合示例/Combined Examples
示例1/Example 1: 出差想节约Budget business trip
「明日の朝10時までに東京から大阪に着きたい、新幹線なしで、一番安いルートで」
"I need to arrive in Osaka from Tokyo by 10 AM tomorrow, without Shinkansen, cheapest route"→ from: 東京, to: 大阪, timeType: arrival, hour: 10, useShinkansen: false, sortBy: fare
示例2/Example 2: 观光慢慢地/Leisurely sightseeing
「京都から奈良まで、ゆっくり歩きで」
"From Kyoto to Nara, walking slowly"→ from: 京都, to: 奈良, walkSpeed: slow
示例3/Example 3: 着急,着急In a hurry
「今すぐ渋谷から羽田空港、最速で、早歩きで」
"Right now from Shibuya to Haneda Airport, fastest route, fast walking"→ from: 渋谷, to: 羽田空港, sortBy: time, walkSpeed: fast
例4 / Example 4: 複雑な条件 / Complex conditions
「来週の金曜日、18時に品川に着くように新宿から、新幹線と飛行機は使わないで、乗り換え少ない順で」
"Next Friday, arriving at Shinagawa by 6 PM from Shinjuku, no Shinkansen or planes, fewest transfers"→ from: 新宿, to: 品川, timeType: arrival, hour: 18, useShinkansen: false, useAirline: false, sortBy: transfer
例5 / Example 5: 経由駅を指定 / Specifying via stations
「東京から新宿まで、表参道と飯田橋を経由して、一番安いルートで」
"From Tokyo to Shinjuku via Omotesando and Iidabashi, cheapest route"→ from: 東京, to: 新宿, via: ["表参道", "飯田橋"], sortBy: fare
示例6/Example 6: 旅游路线/Sightseeing route
「浅草から原宿まで、上野と秋葉原と東京を通って、ゆっくり歩きで」
"From Asakusa to Harajuku, passing through Ueno, Akihabara, and Tokyo, walking slowly"→ from: 浅草, to: 原宿, via: ["上野", "秋葉原", "東京"], walkSpeed: slow
开発/Development
# リポジトリをクローン / Clone the repository
git clone https://github.com/YOUR_USERNAME/norikae-mcp.git
cd norikae-mcp
# 依存関係のインストール / Install dependencies
npm install
# ビルド / Build
npm run build
# 開発モード / Development mode (watch)
npm run dev
# テスト実行 / Run tests
npm test技术详细/Technical Details
- MCP-SDK:
@modelcontextprotocol/sdk - 数据源/Data source: Yahoo!换乘指南(transit.yahoo.co.jp)
- 运行时/Runtime: Node.js 18+
注意事项/Notes
- 这MCP啊Yahoo!换乘指南的Web正在刻划页面
*这个MCP刮了雅虎!过境网页*
- 设想个人使用
*仅供个人使用*
- Yahoo! JAPAN使用条款
*请查看雅虎!日本的服务条款*
- 可能不包含实时延迟信息
*可能不包括实时延迟信息*
许可证/License
麻省理工学院
