norikae-mcp
🚃 乗換案内MCP - Pesquisa de transferência / Norikae MCP - Pesquisa de rotas de trem japonesas usando Yahoo! Transit
Documentação
norikae-mcp 🚃 / Norikae MCP
Um servidor MCP (Model Context Protocol) para pesquisar rotas de trem no Japão. Utiliza dados do Yahoo! Transit para encontrar as melhores rotas entre estações.
An MCP (Model Context Protocol) server for searching train routes in Japan. Uses Yahoo! Transit data to find optimal routes between stations.
Funcionalidades / Features
- 🚉 Pesquisa de rotas de trem entre estações / Station-to-station route search
- 🔀 Especificação de estações intermediárias (até 3 estações) / Via station specification (up to 3 stations)
- ⏰ Pesquisa em horário específico (especificação de horário de partida ou chegada) / Departure or arrival time specification
- 💰 Exibição de tarifa IC / IC card fare display
- 🔄 Comparação de número de baldeações e tempo de viagem / Transfer count and travel time comparison
Requisitos / Requirements
- Node.js 18 ou superior / Node.js 18+
Instalação / Installation
npm install -g norikae-mcp
Ou execute diretamente com npx / Or run directly with npx:
npx norikae-mcp
Configuração / Configuration
Configuração no Claude Desktop / Claude Desktop Configuration
Abra o arquivo de configuração e adicione o seguinte:
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"]
}
}
}
Após a configuração, reinicie o Claude Desktop.
After saving, restart Claude Desktop.
Configuração no Cursor / Cursor Configuration
Adicione o seguinte em ~/.cursor/mcp.json ou no .cursor/mcp.json do seu projeto:
Add the following to ~/.cursor/mcp.json or your project's .cursor/mcp.json:
{
"mcpServers": {
"norikae": {
"command": "npx",
"args": ["-y", "norikae-mcp"]
}
}
}
Ferramentas disponíveis / Available Tools
search_route
Pesquisa rotas de trem entre estações.
Search for train routes between stations.
Parâmetros / Parameters:
| Parâmetro | Tipo | Obrigatório | Descrição / Description |
|---|---|---|---|
from | string | ✅ | Estação de partida / Departure station (ex.: 東京, 新宿) |
to | string | ✅ | Estação de chegada / Arrival station (ex.: 九段下, 横浜) |
via | string[] | - | Matriz de estações intermediárias (máx. 3) / Via stations array (max 3) |
year | number | - | Ano de partida / Year (default: current) |
month | number | - | Mês de partida / Month (default: current) |
day | number | - | Dia de partida / Day (default: current) |
hour | number | - | Hora / Hour (default: current) |
minute | number | - | Minuto / Minute (default: current) |
Opções de pesquisa / Search Options:
| Parâmetro | Tipo | Padrão | Descrição / Description |
|---|---|---|---|
timeType | departure | arrival | first_train | last_train | unspecified | departure | Tipo de horário / Time type |
ticket | ic | cash | ic | Tipo de tarifa / Fare type |
seatPreference | non_reserved | reserved | green | non_reserved | Preferência de assento / Seat preference |
walkSpeed | fast | slightly_fast | slightly_slow | slow | slightly_slow | Velocidade de caminhada / Walking speed |
sortBy | time | transfer | fare | time | Ordem de classificação / Sort order |
Opções de transporte / Transport Options:
| Parâmetro | Tipo | Padrão | Descrição / Description |
|---|---|---|---|
useAirline | boolean | true | Usar companhias aéreas / Use airlines |
useShinkansen | boolean | true | Usar Shinkansen / Use Shinkansen |
useExpress | boolean | true | Usar trens expressos pagos / Use express trains |
useHighwayBus | boolean | true | Usar ônibus rodoviários / Use highway buses |
useLocalBus | boolean | true | Usar ônibus locais / Use local buses |
useFerry | boolean | true | Usar balsas / Use ferries |
Exemplos de uso (linguagem natural → opções) / Usage Examples (Natural Language → Options)
Ao falar com a IA da seguinte forma, as opções apropriadas são configuradas automaticamente.
When you ask the AI in natural language, the appropriate options are automatically set.
Pesquisa básica / Basic Search
| Sua pergunta / Your Question | Opções reconhecidas / Recognized Options |
|---|---|
| 「東京から九段下まで」 | from: 東京, to: 九段下 |
| 「新宿から横浜への行き方」 | from: 新宿, to: 横浜 |
| "How to get from Tokyo to Shibuya" | from: 東京, to: 渋谷 |
| "Route from Shinjuku to Yokohama" | from: 新宿, to: 横浜 |
Especificação de estações intermediárias / Via Stations
| Sua pergunta / Your Question | Opções reconhecidas / 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: ["原宿", "新宿"] |
Especificação de horário / Time Specification
| Sua pergunta / Your Question | Opções reconhecidas / 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 |
Especificação de horário de chegada / Arrival Time (timeType)
| Sua pergunta / Your Question | Opções reconhecidas / 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 |
Primeiro/Último trem / First/Last Train (timeType)
| Sua pergunta / Your Question | Opções reconhecidas / 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 |
Preferência de assento / Seat Preference (seatPreference)
| Sua pergunta / Your Question | Opções reconhecidas / Recognized Options |
|---|---|
| 「自由席で」 | seatPreference: non_reserved (padrão) |
| 「指定席で」 | 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)
| Sua pergunta / Your Question | Opções reconhecidas / Recognized Options |
|---|---|
| 「IC運賃で」 | ticket: ic (padrão) |
| 「きっぷの値段で」 | ticket: cash |
| 「Suicaで」 | ticket: ic |
| "Using IC card" | ticket: ic |
| "Cash fare please" | ticket: cash |
Velocidade de caminhada / Walking Speed (walkSpeed)
| Sua pergunta / Your Question | Opções reconhecidas / Recognized Options |
|---|---|
| 「急いでるので早歩きで」 | walkSpeed: fast |
| 「ゆっくり歩きたい」 | walkSpeed: slow |
| 「足が悪いのでゆっくり」 | walkSpeed: slow |
| "I'm in a hurry, fast walking" | walkSpeed: fast |
| "Walking slowly, I have luggage" | walkSpeed: slow |
Ordem de classificação / Sort Order (sortBy)
| Sua pergunta / Your Question | Opções reconhecidas / Recognized Options |
|---|---|
| 「一番早いルート」 | sortBy: time (padrão) |
| 「一番安いルート」 | sortBy: fare |
| 「乗り換え少ないのがいい」 | sortBy: transfer |
| "Fastest route" | sortBy: time |
| "Cheapest route" | sortBy: fare |
| "Fewest transfers" | sortBy: transfer |
Exclusão de tipos de transporte / Excluding Transport Types
| Sua pergunta / Your Question | Opções reconhecidas / 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 |
Exemplos combinados / Combined Examples
Exemplo 1 / Example 1: Viagem de negócios econômica / 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
Exemplo 2 / Example 2: Turismo tranquilo / Leisurely sightseeing
「京都から奈良まで、ゆっくり歩きで」
"From Kyoto to Nara, walking slowly"
→ from: 京都, to: 奈良, walkSpeed: slow
Exemplo 3 / Example 3: Com pressa / In a hurry
「今すぐ渋谷から羽田空港、最速で、早歩きで」
"Right now from Shibuya to Haneda Airport, fastest route, fast walking"
→ from: 渋谷, to: 羽田空港, sortBy: time, walkSpeed: fast
Exemplo 4 / Example 4: Condições complexas / 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
Exemplo 5 / Example 5: Especificando estações intermediárias / Specifying via stations
「東京から新宿まで、表参道と飯田橋を経由して、一番安いルートで」
"From Tokyo to Shinjuku via Omotesando and Iidabashi, cheapest route"
→ from: 東京, to: 新宿, via: ["表参道", "飯田橋"], sortBy: fare
Exemplo 6 / Example 6: Rota turística / Sightseeing route
「浅草から原宿まで、上野と秋葉原と東京を通って、ゆっくり歩きで」
"From Asakusa to Harajuku, passing through Ueno, Akihabara, and Tokyo, walking slowly"
→ from: 浅草, to: 原宿, via: ["上野", "秋葉原", "東京"], walkSpeed: slow
Desenvolvimento / 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
Detalhes técnicos / Technical Details
- MCP SDK:
@modelcontextprotocol/sdk - Fonte de dados / Data source: Yahoo!乗換案内 (transit.yahoo.co.jp)
- Ambiente de execução / Runtime: Node.js 18+
Observações / Notes
- Este MCP faz scraping das páginas web do Yahoo! Transit This MCP scrapes Yahoo! Transit web pages
- Destinado ao uso pessoal Intended for personal use
- Verifique os termos de serviço do Yahoo! JAPAN Please check Yahoo! JAPAN's terms of service
- Informações de atraso em tempo real podem não estar incluídas Real-time delay information may not be included
Licença / License
MIT