skills$openclaw/mbta
dbhurley7.1k

by dbhurley

mbta – OpenClaw Skill

mbta is an OpenClaw Skills integration for coding workflows. Real-time MBTA transit predictions for Boston-area subway, bus, commuter rail, and ferry. Query departure times, search stops/routes, check service alerts, and run a live dashboard. Use when asked about Boston transit, T schedules, when to leave for the train, or MBTA service status.

7.1k stars3.6k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namembta
descriptionReal-time MBTA transit predictions for Boston-area subway, bus, commuter rail, and ferry. Query departure times, search stops/routes, check service alerts, and run a live dashboard. Use when asked about Boston transit, T schedules, when to leave for the train, or MBTA service status. OpenClaw Skills integration.
ownerdbhurley
repositorydbhurley/mbta
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @dbhurley/mbta
last updatedFeb 7, 2026

Maintainer

dbhurley

dbhurley

Maintains mbta in the OpenClaw Skills directory.

View GitHub profile
File Explorer
5 files
.
scripts
mbta.py
19.4 KB
_meta.json
270 B
config.yaml
2.7 KB
SKILL.md
3.3 KB
SKILL.md

name: mbta description: Real-time MBTA transit predictions for Boston-area subway, bus, commuter rail, and ferry. Query departure times, search stops/routes, check service alerts, and run a live dashboard. Use when asked about Boston transit, T schedules, when to leave for the train, or MBTA service status. metadata: {"clawdbot":{"requires":{"bins":["python3"],"pip":["requests"]}}}

MBTA Transit

Query real-time MBTA predictions via the v3 API.

Setup

# Optional but recommended for higher rate limits
export MBTA_API_KEY=your_key_here  # Free at https://api-v3.mbta.com/portal

# Install dependencies
pip install requests pyyaml flask  # flask only needed for dashboard

Quick Commands

cd skills/mbta

# Next departures from a stop
python scripts/mbta.py next --stop place-alfcl  # Alewife
python scripts/mbta.py next --stop place-harsq --route Red  # Harvard, Red Line only

# Search for stop IDs
python scripts/mbta.py stops --search "Porter"
python scripts/mbta.py stops --search "Kendall"

# List routes
python scripts/mbta.py routes              # All routes
python scripts/mbta.py routes --type rail  # Subway only
python scripts/mbta.py routes --type bus   # Buses

# Service alerts
python scripts/mbta.py alerts              # All alerts
python scripts/mbta.py alerts --route Red  # Red Line alerts

# All configured departures (uses config.yaml)
python scripts/mbta.py departures --config config.yaml

# Start web dashboard
python scripts/mbta.py dashboard --config config.yaml --port 6639

Configuration

Edit config.yaml to set up your stops:

panels:
  - title: "My Station"
    walk_minutes: 5  # Filter out trains you can't catch
    services:
      - label: "Red Line"
        destination: "to Alewife"
        route_id: "Red"
        stop_id: "place-harsq"
        direction_id: 0  # 0 or 1 for direction
        limit: 3

Key fields:

  • walk_minutes: Trains departing sooner than this are filtered out
  • direction_id: 0 = outbound/north, 1 = inbound/south (varies by line)
  • headsign_contains: Optional filter (e.g., "Ashmont" to exclude Braintree)

Finding Stop/Route IDs

# Search stops
python scripts/mbta.py stops --search "Davis"
# Returns: place-davis: Davis

# Get routes
python scripts/mbta.py routes --type rail
# Returns route IDs like "Red", "Orange", "Green-E"

JSON Output

Add --json for machine-readable output:

python scripts/mbta.py next --stop place-alfcl --json
python scripts/mbta.py departures --config config.yaml --json

Common Stop IDs

StationStop ID
Alewifeplace-alfcl
Harvardplace-harsq
Kendall/MITplace-knncl
Park Streetplace-pktrm
South Stationplace-sstat
North Stationplace-north
Back Bayplace-bbsta
Downtown Crossingplace-dwnxg

Answering User Questions

"When's the next Red Line train?"

python scripts/mbta.py next --stop place-alfcl --route Red

"Should I leave now to catch the T?" Check departures against their walk time. If next train is ≤ walk_minutes, say "leave now!"

"Are there any delays on the Orange Line?"

python scripts/mbta.py alerts --route Orange

"What buses go to Harvard?"

python scripts/mbta.py stops --search "Harvard"
# Then check routes at that stop
python scripts/mbta.py next --stop <stop_id>
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

Configuration

Edit `config.yaml` to set up your stops: ```yaml panels: - title: "My Station" walk_minutes: 5 # Filter out trains you can't catch services: - label: "Red Line" destination: "to Alewife" route_id: "Red" stop_id: "place-harsq" direction_id: 0 # 0 or 1 for direction limit: 3 ``` Key fields: - `walk_minutes`: Trains departing sooner than this are filtered out - `direction_id`: 0 = outbound/north, 1 = inbound/south (varies by line) - `headsign_contains`: Optional filter (e.g., "Ashmont" to exclude Braintree)

FAQ

How do I install mbta?

Run openclaw add @dbhurley/mbta in your terminal. This installs mbta into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/dbhurley/mbta. Review commits and README documentation before installing.