ekigraph
ekigraph 🚄
English | 日本語
一个让 AI 能正确回答日本铁路网相关问题的 MCP 服务器。 它让 AI 可以即时访问“哪些车站之间由轨道连接”的数据——覆盖日本全国全部 9,043 座车站。
我为什么做这个
出去或计划旅行的时候,我经常会想查一些关于车站的信息。 我可以自己去搜,但那样太麻烦——所以我选择直接问 AI。
问题在于:一聊到铁路,AI 经常毫不犹豫地睁眼说瞎话。
下面是一个真实发生的事情。
我问 AI「Shin-Shibaura 站的下一站是哪站?」,它的回答是:
Shin-Shibaura 是东海道货物线上的一个新建车站,下一站是 Hama-Kawasaki。
这完全是错误的。Shin-Shibaura 在鹤见(Tsurumi)线上,其相邻车站是 Asano 和 Umi-Shibaura。
AI 并没有老老实实说“我不知道”。它反而编造了一个答案,连一条根本不存在的铁路线都凭空造了出来。
像新宿(Shinjuku)或涩谷(Shibuya)这样的大站,AI 的回答通常还算准确。 但在这种小站和地方线路面前,出现幻觉的概率就会大大增加。
Related MCP server: IndianRailwaysMCP
你能获得什么
接入 ekigraph 之后,AI 就会改用正确数据作答,不再依赖它自己的记忆。
ekigraph 构建于开放数据之上,任何人都能使用。
覆盖全国 9,043 座车站和 593 条线路——从新干线到地铁,再到地方私铁和有轨电车
数据来自日本政府的官方开放数据(MLIT National Land Numerical Information)
以捆绑为一个 2 MB 文件的形式发行——无需 API 密钥,完全免费,离线可用
如何使用
# Claude Code — one line
claude mcp add ekigraph -- uvx --from git+https://github.com/yataro-fujinaga/ekigraph ekigraph在使用 Claude Desktop 或其他 MCP 客户端时,把下面这段加入你的配置:
{ "ekigraph": { "command": "uvx", "args": ["--from", "git+https://github.com/yataro-fujinaga/ekigraph", "ekigraph"] } }配置完成后,你只需正常说话,AI 就会返回正确无一处。
即使是随口一句“浦和(Urawa)的下一站是哪站来着?”,也能被 ekigraph 加持之下的 AI 精确作答。
工具
neighbors(station)— 返回与该站相邻的可直达车站及线路名称subgraph(station, radius)— 返回该站周围原始的轨道数据,原样呈现
不适用情况
具体的时刻表、票价、特快停靠站和晚点信息不在本项目范围内。
ekigraph 只包含一件事:轨道是如何连接的。
车站合并的处理(例如把涩谷的 JR、东京地铁、东急和京线算作一个“涩谷站”)遵循 MLIT 官方的跨运营站组代码。
关于数据
来源Nag,为:日本国土交通省([National Land Numerical Information (Railway), 2-04)](https://.
重建方式为:
uv run python ump/build_graph.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.
Free Japanese public-data tools for AI agents: holidays, business days, wareki, tax, postcodes.
Official Japan inbound travel & cross-border rules for AI Agents (Tax-Free, Shinkansen).
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.108MIT