Onebusaway MCP Server

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

Remote serverstreamable-http

What is the Onebusaway MCP server?

Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs. That is what the onebusaway mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

  • Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Getting it running

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • onebusaway_list_agencies — List all transit agencies on this OneBusAway instance with IDs, contact info, and geographic coverage
  • onebusaway_find_stops — Find bus stops near a lat/lon within a configurable radius, optionally filtered by stop code
  • onebusaway_search_stops — Search stops by name or code string to resolve a human-readable name to a stop ID
  • onebusaway_get_stop — Fetch details for a specific stop by agency-prefixed ID
  • onebusaway_find_routes — Find transit routes near a lat/lon, optionally filtered by name or number
  • onebusaway_search_routes — Search routes by name or number to resolve a route short name to a route ID
  • onebusaway_get_route — Fetch details for a specific route by agency-prefixed ID
  • onebusaway_list_routes_for_agency — List all routes operated by an agency
  • onebusaway_get_arrivals — Real-time arrivals and departures at a stop — GPS-tracked predictions, schedule deviation, vehicle positions, and active alerts
  • onebusaway_get_trip — Real-time status and full stop sequence for an active trip
  • onebusaway_get_vehicles — Real-time positions of all active vehicles for an agency, optionally filtered to one route
  • onebusaway_get_schedule_for_stop — Full-day departure schedule for a stop by route and direction

What it needs from you

Configuration is passed through the environment: MCP_TRANSPORT_TYPE, MCP_LOG_LEVEL, ONEBUSAWAY_API_KEY, ONEBUSAWAY_BASE_URL, MCP_HTTP_ENDPOINT_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Bun v1.3.0 or higher (or Node.js v24+). - An OneBusAway API key. TEST works on the Puget Sound instance for development. For production use or other instances, register at the relevant agency's developer portal.

Things to watch

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Onebusaway.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Onebusaway's toolset — onebusaway_list_agencies, onebusaway_find_stops, onebusaway_search_stops and 11 more — is a fair guide to whether it matches your workflow. It is maintained by cyanheads; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
onebusaway_list_agenciesList all transit agencies on this OneBusAway instance with IDs, contact info, and geographic coverage
onebusaway_find_stopsFind bus stops near a lat/lon within a configurable radius, optionally filtered by stop code
onebusaway_search_stopsSearch stops by name or code string to resolve a human-readable name to a stop ID
onebusaway_get_stopFetch details for a specific stop by agency-prefixed ID
onebusaway_find_routesFind transit routes near a lat/lon, optionally filtered by name or number
onebusaway_search_routesSearch routes by name or number to resolve a route short name to a route ID
onebusaway_get_routeFetch details for a specific route by agency-prefixed ID
onebusaway_list_routes_for_agencyList all routes operated by an agency
onebusaway_get_arrivalsReal-time arrivals and departures at a stop — GPS-tracked predictions, schedule deviation, vehicle positions, and active alerts
onebusaway_get_tripReal-time status and full stop sequence for an active trip
onebusaway_get_vehiclesReal-time positions of all active vehicles for an agency, optionally filtered to one route
onebusaway_get_schedule_for_stopFull-day departure schedule for a stop by route and direction
onebusaway_get_schedule_for_routeFull-day schedule for a route — all trips and stop sequences
onebusaway_get_alertFetch full service alert detail by situation ID — summary, description, reason, affected stops/routes, consequence, and active time windows

How to install the Onebusaway MCP server

{
  "mcpServers": {
    "onebusaway-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/onebusaway-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "ONEBUSAWAY_API_KEY": "TEST"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Bun v1.3.0 or higher (or Node.js v24+). - An OneBusAway API key. TEST works on the Puget Sound instance for development. For production use or other instances, register at the relevant agency's developer portal.
VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
ONEBUSAWAY_API_KEYCredential the server authenticates with.Yes
ONEBUSAWAY_BASE_URLEndpoint or connection string the server talks to.Yes
MCP_HTTP_ENDPOINT_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Onebusaway to onebusaway list agencies.
  • Use Onebusaway to onebusaway find stops.
  • Use Onebusaway to onebusaway search stops.

Frequently asked questions

It connects Onebusaway to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (onebusaway_list_agencies, onebusaway_find_stops, onebusaway_search_stops, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Onebusaway directly.