Skip to main content
Glama

乗換案内MCP 🚃 / Norikae MCP

npm version License: MIT

日本の電車乗り換え検索ができるMCP(Model Context Protocol)サーバーです。 Yahoo!乗換案内のデータを使用して、駅から駅への最適なルートを検索できます。

An MCP (Model Context Protocol) server for searching train routes in Japan. Uses Yahoo! Transit data to find optimal routes between stations.

機能 / 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

Related MCP server: ÖPNV MCP Server

必要条件 / 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

設定ファイルを開いて以下を追加してください:

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"]
    }
  }
}

設定後、Claude Desktopを再起動してください。

After saving, restart Claude Desktop.

Cursor での設定 / Cursor Configuration

~/.cursor/mcp.json または プロジェクトの .cursor/mcp.json に以下を追加:

Add the following to ~/.cursor/mcp.json or your project's .cursor/mcp.json:

{
  "mcpServers": {
    "norikae": {
      "command": "npx",
      "args": ["-y", "norikae-mcp"]
    }
  }
}

使用できるツール / Available Tools

search_route

駅から駅への電車ルートを検索します。

Search for train routes between stations.

パラメータ / 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

number

-

時 / Hour (default: current)

minute

number

-

分 / Minute (default: current)

検索オプション / 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

boolean

true

空路を使う / Use airlines

useShinkansen

boolean

true

新幹線を使う / Use Shinkansen

useExpress

boolean

true

有料特急を使う / Use express trains

useHighwayBus

boolean

true

高速バスを使う / Use highway buses

useLocalBus

boolean

true

路線バスを使う / Use local buses

useFerry

boolean

true

フェリーを使う / Use ferries

使用例(自然言語 → オプション)/ Usage Examples (Natural Language → Options)

AIに以下のように話しかけると、自動的に適切なオプションが設定されます。

When you ask the AI in natural language, the appropriate options are automatically set.

あなたの質問 / Your Question

認識されるオプション / Recognized Options

「東京から九段下まで」

from: 東京, to: 九段下

「新宿から横浜への行き方」

from: 新宿, to: 横浜

"How to get from Tokyo to Shibuya"

from: 東京, to: 渋谷

"Route from Shinjuku to Yokohama"

from: 新宿, to: 横浜

経由駅の指定 / Via Stations

あなたの質問 / Your Question

認識されるオプション / 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: ["原宿", "新宿"]

時刻指定 / Time Specification

あなたの質問 / Your Question

認識されるオプション / 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

到着時刻指定 / Arrival Time (timeType)

あなたの質問 / Your Question

認識されるオプション / 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

始発・終電 / First/Last Train (timeType)

あなたの質問 / Your Question

認識されるオプション / 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

座席指定 / Seat Preference (seatPreference)

あなたの質問 / Your Question

認識されるオプション / 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

運賃タイプ / Fare Type (ticket)

あなたの質問 / Your Question

認識されるオプション / Recognized Options

「IC運賃で」

ticket: ic (default)

「きっぷの値段で」

ticket: cash

「Suicaで」

ticket: ic

"Using IC card"

ticket: ic

"Cash fare please"

ticket: cash

歩く速度 / Walking Speed (walkSpeed)

あなたの質問 / Your Question

認識されるオプション / Recognized Options

「急いでるので早歩きで」

walkSpeed: fast

「ゆっくり歩きたい」

walkSpeed: slow

「足が悪いのでゆっくり」

walkSpeed: slow

"I'm in a hurry, fast walking"

walkSpeed: fast

"Walking slowly, I have luggage"

walkSpeed: slow

並び順 / Sort Order (sortBy)

あなたの質問 / Your Question

認識されるオプション / Recognized Options

「一番早いルート」

sortBy: time (default)

「一番安いルート」

sortBy: fare

「乗り換え少ないのがいい」

sortBy: transfer

"Fastest route"

sortBy: time

"Cheapest route"

sortBy: fare

"Fewest transfers"

sortBy: transfer

交通手段の除外 / Excluding Transport Types

あなたの質問 / Your Question

認識されるオプション / 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

組み合わせ例 / 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ページをスクレイピングしています This MCP scrapes Yahoo! Transit web pages

  • 個人利用を想定しています Intended for personal use

  • Yahoo! JAPANの利用規約をご確認ください Please check Yahoo! JAPAN's terms of service

  • リアルタイムの遅延情報は含まれない場合があります Real-time delay information may not be included

ライセンス / License

MIT

Available Tools

1 tool
search_route乗り換え検索A
Read-only

Search train routes between stations in Japan using Yahoo! Transit.

IMPORTANT: Station names MUST be in Japanese kanji/kana. Convert before calling:

English → Japanese:

  • Tokyo → 東京, Shinjuku → 新宿, Shibuya → 渋谷, Ikebukuro → 池袋

  • Ueno → 上野, Akihabara → 秋葉原, Ginza → 銀座, Roppongi → 六本木

  • Yokohama → 横浜, Osaka → 大阪, Kyoto → 京都

  • Narita Airport → 成田空港, Haneda Airport → 羽田空港

Chinese (Simplified/Traditional) → Japanese kanji:

  • 东京/東京 → 東京, 新宿 → 新宿, 涩谷/澀谷 → 渋谷

  • 秋叶原/秋葉原 → 秋葉原, 横滨/橫濱 → 横浜 Note: Japanese kanji may differ from Chinese hanzi (e.g., 渋 vs 涩/澀, 横 vs 横/橫)

Examples:

  • "Tokyo to Shinjuku" → from: "東京", to: "新宿"

  • "从东京到新宿" → from: "東京", to: "新宿"

  • "Shibuya to Ikebukuro via Harajuku" → from: "渋谷", to: "池袋", via: ["原宿"]

Options summary:

  • timeType: departure(出発), arrival(到着), first_train(始発), last_train(終電), unspecified(指定なし)

  • ticket: ic(ICカード), cash(きっぷ)

  • seatPreference: non_reserved(自由席), reserved(指定席), green(グリーン車)

  • walkSpeed: fast(急いで), slightly_fast(少し急いで), slightly_slow(少しゆっくり), slow(ゆっくり)

  • sortBy: time(到着が早い順), transfer(乗換回数順), fare(料金安い順)

  • useAirline, useShinkansen, useExpress, useHighwayBus, useLocalBus, useFerry: true/false

ParametersJSON Schema
NameRequiredDescriptionDefault
toYes到着駅名 / Arrival station (例: 横浜, Shibuya)
dayNo出発日 / Day (1-31)
viaNo経由駅名の配列(最大3駅)/ Via stations array (max 3)
fromYes出発駅名 / Departure station (例: 東京, Shinjuku)
hourNo出発時刻の時 / Hour (0-23)
yearNo出発年 / Year (例: 2026)
monthNo出発月 / Month (1-12)
minuteNo出発時刻の分 / Minute (0-59)
sortByNo並び順 / Sort by: time=到着が早い順、transfer=乗換回数順、fare=料金安い順
ticketNo運賃タイプ / Fare type: ic=IC運賃、cash=きっぷ運賃
timeTypeNo時刻指定タイプ / Time type: departure=出発時刻、arrival=到着時刻、first_train=始発、last_train=終電、unspecified=指定なし
useFerryNoフェリーを使う / Use ferries
walkSpeedNo歩く速度 / Walking speed
useAirlineNo空路を使う / Use airlines
useExpressNo有料特急を使う / Use express trains
useLocalBusNo路線バスを使う / Use local buses
useHighwayBusNo高速バスを使う / Use highway buses
useShinkansenNo新幹線を使う / Use Shinkansen
seatPreferenceNo座席指定 / Seat preference: non_reserved=自由席優先、reserved=指定席優先、green=グリーン車優先

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description need not restate safety. It adds valuable behavioral context by explaining that station names require language conversion, providing concrete examples, and summarizing option meanings (e.g., timeType, ticket). This goes beyond annotations and helps the agent understand input requirements, though it does not cover all edge cases like error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with clear sections (IMPORTANT, conversion tables, examples, options summary). Each section serves a distinct purpose: no fluff, and the conversion information is essential for correct use. It is front-loaded with the core function, though it could be marginally tighter by merging redundant option explanations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 19 parameters and no output schema, the description compensates by covering critical operational details: language conversion, option semantics, and examples. It does not explain the result structure, but that is not required without an output schema. For a complex tool, this description is reasonably complete, though it could mention nonexistent station handling or API limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with every parameter described, so baseline is 3. The description adds significant value beyond schema by offering conversion tables (English/Chinese → Japanese kanji), examples for via stations, and human-readable translations for enum values (e.g., departure=出発). This enhances parameter understanding and helps agents use the tool correctly, especially for station names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Search train routes between stations in Japan using Yahoo! Transit,' which clearly states the verb (search), resource (train routes), and geographic scope (Japan). It distinguishes itself by specifying the Japanese rail context, making its purpose unambiguous even without sibling comparisons.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Station names MUST be in Japanese kanji/kana. Convert before calling' followed by detailed conversion tables and examples. It clearly specifies when to use the tool (for Japan train routes) but does not explicitly discuss when not to use it or mention alternatives, as there are no sibling tools. This is strong contextual guidance but stops short of the full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.3
    • First observedsearch_route

TDQS

A4.3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no ambiguity or overlap with other tools. The purpose of search_route is clear and unique.

Naming Consistency5/5

The single tool name 'search_route' follows a clean verb_noun pattern. Consistency is trivially maintained with only one tool.

Tool Count3/5

The server has exactly one tool for a very focused domain. While not excessive, it feels thin for a route search service that might benefit from supporting tools like station lookup or route alternatives.

Completeness4/5

The search_route tool covers the core route search functionality with extensive options (time, ticket, seat, walk speed, sort order, and transit mode filters). However, there are minor gaps such as no station information or direct comparison of multiple routes.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An 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.
    3
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for Japanese public transit journey planning with interactive map UI, enabling station search, route planning, and departure lookups via natural language.
    MIT