ekigraph
ekigraph 🚀
Английский | 日本語
MCP-сервер, который позволяет ИИ правильно отвечать на вопросы о железнодорожной сети Японии. Он даёт ИИ мгновенный доступ к данным о том, какие станции соединены путями, — все 9 043 станции по всей стране.
Почему я это создал
Когда я выхожу из дома или планирую поездку, мне часто хочется узнать что-то о железнодорожных станциях. Можно было бы поискать, но это хлопотно — поэтому я просто спрашиваю ИИ.
Проблема в том, что когда речь заходит о поездах, ИИ часто без колебаний врёт.
Вот случай, который произошёл на самом деле.
Я спросил ИИ: «Какая станция идёт следующей после Shin-Shibaura?» — и вот что он ответил:
Shin-Shibaura — новая станция на грузовой линии Tōkaidō; следующая остановка — Hama-Kawasaki.
Это полностью неверно. Shin-Shibaura находится на линии Tsurumi, а её соседние станции — Asano и Umi-Shibaura.
ИИ не сказал «я не знаю». Он выдумал ответ целиком, включая несуществующую железнодорожную линию.
Для крупных станций вроде Shinjuku или Shibuya ответы обычно точны. Но для небольших станций и местных линий, как в этом примере, риск галлюцинаций возрастает.
Related MCP server: IndianRailwaysMCP
Что вы получаете
Подключите ekigraph — и ИИ будет отвечать на основе верных данных, а не собственной памяти.
ekigraph построен на открытых данных, поэтому им может пользоваться кто угодно.
9 043 станции и 593 линии по всей стране — от синкансэна до метро, местных частных дорог и трамваев
Данные — с официального открытого портала японского правительства (MLIT National Land Numerical Information)
Поставляется как единый файл в 2 МБ — без 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"] } }После этого просто общайтесь в обычном режиме — и ИИ возвращает верные ответы.
Даже обычный вопрос вроде «так что за станция была после Urawa?» получит полноценный ответ с опорой на ekigraph.
Инструменты
neighbors(station)— возвращает станции, соединённые путями, с названиями линий.subgraph(station, radius)— возвращает исходые данные о путях вокруг станции без изменений.
Вне охвата
Расписания, тарифы, схемы остановок экспрессов и информация о задержках не входят.
ekigraph хранит только одну вещь: как соединяются пути.
Объединение станций (когда станции Shibuya у JR, Metro, Tokyu и Keio считаются за одну станцию) выполняется по официальным межоператорам составных группам MLIT.
О данных
Источник: National Land Numerical Information (Railway Data, N02-24) — даннные MLIT Japan, обработанные и распроттраненные в соответствии со Стандартными условиями использования правительства Японии v2.0 (совместимо с CC BY 4.0).
Чтобы пересобрать данные самостоятельно:
uv run python etl/build_graph_n02.py(скачивает исходные данные, узнаёт смежные станции и всё проверяет — полностью автоматически)
Лицензия
Код: MIT. Об использовании встроенных данных CDCM / see LICENSE.
Available Tools
2 toolsneighborsA
駅の線路上の隣接駅(グラフのエッジ)を返す。路線名つき。注意: 線路の隣接であり、特定の列車(急行等)が停まるかは分からない。
| Name | Required | Description | Default |
|---|---|---|---|
| station | Yes | 駅名(例: 渋谷) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently states that it returns graph edges with line names and importantly discloses a limitation: it does not indicate whether specific trains stop. This is valuable context beyond a simple 'returns neighbors'. It does not mention side effects or read-only nature, but for a query tool this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no waste. It front-loads the core purpose (returns adjacent stations with line names) and then adds the important caveat. All information earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for a simple one-parameter tool with no output schema. It explains what is returned (adjacent stations, line names) and a key limitation. It does not detail the exact response structure (e.g., objects with station/line fields) or handle error cases, but for a tool this simple, the description is adequately complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully documents the parameter with a description ('駅名(例: 渋谷)'), so schema coverage is 100%. The description does not add additional parameter-specific meaning; it only elaborates on the output. Given the high schema coverage, a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('返す' - returns), resource (adjacent stations on the track), and adds context (graph edges, line names). It also distinguishes itself from a generic 'neighbors' by specifying it's track-level adjacency, not train stops, which differentiates it from the sibling 'subgraph' tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context that it returns track adjacency but does not explicitly state when to use this tool versus the sibling 'subgraph'. There is no direct comparison or 'use this when' guidance. The note about train stops is a limitation, not usage guidance, so the usage is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
subgraphA
駅の周辺の生グラフ(半径N駅のエッジ一覧・種別つき)をそのまま返す。neighbors で足りない構造の問いはこれを読んで自分で辿る。
| Name | Required | Description | Default |
|---|---|---|---|
| radius | No | 半径(駅数。既定2、最大4) | |
| station | Yes | 中心の駅名 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the result is raw/unprocessed ('生グラフ...そのまま返す'), includes edge types, and requires the caller to do its own traversal. These are useful behavioral cues, but it does not disclose return format details, whether the result has limitations beyond the schema's stated max radius, or any other operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences with zero filler. The purpose is front-loaded in the first sentence, and the second adds usage guidance that differentiates from the sibling. Each sentence earns its place, though the overall lean length trades off some behavioral depth.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description is the only source for return expectations. It conveys that the result is a typed edge list within a radius, which is adequate for a simple two-parameter read tool. However, it omits the concrete output format and any structural details of the graph, leaving the agent to infer what 'raw graph' means in practice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%: both radius (default 2, max 4) and station are already documented in the input schema. The description reinforces the radius concept ('半径N駅') but adds no meaning beyond what the schema already provides. Baseline 3 is correct when the schema carries the parameter documentation burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource: it returns the raw graph (edge list with type) within radius N stations around a station. It explicitly distinguishes itself from the sibling 'neighbors' by noting it serves structural queries that neighbors cannot handle and requires self-traversal. An agent can differentiate subgraph from neighbors without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The second sentence gives clear when-to-use guidance: for structural queries that neighbors doesn't suffice for, read this and traverse it yourself. It references the alternative tool and the condition that selects it. However, it does not explicitly state the inverse (e.g., 'use neighbors for simple neighbor lookups'), leaving that exclusion implied rather than stated.
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.
2 tool updates
v0.1.0- First observed
neighbors - First observed
subgraph
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.
Maintenance
Related MCP Connectors
Deep, obscure Japanese station, accessibility & hazard data for AI agents. English-first.
Japan data tools for AI agents: calendar (rokuyo), address, name splitting, corporate number lookup
The internet's infrastructure graph for AI agents - 46B nodes and edges, free trial via 2 HTTP calls
Purpose-aware accessibility scoring for every coordinate in Japan.
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.101MIT
- FlicenseNot gradedqualityBmaintenanceEnables 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.-
- AlicenseAqualityBmaintenanceProvides 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
- AlicenseBqualityBmaintenanceEnables natural language queries to KORAIL public data including station facilities, train operations, statistics, freight, and urban rail information across various AI clients.9827 PyPI3MIT