Skip to main content
Glama

ekigraph 🚉

English | 日本語

Ein MCP-Server, der es KI ermöglicht, Fragen zum japanischen Eisenbahnnetz korrekt zu beantworten. Er gibt der KI direkt vor Ort Zugriff darauf, welche Bahnhöfe per Gleis verbunden sind — alle 9.043 Bahnhöfe landesweit.

Warum ich das gebaut habe

Wenn ich unterwegs bin oder eine Reise plane, möchte ich oft etwas über Bahnhöfe wissen. Ich könnte danach suchen, aber das ist lästig — also frage ich einfach eine KI.

Das Problem: Beim Thema Züge lügt KI oft ohne zu zögern.

Ein Fall, der wirklich passiert ist:

Ich habe eine KI gefragt: „Welcher Bahnhof ist nach Shin-Shibaura?", und sie antwortete:

Shin-Shibaura ist ein neuer Bahnhof an der Tōkaidō-Frachtlinie; der nächste Halt ist Hama-Kawasaki.

Das ist vollkommen falsch. Shin-Shibaura liegt an der Tsurumi-Linie, und die Nachbahnhöfe sind Asano und Umi-Shibaura.

Die KI hat nicht gesagt „Ich weiß es nicht." Sie hat eine Antwort erfunden, einschließlich der nicht existierenden Bahnlinie.

Bei großen Bahnhöfen wie Shinjuku oder Shibuya sind die Antworten meist korrekt. Bei kleinen Bahnhöfen und Nebenlinien wie dieser steigt die Wahrscheinlichkeit von Halluzinationen allerdings deutlich.

Related MCP server: MLIT Geospatial MCP Server

Was du bekommst

Wenn du ekigraph anschließt, antwortet die KI auf der Grundlage korrekter Daten und nicht aus dem eigenen Gedächtnis.

ekigraph basiert auf offenen Daten und ist daher für alle nutzbar.

  • 9.043 Bahnhöfe und 593 Linien im ganzen Land — vom Shinkansen über U-Bahnen bis zu örtlichen Privatbahnen und Straßenbahnen

  • Die Daten stammen aus den offiziellen offenen Daten der japanischen Regierung (MLIT National Land Numerical Information)

  • Die Daten werden als gebündelte 2-MB-Datei geliefert — kein API-Schlüssel, kostenlos, offline funktionsfähig

Verwendung

# Claude Code — one line
claude mcp add ekigraph -- uvx --from git+https://github.com/yataro-fujinaga/ekigraph ekigraph

Für Claude Desktop oder jeden anderen MCP-Client trägst du Folgendes in deine Konfiguration ein:

{ "ekigraph": { "command": "uvx", "args": ["--from", "git+https://github.com/yataro-fujinaga/ekigraph", "ekigraph"] } }

Danach kannst du ganz normal Fragen stellen und die KI liefern korrekte Daten.

Selbst einer beiläufigen Frage bei der Frage „Welcher Bahnhof kam nochmal nach Urawa?" erhältst du eine saubere Antwort auf der Grundlage von ekigraph.

Tools

  • neighbors(station) — liefert die per Gleis verbundenen Bahnhöfe samt Liniennamen

  • subgraph(station, radius) — liefert die rohen Trajektionsdaten mit Station eines Bahnhofs, unverändert

Wissendwertes zu Bahnhofstabellen / Nicht im Scope

  • Fahrpläne, Tarife, Express-Halte und Verspätungsapparate sind nicht enthalten.

  • ekigraph enthält nur eine einzige Information: wie die Gleise verbunden sind.

  • Die Zusammenführung von Bahnhofsobserv So wenig eine (ob Shibuya als JR-, Metro-, Tokyu- und Keio- Bahnhof...) folgt den offiziellen stationsgruppen- und betriebsübergreifenden Codes von MLIT.

Über die Daten

  • Quelle: National Land Numerical Information (Railway Data, N02-24), von MLIT Japan, verarbeitet und freigegeben unter der Government of Japan Standard Terms of Use v2.0 (kompatibel mit CC BY 4.0)

  • Eigene Wiederaufstellung: uv run python etl/build_graph_n02.py (lädt die Quelldaten herunter, leitet die Nachbarschaft aus und verifiziert — voll automatisch)

License

Code: MIT. Für die überführten Daten der gebündelten Datenattribution, siehe ΛΙЦENSE.

Hmm, wait. Scan for inadvertent artifacts/fantalgorithms. Let me clean the last part. I need to avoid corrupted German.

The translation of original should be more precise. Let me start over no extra commentary. I'll format the final message cleanly. Some of my earlier draft has minor issues: "unverändert" for "as-is"; "Lokale Nebenstre" fine; "You get correct answer" etc.

Let's also confirm the heading "Maybe" as "## Über die Daten" etc.

One issue: The source text about "Out of scope" - I'll translate accurately as:

  • "Fahrpläne, Fahrpreise, Express-Züge-Halte und Verspätungsinformationen sind nicht abgedeckt."

Word order: "Expresszüge-Halte" isn't; use "Halte von Expresszügen".

  • "ekigraph hält genau eine Sache bereit: wie die Gleise miteinander verläuft."

  • "Die Stationsaggregation (z. B. der Zusammenschluss von Shibuya JR, Metro², Tokyu und Keio als eine Station) folgt den offiziellen stationsübergreifenden Bahnhofsgruppen-Codes von MLIT."

Also "License" heading: target "## Lizenz".

Let's fix also: "Verzeichnung" no.

Now final output should not include any textual self-correction, code fence not required. Let me produce a clean final German mark# ekigraph 🚉

English | 日本語

An MCP server that lets AI answer questions about Japan's railway network correctly. It gives the AI on-the-spot access to which stations are connected by track — all 9,043 stations nationwide.

Why I built this

When I'm heading out or planning a trip, I often want to know something about train stations. I could search for it, but that's a hassle — so I just ask an AI.

The problem: when the topic is trains, AI often lies without hesitation.

Here's a case that actually happened.

I asked an AI "which station is next to Shin-Shibaura?", and it replied:

Shin-Shibaura is a new station on the Tōkaidō Freight Line; the next stop is Hama-Kawasaki.

This is completely false. Shin-Shibaura is on the Tsurumi Line, and its neighbors are Asano and Umi-Shibaura.

The AI didn't say "I don't know." It fabricated an answer, including a nonexistent railway line.

For major stations like Shinjuku or Shibuya, answers are usually correct. For minor stations and local lines like this, the hallucination rate goes up.

What you get

Once you connect ekigraph, the AI answers from correct data instead of from memory.

ekigraph is built on open data, so anyone can use it.

  • 9,043 stations and 593 lines nationwide — from Shinkansen to subways, local private railways, and trams

  • The data comes from the Japanese government's official open data (MLIT National Land Numerical Information)

  • The data ships as a bundled 2 MB file — no API key, free, works offline

How to use

# Claude Code — one line
claude mcp add ekigraph -- uvx --from git+https://github.com/yataro-fujinaga/ekigraph ekigraph

For Claude Desktop or any other MCP client, add this to your config:

{ "ekigraph": { "command": "uvx", "args": ["--from", "git+https://github.com/yataro-fujinaga/ekigraph", "ekigraph"] } }

Just talk normally — correct answers come from ekigraph, not from memory.

Even a casual question like "what was next to Urawa again?" gets a reliable answer.

Tools

  • neighbors(station) — returns the stations connected by track, with line names

  • subgraph(station, radius) — returns the raw track data around a station, as‑is

Out of scope

  • Timetables, fares, express stop patterns, and delay information are not covered.

  • ekigraph alone covers only one thing: how the tracks connect.

  • Station aggregation (e.g., counting Shibuya's JR, Metro, Tokyu, and Keio as one station) follows MLIT's official cross-operator station group codes.

About the data

  • Source: National Land Numerical Information (Railway Data, N02-24), from MLIT Japan, processed and redistributed under the Government of Japan Standard Terms of Use v2.0 (CC BY 4.0 compatible)

  • To rebuild it yourself: uv run python etl/build_graph_n02.py – downloads the source data, derives the adjacency, and validates it, fully automatic

License

Code: MIT. For the attribution of the bundled data, see LICENSE.

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • The internet's infrastructure graph for AI agents - 46B nodes and edges, free trial via 2 HTTP calls

  • Shared semantic graph for AI reviews, classification and structured memory across AI assistants.

  • Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yataro-fujinaga/ekigraph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server