№ 0834Skill
Transit Times connector for Muse
An MCP server built as a Muse connector for real-time public transit: find stops, see upcoming departures with live delays, plan simple direct trips and check service alerts.
# Transit Times — a public-transit connector for Muse An MCP (Model Context Protocol) server that gives an AI assistant real-time public-transit information: find stops, see upcoming departures with live delays, plan simple direct trips, and check service alerts for any transit agency. Built as a connector for Meta's Muse platform ([muse.ai/platform](https://muse.ai/platform)). ## What it does Four tools, usable from any MCP client: | Tool | Example question it answers | |---|---| | `search_stops` | "Where's the nearest stop?" — by name or `lat,lon` | | `get_next_departures` | "When's my next bus?" — scheduled times plus **live** realtime predictions, delays, and cancellations | | `plan_trip` | "How do I get from A to B?" — direct (no-transfer) route options with next departures | | `get_service_alerts` | "Is my line down?" — active disruptions for an agency (e.g. "Toronto Transit Commission") | The server is **stateless** and holds **no user credentials**. The only secret is the server's own upstream API key, which is sent as an HTTP header and never logged or returned to callers. ## Data source [Transitland](https://www.transit.land) v2 REST API (free tier key), aggregating GTFS feeds from 2,000+ transit agencies worldwide. A provider abstraction (`src/transit_connector/providers/base.py`) keeps the tools independent of the source, so direct GTFS-realtime feeds can be added later without changing any tool. ## Run locally ```bash python3 -m venv .venv && .venv/bin/pip install -r requirements.txt # Offline mode (no key needed): TRANSIT_PROVIDER=mock PYTHONPATH=src .venv/bin/python -m transit_connector # Streamable HTTP (the transport a hosted connector uses): TRANSIT_PROVIDER=mock PYTHONPATH=src .venv/bin/python -m transit_connector \ --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp # Real data — free key from https://www.transit.land: export TRANSITLAND_API_KEY=your_key_here PYTHONPATH=src .venv/bin/python -m transit_connector \ --transport streamable-http --host 127.0.0.1 --port 8000 ``` Tests (no key, no network needed): ```bash PYTHONPATH=src .venv/bin/python -m unittest discover -s tests ``` ## Deploy The connector must be reachable at a **public HTTPS URL**. The repo ships a `Dockerfile` and a production entrypoint (`src/transit_connector/deploy.py`, served at `/mcp`). **Railway (recommended):** 1. Push this r



ChatForm
Tgmlabs