ekigraph
ekigraph 🚀
English | 日本 語
日本の鉄道網の質問にAIが正しく答えるためのMCPサーバーです。
AIは全国 9,043駅について、どの駅が線路で接続しているかを、その場で参照できます。
これを作った理由
出かけ先や旅行の計画に際して、駅について何か知りたいことがあります。
調べれば済む話ですが、面倒だからAIに聞いてしまます。
問題は、鉄道をテーマにしたとたん、AIが平気で嘘を言うことがあることです。
実際に起きたケースがあります。
AIに「新芝浦の隣の駅はどこ?」と尋ねると、次のように答えました:
新芝浦は東海道貨物線の中間前の新設駅で、隣は浜川崎です。
これは完全に間違い。新芝浦は鶴見線の駅で、隣は浅野と海芝浦です。
AIは、「知らない」と答えはせずに、不存在の路線までも含めて回答でっち上げたのです。
新宿や渋谷のような大きな駅では、回答は正確です。
しかしこのような小さな駅やローカル線となると、幻覚のリスクが高まります。
Related MCP server: IndianRailwaysMCP
得られるもの
ekigraphと繋げば、AIは記憶ではなく正確なデータから答えます。
ekigraphはオープンデータで構築されているので、誰でも利用できます。
全国9,043駅・593路線に対応 — 新幹線から地下鉄、ローカル私鉄、路面電車まで
データは日本政府の公式オープンデータ(MLIT National Land Numerical Information)に基づいてます
2MBのバンドルファイルで提供され — APIキー不要、無料、オフラインで動作
使い方
# Claude Code — one line
claude mcp add ekigraph -- uvx --from git+https://github.com/yataro-fujinaga/ekigraph ekigraphClaude Desktop やその他のMCPクライアントには、設定を追加します:
{ "ekigraph": { "command": "uvx", "args": ["--from", "git+https://github.com/yataro-fujinaga/ekigraph", "ekigraph"] } }その後は、普段通りに話しかけるだけで、AIが正しい答えを返します。
「浦和の隣駅って何だったっけ」という軽い質問にも、え kigraphに基づいた正確な回答が返ってくるのです。
ツール
neighbors(station)— その駅に線路で接続された駅と、線路の名前を返すsubgraph(station, radius)— 駅周辺の未加工の線路データを、そのまま返す
対象外
時刻表、運賃、速達列車の停車駅、遅延情報は 対象外です。
キノハは「線路がどう接続しているか」 持っています。
駅の集約(渋谷のJR・メトロ・東急・京王駅を1駅として扱う)は、MLIT公式の事業者間の駅グループコードに従います。
データについて
出典:国番地理情報(鉄道データ、N02-24)(MLIT Japan)を加工・再配布したものです。
日本政府の利用規約(v2.0)に準拠(CC BY 4.0互換)しています。自分で作り直す場合は:
uv run python etl/build_graph_n02.py
(ソースデータのダウンロードから隣接の導出、検証までを自動で実施します)
ライセンス
コードはMIT。同梱データの著作権表記については、LICENSEをご覧ください。
Available Tools
2 toolsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve distinct purposes: neighbors provides direct adjacent stations on railway lines, while subgraph returns a broader local graph structure. Descriptions clearly delineate their use cases, minimizing confusion despite some overlap in domain.
Both tool names are single lowercase nouns, following a consistent style (neighbors, subgraph). While not verb_noun, the convention is uniform and predictable, making it easy to understand their roles.
With only two tools, the server feels thin but is appropriate for a very focused purpose of querying station graph adjacency. It sits at the lower end of acceptable, lacking broader functionality but not being excessively sparse.
The tools cover only graph traversal (direct neighbors and subgraph), but lack basic station metadata retrieval, pathfinding, or line-specific queries. This creates significant gaps for common tasks, limiting the server's usefulness.
Related MCP Connectors
Japan POI tools for AI agents: 2.94M facilities, station catchments, chains, grants and signals
Deep, obscure Japanese station, accessibility & hazard data for AI agents. English-first.
Official Japan inbound travel & cross-border rules for AI Agents (Tax-Free, Shinkansen).
Japan data tools for AI agents: calendar (rokuyo), address, name splitting, corporate number lookup
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables route planning and transit information retrieval for Japan using the public Transit API. Supports searching stations, planning routes, and checking departures.102MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to query real-time Indian Railways data including train schedules, live status, PNR status, seat availability, fares, and coach positions via the Model Context Protocol.-
- AlicenseAqualityCmaintenanceProvides read-only access to structured Japanese railway data, enabling station searches without an API key and live Shinkansen timetable, fare, seat class, and stop queries with an Ekispert API key.7MIT
- AlicenseAqualityBmaintenanceProvides AI assistants with live Indian Railways data, including trains between stations, real-time seat availability, fares, PNR status, and timetables, without requiring an API key.10875 npmMIT