open-transit-radar
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@shadojus/open-transit-radar
Zero-dependency Worldwide Public Transit engine: global rail/metro hubs, GTFS CSV/TSV → node:sqlite compiler, curated official GTFS/GTFS-RT feed directory, allowlisted live departure adapters (Entur Norway GraphQL & Swiss OpenTransportData/stationboard), REST OpenAPI 3.1 server, CLI, MCP 2024-11-05 stdio server, Python stdlib client, and Dark-Instrument Split-Flap Radar UI.
Zero runtime dependencies (
"dependencies": {}in Node 22.5+/24; Python 3.9+ stdlib only)99 global rail/metro/tram/ferry hubs across
DE,AT,CH,FR,GB,NO,SE,FI,NL,US,JP,AU41 curated official open transit feeds (Mobility Database
CC0-1.0, DELFI DE /gtfs.de, OpenTransportData.swiss, Entur NO, SNCF/PAN FR, TfL/BODS GB, Trafiklab SE, HSL/Digitransit FI, OVapi NL, MTA/MBTA/CTA/BART/KCM/WMATA US, GTFS-JP/ODPT JP, TfNSW/PTV/TransLink AU)GTFS →
node:sqlitecompiler (stops.txt,routes.txt,trips.txt,stop_times.txt,calendar.txt)Strict HTTPS allowlist for live departures (
api.entur.io,transport.opendata.ch,api.opentransportdata.swiss)
Quick Start (Node ESM)
import {
stopsNear,
searchStops,
departures,
listFeeds,
importGtfsDirectory,
} from "@shadojus/open-transit-radar";
// 1. Nearby global transit hubs (haversine km)
const nearby = stopsNear(52.52, 13.405, { radiusKm: 10, mode: "rail" });
// 2. Diacritic-insensitive search
const matches = searchStops("zurich"); // finds Zürich HB
// 3. Upcoming departures (offline deterministic schedule, or live: true for CH/NO)
const board = await departures("ch-zrh-hb", { limit: 10, live: false });
// 4. Curated official open GTFS / GTFS-RT feed directory
const rtFeeds = listFeeds({ country: "DE", realtimeOnly: true });
// 5. Compile any local GTFS directory into node:sqlite
const stats = importGtfsDirectory("./my-gtfs-feed", "./transit.sqlite");
const fromSqlite = await departures("STOP_1", { sqlitePath: "./transit.sqlite" });Related MCP server: gtfs-pro-mcp
CLI
npx @shadojus/open-transit-radar near 52.52 13.405 --radius-km 10 --json
npx @shadojus/open-transit-radar search zurich
npx @shadojus/open-transit-radar departures de-ber-hbf --limit 8
npx @shadojus/open-transit-radar departures no-osl-s --live
npx @shadojus/open-transit-radar feeds --country CH --realtime
npx @shadojus/open-transit-radar import-gtfs ./gtfs-dir ./transit.sqlite
npx @shadojus/open-transit-radar serve --port 8787REST API (OpenAPI 3.1.0)
Start the server (npm start or open-transit-radar serve --port 8787):
Method & Path | Description |
| Service status & dataset counts |
| OpenAPI 3.1.0 specification |
| Diacritic-insensitive stop search |
| Nearby stops sorted by |
| Offline schedule or live Entur/CH departures |
| Curated official GTFS/GTFS-RT feed directory |
| Data sources, licenses, and live host allowlist |
Features: CORS headers, SHA-256 ETag with If-None-Match → 304 Not Modified, and IPv6 /64 subnet rate limiting (429 Too Many Requests).
MCP Server (2024-11-05 stdio)
{
"mcpServers": {
"open-transit-radar": {
"command": "npx",
"args": ["-y", "@shadojus/open-transit-radar", "--mcp"]
}
}
}Exposed tools: stops_near, search_stops, departures, list_feeds, list_sources.
Python Client (shadojus-transit-radar)
Zero external dependencies (Python 3.9+ stdlib only):
from shadojus_transit_radar import stops_near, search_stops, departures, list_feeds, TransitRadarClient
print(stops_near(52.52, 13.405, radius_km=15))
print(search_stops("zurich"))
print(departures("de-ber-hbf", limit=5))
print(list_feeds(country="NO", realtime_only=True))Interactive Split-Flap Radar UI (docs/)
Static GitHub Pages application (docs/index.html) featuring a Dark-Instrument #07090E world hub radar, split-flap departure board (live transport.opendata.ch & api.entur.io with automatic offline schedule fallback), filterable feed directory, and copyable npx/curl/MCP/Python snippets with zero external CDNs.
Data Sources & Attribution
See data/SOURCES.json for full upstream licensing and attribution details. Bundled timetable patterns in data/seed.json are illustrative offline samples; use --live or import an official GTFS feed via importGtfsDirectory() for authoritative schedules.
Testing
node --test test/*.test.mjs
python -m unittest discover -s python/testsLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Transitland MCP — global GTFS aggregator
Hosted MCP App, public transport worldwide powered by Transitous: journeys, boards, real time, maps
Read-only public transit departures, stop search, and city coverage for bus and train users.
MBTA MCP — Boston real-time transit via the MBTA v3 API (api-v3.mbta.com)
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP service for interacting with Transport NSW's API that enables users to find transport stops around locations and retrieve information about transport alerts and disruptions.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools for querying live transit data (stops, departures, routes, vehicles, alerts) from any WP GTFS Pro site, enabling AI assistants to answer rider questions.9 npmGPL 2.0
- AlicenseNot gradedqualityCmaintenanceEnables querying global transit data including agencies, routes, stops, and departures through a GTFS aggregator.71 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables querying real-time BART and SF Muni transit data, including departures, trip planning, fares, advisories, routes, alerts, vehicle positions, and schedules, from any MCP-compatible client.1MIT