norikae-mcp
🚃 乗換案内MCP - 乗り換え検索 / Norikae MCP - Búsqueda de rutas de tren japonesas usando Yahoo! Transit
Documentación
norikae-mcp MCP 🚃 / Norikae MCP
Un servidor MCP (Model Context Protocol) para buscar rutas de tren en Japón. Utiliza los datos de Yahoo! Tránsito para encontrar las rutas óptimas entre estaciones.
An MCP (Model Context Protocol) server for searching train routes in Japan. Uses Yahoo! Transit data to find optimal routes between stations.
Funciones / Features
- 🚉 Búsqueda de rutas de tren entre estaciones / Station-to-station route search
- 🔀 Especificación de estaciones intermedias (hasta 3 estaciones) / Via station specification (up to 3 stations)
- ⏰ Búsqueda a una hora específica (especificación de hora de salida o llegada) / Departure or arrival time specification
- 💰 Visualización de tarifas IC / IC card fare display
- 🔄 Comparación de número de transbordos y tiempo de viaje / Transfer count and travel time comparison
Requisitos / Requirements
- Node.js 18 o superior / Node.js 18+
Instalación / Installation
npm install -g norikae-mcp
O ejecutar directamente con npx / Or run directly with npx:
npx norikae-mcp
Configuración / Configuration
Configuración en Claude Desktop / Claude Desktop Configuration
Abre el archivo de configuración y añade lo siguiente:
Open the config file and add the following:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"norikae": {
"command": "npx",
"args": ["-y", "norikae-mcp"]
}
}
}
Después de la configuración, reinicia Claude Desktop.
After saving, restart Claude Desktop.
Configuración en Cursor / Cursor Configuration
Añade lo siguiente a ~/.cursor/mcp.json o al .cursor/mcp.json de tu proyecto:
Add the following to ~/.cursor/mcp.json or your project's .cursor/mcp.json:
{
"mcpServers": {
"norikae": {
"command": "npx",
"args": ["-y", "norikae-mcp"]
}
}
}
Herramientas disponibles / Available Tools
search_route
Busca rutas de tren entre estaciones.
Search for train routes between stations.
Parámetros / Parameters:
| Parámetro | Tipo | Obligatorio | Descripción / Description |
|---|---|---|---|
from | string | ✅ | Estación de salida / Departure station (e.g., 東京, 新宿) |
to | string | ✅ | Estación de llegada / Arrival station (e.g., 九段下, 横浜) |
via | string[] | - | Matriz de estaciones intermedias (máx. 3) / Via stations array (max 3) |
year | number | - | Año de salida / Year (default: current) |
month | number | - | Mes de salida / Month (default: current) |
day | number | - | Día de salida / Day (default: current) |
hour | number | - | Hora / Hour (default: current) |
minute | number | - | Minuto / Minute (default: current) |
Opciones de búsqueda / Search Options:
| Parámetro | Tipo | Predeterminado | Descripción / Description |
|---|---|---|---|
timeType | departure | arrival | first_train | last_train | unspecified | departure | Tipo de hora / Time type |
ticket | ic | cash | ic | Tipo de tarifa / Fare type |
seatPreference | non_reserved | reserved | green | non_reserved | Preferencia de asiento / Seat preference |
walkSpeed | fast | slightly_fast | slightly_slow | slow | slightly_slow | Velocidad al caminar / Walking speed |
sortBy | time | transfer | fare | time | Orden de clasificación / Sort order |
Opciones de transporte / Transport Options:
| Parámetro | Tipo | Predeterminado | Descripción / Description |
|---|---|---|---|
useAirline | boolean | true | Usar aerolíneas / Use airlines |
useShinkansen | boolean | true | Usar Shinkansen / Use Shinkansen |
useExpress | boolean | true | Usar expresos de pago / Use express trains |
useHighwayBus | boolean | true | Usar autobuses de larga distancia / Use highway buses |
useLocalBus | boolean | true | Usar autobuses locales / Use local buses |
useFerry | boolean | true | Usar ferris / Use ferries |
Ejemplos de uso (lenguaje natural → opciones) / Usage Examples (Natural Language → Options)
Si le hablas a la IA de la siguiente manera, las opciones adecuadas se configurarán automáticamente.
When you ask the AI in natural language, the appropriate options are automatically set.
Búsqueda básica / Basic Search
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「東京から九段下まで」 | from: 東京, to: 九段下 |
| 「新宿から横浜への行き方」 | from: 新宿, to: 横浜 |
| "How to get from Tokyo to Shibuya" | from: 東京, to: 渋谷 |
| "Route from Shinjuku to Yokohama" | from: 新宿, to: 横浜 |
Especificación de estaciones intermedias / Via Stations
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「東京から新宿まで、表参道経由で」 | from: 東京, to: 新宿, via: ["表参道"] |
| 「渋谷から池袋、原宿と新宿を経由して」 | from: 渋谷, to: 池袋, via: ["原宿", "新宿"] |
| 「品川から上野、東京駅と秋葉原を通って」 | from: 品川, to: 上野, via: ["東京", "秋葉原"] |
| "From Tokyo to Shinjuku via Omotesando" | from: 東京, to: 新宿, via: ["表参道"] |
| "Shibuya to Ikebukuro, passing through Harajuku and Shinjuku" | from: 渋谷, to: 池袋, via: ["原宿", "新宿"] |
Especificación de hora / Time Specification
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「10時30分に出発」 | hour: 10, minute: 30 |
| 「朝8時の電車」 | hour: 8 |
| 「明日の朝9時」 | day: (tomorrow), hour: 9 |
| "Departing at 10:30 AM" | hour: 10, minute: 30 |
| "Train at 8 in the morning" | hour: 8 |
Especificación de hora de llegada / Arrival Time (timeType)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「18時に着きたい」 | timeType: arrival, hour: 18 |
| 「9時の会議に間に合うように」 | timeType: arrival, hour: 9 |
| "I want to arrive by 6 PM" | timeType: arrival, hour: 18 |
| "Need to be there for a 9 AM meeting" | timeType: arrival, hour: 9 |
Primer y último tren / First/Last Train (timeType)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「始発で」 | timeType: first_train |
| 「一番早い電車」 | timeType: first_train |
| 「終電で帰りたい」 | timeType: last_train |
| 「最終電車は?」 | timeType: last_train |
| "First train of the day" | timeType: first_train |
| "Last train home" | timeType: last_train |
Preferencia de asiento / Seat Preference (seatPreference)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「自由席で」 | seatPreference: non_reserved (default) |
| 「指定席で」 | seatPreference: reserved |
| 「グリーン車で」 | seatPreference: green |
| 「贅沢にグリーン車で」 | seatPreference: green |
| "Non-reserved seat" | seatPreference: non_reserved |
| "Reserved seat please" | seatPreference: reserved |
| "Green car / first class" | seatPreference: green |
Tipo de tarifa / Fare Type (ticket)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「IC運賃で」 | ticket: ic (default) |
| 「きっぷの値段で」 | ticket: cash |
| 「Suicaで」 | ticket: ic |
| "Using IC card" | ticket: ic |
| "Cash fare please" | ticket: cash |
Velocidad al caminar / Walking Speed (walkSpeed)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「急いでるので早歩きで」 | walkSpeed: fast |
| 「ゆっくり歩きたい」 | walkSpeed: slow |
| 「足が悪いのでゆっくり」 | walkSpeed: slow |
| "I'm in a hurry, fast walking" | walkSpeed: fast |
| "Walking slowly, I have luggage" | walkSpeed: slow |
Orden de clasificación / Sort Order (sortBy)
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「一番早いルート」 | sortBy: time (default) |
| 「一番安いルート」 | sortBy: fare |
| 「乗り換え少ないのがいい」 | sortBy: transfer |
| "Fastest route" | sortBy: time |
| "Cheapest route" | sortBy: fare |
| "Fewest transfers" | sortBy: transfer |
Exclusión de tipos de transporte / Excluding Transport Types
| Tu pregunta / Your Question | Opciones reconocidas / Recognized Options |
|---|---|
| 「新幹線を使わないで」 | useShinkansen: false |
| 「在来線だけで」 | useShinkansen: false, useExpress: false |
| 「バスは乗りたくない」 | useHighwayBus: false, useLocalBus: false |
| "Without Shinkansen" | useShinkansen: false |
| "Local trains only" | useShinkansen: false, useExpress: false |
| "No buses please" | useHighwayBus: false, useLocalBus: false |
Ejemplos combinados / Combined Examples
Ejemplo 1 / Example 1: Viaje de negocios económico / 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
Ejemplo 2 / Example 2: Turismo tranquilo / Leisurely sightseeing
「京都から奈良まで、ゆっくり歩きで」
"From Kyoto to Nara, walking slowly"
→ from: 京都, to: 奈良, walkSpeed: slow
Ejemplo 3 / Example 3: Con prisa / In a hurry
「今すぐ渋谷から羽田空港、最速で、早歩きで」
"Right now from Shibuya to Haneda Airport, fastest route, fast walking"
→ from: 渋谷, to: 羽田空港, sortBy: time, walkSpeed: fast
Ejemplo 4 / Example 4: Condiciones complejas / 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
Ejemplo 5 / Example 5: Especificar estaciones intermedias / Specifying via stations
「東京から新宿まで、表参道と飯田橋を経由して、一番安いルートで」
"From Tokyo to Shinjuku via Omotesando and Iidabashi, cheapest route"
→ from: 東京, to: 新宿, via: ["表参道", "飯田橋"], sortBy: fare
Ejemplo 6 / Example 6: Ruta turística / Sightseeing route
「浅草から原宿まで、上野と秋葉原と東京を通って、ゆっくり歩きで」
"From Asakusa to Harajuku, passing through Ueno, Akihabara, and Tokyo, walking slowly"
→ from: 浅草, to: 原宿, via: ["上野", "秋葉原", "東京"], walkSpeed: slow
Desarrollo / 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
Detalles técnicos / Technical Details
- MCP SDK:
@modelcontextprotocol/sdk - Fuente de datos / Data source: Yahoo!乗換案内 (transit.yahoo.co.jp)
- Entorno de ejecución / Runtime: Node.js 18+
Notas / Notes
- Este MCP extrae datos de las páginas web de Yahoo! Tránsito This MCP scrapes Yahoo! Transit web pages
- Está pensado para uso personal Intended for personal use
- Consulta los términos de servicio de Yahoo! JAPAN Please check Yahoo! JAPAN's terms of service
- Es posible que no se incluya información de retrasos en tiempo real Real-time delay information may not be included
Licencia / License
MIT