Skip to main content
Glama

ekigraph 🚉

Inglés | 日本語

Un servidor MCP que permite a la IA responder correctamente a preguntas sobre la red ferroviaria de Japón. Le da a la IA acceso inmediato a qué estaciones están conectadas por vía: las 9.043 estaciones de todo el país.

Por qué lo he creado

Cuando estoy a punto de salir o planeando un viaje, a menudo me interesa saber algo sobre una estación de tren. Podría buscarlo, pero es una molestia: así que le pregunto a una IA.

El problema es que, cuando el tema son los trenes, la IA a menudo miente sin dudar.

Aquí tienes un caso que ocurrió de verdad.

Le pregunté a una IA «¿qué estación está después de Shin-Shibaura?», y respondió:

Shin-Shibaura es una estación nueva en la línea de mercancías Tōkaidō; la siguiente parada es Hama-Kawasaki.

Esto es completamente falso. Shin-Shibaura está en la línea Tsurumi, y sus estaciones vecinas son Asano y Umi-Shibaura.

La IA no dijo «No lo sé». Inventó una respuesta, incluida una línea de ferrocarril inexistente.

Para estaciones importantes como Shinjuku o Shibuya, las respuestas suelen ser correctas. Pero en estaciones menores y líneas locales como esta, las posibilidades de alucinación aumentan.

Related MCP server: IndianRailwaysMCP

Qué se obtiene

Conecta ekigraph y la IA responde basándose en datos correctos en lugar de en su propia memoria.

ekigraph está creado a partir de datos abiertos, así que cualquiera puede usarlo.

  • 9.043 estaciones y 593 líneas en todo el país, desde shinkansen hasta metros, ferrocarriles privados y tranvías.

  • Los datos provienen de los datos abiertos oficiales del Gobierno de Japón (MLIT National Land Numerical Information).

  • Viene incluido en un archivo compacto de 2 MB — sin necesidad de API key, gratis y funciona sin conexión.

Cómo usarlo

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

Para Claude Desktop o cualquier otro cliente de MCP, añade esto a tu configuración:

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

A partir de ahí, solo habla con normalidad y la IA devuelve respuestas correctas.

Incluso una pregunta informal como «¿qué venía después de Urawa?» recibe una respuesta adecuada, gracias a ekigraph.

Herramientas

  • neighbors(station) — devuelve las estaciones conectadas por vía, con los nombres de línea.

  • subgraph(station, radius) — devuelve los datos de vía alrededor de una estación, tal cual.

Queda fuera del alcance

  • Horarios, tarifas, patrones de paradas de expresos e información de retrasos no están cubiertos.

  • Ekames solo contiene una cosa: cómo se conectan las vías.

  • La agrupación de estaciones (p. ej., contar la de Shibuya como única para JR, Metro, Tokyu y Keio) sigue los códigos oficiales de estación de MLIT.

Sobre los datos

  • Fuente: Numerical Information of Land (Railway) de MLIT, procesado y redistribuido bajo los términos de uso del Gobierno de Japón, versión 2.0 (compatible con CC BY 2.0).

  • Para reconstruir los datos tú mismo: uv run python etl/build_graph_n02.py (descarga los datos originales, calcula la adyacencia y la valida — completamente automático).

Licencia

Código: MIT. Para la atribución de los datos incluidos, consulta LICENSE.

Available Tools

2 tools
neighborsA

駅の線路上の隣接駅(グラフのエッジ)を返す。路線名つき。注意: 線路の隣接であり、特定の列車(急行等)が停まるかは分からない。

NameRequiredDescriptionDefault
stationYes駅名(例: 渋谷)

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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 で足りない構造の問いはこれを読んで自分で辿る。

NameRequiredDescriptionDefault
radiusNo半径(駅数。既定2、最大4)
stationYes中心の駅名

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 2 tool updatesv0.1.0
    • First observedneighbors
    • First observedsubgraph

TDQS

A3.7/5.0

Scored across 2 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count3/5

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.

Completeness2/5

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

ActivitySlowing
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables 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.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Provides 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.
    7
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Provides 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.
    10
    8
    454 npm
    MIT