# onebusaway-mcp-server [Health: Active]

**Category:** 🚆 Travel & Transportation  
**Repository:** https://github.com/cyanheads/onebusaway-mcp-server  
**GitHub Stars:** 1  
**npm Downloads (last month):** 811  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/onebusaway-mcp-server

## Description
Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.

## Tools
Capabilities this server exposes over MCP:

- **onebusaway_list_agencies** — List the transit agencies on the instance, with IDs, contact info, and coverage area
- **onebusaway_find_stops** — Find stops near a lat/lon, optionally filtered by stop code
- **onebusaway_search_stops** — Resolve a stop name or code to a stop ID
- **onebusaway_get_stop** — Fetch one stop by ID
- **onebusaway_find_routes** — Find routes near a lat/lon, optionally filtered by name or number
- **onebusaway_search_routes** — Resolve a route name or number to a route ID
- **onebusaway_get_route** — Fetch one route by ID
- **onebusaway_list_routes_for_agency** — List every route an agency operates
- **onebusaway_get_arrivals** — Real-time arrivals and departures at a stop, with schedule deviation, vehicle positions, and active alerts
- **onebusaway_get_stop_context** — Stop details, real-time arrivals, and full detail for every alert at the stop, from one upstream request
- **onebusaway_get_alert** — Full service alert detail by situation ID
- **onebusaway_get_trip** — Real-time status and stop sequence for a trip
- **onebusaway_get_block** — Every trip one vehicle runs in a service day, in order, with stop times
- **onebusaway_get_vehicles** — Real-time positions of an agency's active vehicles, optionally for one route
- **onebusaway_get_schedule_for_stop** — Full-day departure schedule for a stop, by route and direction
- **onebusaway_get_schedule_for_route** — Full-day schedule for a route: every trip and its stop sequence

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `bunx` (confidence: high):

```json
"mcpServers": {
  "onebusaway-mcp-server": {
    "command": "bunx",
    "args": ["@cyanheads/onebusaway-mcp-server@latest"],
    "env": {
      "ONEBUSAWAY_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `ONEBUSAWAY_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What onebusaway-mcp-server does

The onebusaway-mcp-server MCP server gives MCP clients access to transit data from OneBusAway APIs. It covers agency discovery, stop and route lookup, real-time arrival information, service alerts, vehicle locations, trip status, vehicle blocks, and scheduled departures.

The default data source is the Puget Sound instance, which includes agencies such as King County Metro, Sound Transit, Pierce Transit, and Community Transit. The server can also work with other OneBusAway instances.

Two MCP resources provide direct metadata access:

- `onebusaway://stop/{stopId}` returns stop details including coordinates, served routes, and wheelchair accessibility.
- `onebusaway://route/{routeId}` returns route naming, agency, description, and schedule URL information.

## How it works

An MCP client calls tools with identifiers, coordinates, search terms, or time windows. Agents can first resolve a stop or route by name, code, number, or location, then use the resulting ID for detailed or real-time queries.

Arrival queries return predicted and scheduled services, schedule deviation, vehicle position data, stops away, trip IDs, and active alerts. A stop-context request combines stop metadata, arrivals, and detailed alerts in one upstream request. Schedule tools cover a full day, while arrival queries are intended for a shorter window around the current time.

The onebusaway-mcp-server MCP server can run as a local stdio process or as a Streamable HTTP server. A public hosted MCP endpoint is also documented at `https://onebusaway.caseyjhand.com/mcp`.

## Setup and configuration

The project is distributed as the `@cyanheads/onebusaway-mcp-server` npm package and has install links for Claude Desktop, Cursor, and VS Code. The repository also publishes a Docker image and documents a public hosted endpoint. The runtime badges identify Bun 1.4.0 or newer.

Configure the `ONEBUSAWAY_API_KEY` environment variable when launching the package.

## Tools and capabilities

The 16 tools support these operations:

- List agencies and their contact, timezone, and coverage information.
- Find or search stops, then retrieve one stop by ID.
- Find or search routes, retrieve one route, or list an agency’s routes.
- Get arrivals and departures with prediction, deviation, vehicle, and alert data.
- Retrieve a combined stop context or fetch a complete alert by situation ID.
- Inspect a trip’s live status and stop sequence.
- List every trip operated by one vehicle during a service day through a block query.
- Find active vehicle positions for an agency, optionally limited to a route.
- Get full-day schedules for a stop or route.

## Limitations and notes

Radius searches are capped at 1,600 meters, and several list operations can report that the upstream result was truncated without offering pagination. Arrival windows support up to 60 minutes before and 240 minutes after the current time; longer planning horizons should use stop schedules.

Route search can fail with `endpoint_unavailable` on OneBusAway instances whose route-search endpoint returns 404, including Puget Sound. Use geographic route search or agency route listing there. Invalid stop, route, agency, or alert identifiers return typed errors such as `stop_not_found`, `route_not_found`, `agency_not_found`, or `situation_not_found`.

_Full upstream README: https://allmcps.com/mcp/onebusaway-mcp-server/readme_

