cyanheads avatar

Onebusaway Mcp Server

cyanheads/onebusaway-mcp-server

Connects Claude to OneBusAway transit APIs for real-time vehicle tracking and schedule lookups. You get 15 tools covering stop discovery by location or name, live arrival predictions with GPS positions and schedule deviations, full trip sequences, agency-wide vehicle positions, and static timetables. The arrivals endpoint distinguishes GPS-tracked predictions from schedule-only data and surfaces active service alerts inline. Useful for building transit assistants that need to answer "when's my bus" with actual vehicle locations, not just printed schedules. Works over stdio or streamable HTTP, with a public hosted instance at onebusaway.caseyjhand.com/mcp if you don't want to run it locally. Puget Sound is the reference region, but any OneBusAway deployment works with the right API key.

GitHub stars
2
tools
16
transport
STDIO, HTTP
env vars
11
last updated
Oct 26, 2026

Install

From registry metadata
$ npx add-mcp https://onebusaway.caseyjhand.com/mcp --name onebusaway

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http onebusaway https://onebusaway.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 16 tools

Verified live against the running server on Nov 6, 2026.

onebusaway_list_agenciesList all transit agencies served by this OneBusAway instance. Returns agency IDs, names, contact info, timezone, and geographic coverage center. Agency IDs are needed for onebusaway_list_routes_for_agency and onebusaway_get_vehicles.

List all transit agencies served by this OneBusAway instance. Returns agency IDs, names, contact info, timezone, and geographic coverage center. Agency IDs are needed for onebusaway_list_routes_for_agency and onebusaway_get_vehicles.

No parameters. Call it with no arguments.

onebusaway_find_stopsFind bus stops near a location. Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status. Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals. Optionally filter by stop code (the number prin...4 params

Find bus stops near a location. Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status. Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals. Optionally filter by stop code (the number prin...

Parameters* required
lat*number
Latitude of the search center, in [-90, 90].
lon*number
Longitude of the search center, in [-180, 180].
querystring
Optional stop code filter (the number printed on the stop sign, e.g. "75403"). When provided, returns only stops matching this code within the radius.
radiusnumber
Search radius in meters. Must be positive; capped at 1600m, beyond which results degrade. Defaults to 300m.default: 300
onebusaway_find_routesFind transit routes near a location, optionally filtered by name or number. Returns routes with IDs, short names, and descriptions. Use routeId values to fetch schedules, vehicles, or stop sequences.6 params

Find transit routes near a location, optionally filtered by name or number. Returns routes with IDs, short names, and descriptions. Use routeId values to fetch schedules, vehicles, or stop sequences.

Parameters* required
lat*number
Latitude of the search center, in [-90, 90].
latSpannumber
Optional bounding-box height in degrees, as an alternative to radius. Takes effect only when lonSpan is also set, in which case radius is ignored.
lon*number
Longitude of the search center, in [-180, 180].
lonSpannumber
Optional bounding-box width in degrees, as an alternative to radius. Takes effect only when latSpan is also set, in which case radius is ignored.
querystring
Filter by route name or number (e.g. "44" or "Link Light Rail").
radiusnumber
Search radius in meters. Must be positive; capped at 1600m. Defaults to 500m. Ignored when latSpan and lonSpan are both set.default: 500
onebusaway_search_stopsSearch for stops by name or code. Returns matching stops with IDs and coordinates. Use to resolve a human-readable stop name or number to a stop ID for arrivals lookups with onebusaway_get_arrivals.2 params

Search for stops by name or code. Returns matching stops with IDs and coordinates. Use to resolve a human-readable stop name or number to a stop ID for arrivals lookups with onebusaway_get_arrivals.

Parameters* required
maxCountinteger
Maximum number of results to return. A positive integer, at most 100. Defaults to 10.default: 10
query*string
Stop name fragment or stop code (e.g. "University Way" or "75403").
onebusaway_search_routesSearch for routes by name or number. Returns matching routes with IDs. Use to resolve a route short name (e.g. "44") to a route ID for schedule or vehicle lookups with onebusaway_get_vehicles or onebusaway_get_schedule_for_route.2 params

Search for routes by name or number. Returns matching routes with IDs. Use to resolve a route short name (e.g. "44") to a route ID for schedule or vehicle lookups with onebusaway_get_vehicles or onebusaway_get_schedule_for_route.

Parameters* required
maxCountinteger
Maximum number of results to return. A positive integer, at most 100. Defaults to 10.default: 10
query*string
Route name or number (e.g. "44", "Link", or "RapidRide").
onebusaway_get_stopFetch details for a specific stop by ID. Returns the stop's name, coordinates, direction, served routes, and wheelchair accessibility. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403" for Metro Transit stop 75403).1 params

Fetch details for a specific stop by ID. Returns the stop's name, coordinates, direction, served routes, and wheelchair accessibility. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403" for Metro Transit stop 75403).

Parameters* required
stopId*string
Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403, "40_100239" for Sound Transit). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
onebusaway_get_routeFetch details for a specific route by ID. Returns short name, description, agency, route type, and schedule URL. Route IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_100259").1 params

Fetch details for a specific route by ID. Returns short name, description, agency, route type, and schedule URL. Route IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_100259").

Parameters* required
routeId*string
Agency-prefixed route ID (e.g. "1_100259"). Use onebusaway_find_routes or onebusaway_search_routes to discover IDs.
onebusaway_list_routes_for_agencyList all routes operated by an agency. Returns route IDs, short names, and descriptions. Use to enumerate an agency's full service before searching for a specific route. Get agencyId values from onebusaway_list_agencies.1 params

List all routes operated by an agency. Returns route IDs, short names, and descriptions. Use to enumerate an agency's full service before searching for a specific route. Get agencyId values from onebusaway_list_agencies.

Parameters* required
agencyId*string
Agency ID (e.g. "1" for Metro Transit, "40" for Sound Transit). Use onebusaway_list_agencies to discover IDs.
onebusaway_get_arrivalsReal-time arrivals and departures at a stop. Returns predicted arrival times, schedule deviation (how many seconds late/early), vehicle positions, and any active service alerts. The predicted boolean on each arrival indicates whether GPS tracking backs the estimate — predicted...3 params

Real-time arrivals and departures at a stop. Returns predicted arrival times, schedule deviation (how many seconds late/early), vehicle positions, and any active service alerts. The predicted boolean on each arrival indicates whether GPS tracking backs the estimate — predicted...

Parameters* required
minutesAfterinteger
Include arrivals expected within the next N minutes — an integer from 0 to 240. Defaults to 35. For a longer horizon, use onebusaway_get_schedule_for_stop.default: 35
minutesBeforeinteger
Include arrivals that departed up to this many minutes ago — an integer from 0 to 60. Defaults to 5.default: 5
stopId*string
Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
onebusaway_get_stop_contextEverything happening at a stop in one call: the stop's details, its real-time arrivals, and full detail for every service alert on the stop or on any arrival in the window. Returns what onebusaway_get_stop, onebusaway_get_arrivals, and one onebusaway_get_alert call per alert w...3 params

Everything happening at a stop in one call: the stop's details, its real-time arrivals, and full detail for every service alert on the stop or on any arrival in the window. Returns what onebusaway_get_stop, onebusaway_get_arrivals, and one onebusaway_get_alert call per alert w...

Parameters* required
minutesAfterinteger
Include arrivals expected within the next N minutes — an integer from 0 to 240. Defaults to 35. For a longer horizon, use onebusaway_get_schedule_for_stop.default: 35
minutesBeforeinteger
Include arrivals that departed up to this many minutes ago — an integer from 0 to 60. Defaults to 5.default: 5
stopId*string
Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
onebusaway_get_alertFetch full detail for a service alert (situation) by ID. Returns the summary, description, reason (e.g. detour, construction), affected stops and routes, consequence description, and active time windows. Situation IDs appear in onebusaway_get_arrivals responses under situation...1 params

Fetch full detail for a service alert (situation) by ID. Returns the summary, description, reason (e.g. detour, construction), affected stops and routes, consequence description, and active time windows. Situation IDs appear in onebusaway_get_arrivals responses under situation...

Parameters* required
situationId*string
Situation/alert ID from onebusaway_get_arrivals (situations[].id or arrivals[].situationIds[]).
onebusaway_get_tripReal-time status and stop sequence for a trip. Returns vehicle position, schedule deviation, current phase, and remaining stops. Use tripId from onebusaway_get_arrivals to look up a specific vehicle's progress.3 params

Real-time status and stop sequence for a trip. Returns vehicle position, schedule deviation, current phase, and remaining stops. Use tripId from onebusaway_get_arrivals to look up a specific vehicle's progress.

Parameters* required
includeScheduleboolean
Whether to include the full stop sequence with times. Defaults to true.default: true
serviceDateMsinteger
Service date as Unix milliseconds (midnight local time) — a non-negative integer. Only needed for trips from a previous service day. Omit to use today.
tripId*string
Trip ID from an arrivals response or schedule lookup.
onebusaway_get_blockFetch block trip sequences with their stop times and service-calendar conditions. Top-level fields describe the first returned configuration; every remaining alternative is included without choosing a calendar date. Optionally select an exact tripId or complete trips having an...4 params

Fetch block trip sequences with their stop times and service-calendar conditions. Top-level fields describe the first returned configuration; every remaining alternative is included without choosing a calendar date. Optionally select an exact tripId or complete trips having an...

Parameters* required
blockId*string
Block ID from a trip record. Obtain a tripId from onebusaway_get_arrivals, then call onebusaway_get_trip to get the blockId.
departureBeforeSecinteger
Exclusive departure upper bound in GTFS seconds from midnight; must exceed departureFromSec when both are supplied.
departureFromSecinteger
Inclusive departure lower bound in GTFS seconds from midnight; values beyond 86400 are valid.
tripIdstring
Exact trip ID; omit or leave blank for no trip selector. Mutually exclusive with departure bounds.
onebusaway_get_vehiclesReal-time positions of active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, counter-clockwise orientation from east, schedule deviation, and current trip. Reports agency records omitted for missing position coordinates. Use...2 params

Real-time positions of active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, counter-clockwise orientation from east, schedule deviation, and current trip. Reports agency records omitted for missing position coordinates. Use...

Parameters* required
agencyId*string
Agency ID (e.g. "1" for Metro Transit, "40" for Sound Transit). Use onebusaway_list_agencies to discover IDs.
routeIdstring
Optional agency-prefixed route ID to filter results to one route. Filtering is client-side — all agency vehicles are fetched first.
onebusaway_get_schedule_for_stopFull-day departure schedule for a stop. Lists every departure by route and direction for the specified date (defaults to today). Optionally filter departure rows by routeId and a half-open Unix-millisecond interval; selection includes counts before and after filtering. Without...5 params

Full-day departure schedule for a stop. Lists every departure by route and direction for the specified date (defaults to today). Optionally filter departure rows by routeId and a half-open Unix-millisecond interval; selection includes counts before and after filtering. Without...

Parameters* required
datevalue
Service date as YYYY-MM-DD (e.g. "2026-05-23"). Must be a real calendar date. Omit or leave blank for today in the agency's timezone.
departureBeforeMsinteger
Exclusive departure upper bound in Unix milliseconds; must exceed departureFromMs when both are supplied.
departureFromMsinteger
Inclusive departure lower bound in Unix milliseconds.
routeIdstring
Exact route ID, combined with departure bounds; omit or leave blank for all routes.
stopId*string
Agency-prefixed stop ID (e.g. "1_75403"). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.
onebusaway_get_schedule_for_routeFull-day schedule for a route — all trips, stop sequences, and departure times for the specified date (defaults to today). Optionally select an exact tripId or complete trips having any departure in a half-open GTFS-seconds interval; selection includes counts before and after...5 params

Full-day schedule for a route — all trips, stop sequences, and departure times for the specified date (defaults to today). Optionally select an exact tripId or complete trips having any departure in a half-open GTFS-seconds interval; selection includes counts before and after...

Parameters* required
datevalue
Service date as YYYY-MM-DD (e.g. "2026-05-23"). Must be a real calendar date. Omit or leave blank for today.
departureBeforeSecinteger
Exclusive departure upper bound in GTFS seconds from midnight; must exceed departureFromSec when both are supplied.
departureFromSecinteger
Inclusive departure lower bound in GTFS seconds from midnight; values beyond 86400 are valid.
routeId*string
Agency-prefixed route ID (e.g. "1_100259"). Use onebusaway_find_routes or onebusaway_search_routes to discover IDs.
tripIdstring
Exact trip ID; omit or leave blank for no trip selector. Mutually exclusive with departure bounds.

Sponsors

Configuration

ONEBUSAWAY_API_KEYdefault: TEST

OneBusAway API key. TEST works on the Puget Sound instance for development.

ONEBUSAWAY_BASE_URLdefault: https://api.pugetsound.onebusaway.org

Base URL for the OneBusAway instance. Defaults to Puget Sound.

ONEBUSAWAY_RATE_LIMIT_REQUESTSdefault: 20

Upstream requests the pacer allows per window.

ONEBUSAWAY_RATE_LIMIT_WINDOW_MSdefault: 60000

Width of the pacer's sliding rate window, in milliseconds.

ONEBUSAWAY_RATE_LIMIT_MAX_WAIT_MSdefault: 45000

Longest a call may wait in the pacer queue, in milliseconds. Keep it under the SDK client's 60 s request timeout.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warning').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/onebusaway-mcp-server

Query stops, routes, real-time arrivals, vehicle positions, and schedules from OneBusAway transit APIs via MCP. STDIO or Streamable HTTP.

16 Tools • 2 Resources

Details

Repository
github.com/cyanheads/onebusaway-mcp-server
Package
@cyanheads/onebusaway-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
3
Tools verified
Nov 6, 2026

More from cyanheads