About This MCP Server
This is a Model Context Protocol (MCP) server that provides access to Bay Area Rapid Transit (BART) data, including static transit information and real-time updates (when available).
The server exposes transit data through MCP tools that can be used by clients such as ChatGPT or Claude to query routes, stops, trips, and real-time service information.
Data is sourced directly from BART. Static data was last fetched on 10/13/2025, and may become outdated as service changes occur.
User authentication and OAuth authorization flows are powered by Stytch.
How to Connect
To use this MCP server, you need to configure it in your MCP client (such as ChatGPT). The server URL is https://bart.vanshaj.dev/mcp, and it uses OAuth for authentication. For code-based clients (e.g. Cursor or Claude Code), add the following configuration:
{
"mcpServers": {
"bart": {
"url": "https://bart.vanshaj.dev/mcp"
}
}
}
When you try to connect, you will be asked to log in. This is mainly to prevent abuse, though the server may eventually expose user-specific features. There is currently one such MCP tool, get_user_saved_routes, but it uses a hardcoded route for demos.
Example Queries
Once connected, you can ask your LLM questions like:
- "What routes are active on BART right now?"
- "Show me upcoming departures from Embarcadero station"
- "Search for stations near Antioch"
- "What's the current system status and real-time data availability?"
- "Show me all live trips on the Blue line northbound"
- "Get the complete schedule for this trip"
OpenAI Apps SDK
This MCP server supports the Apps SDK and exposes a map widget. You can see it in action by asking ChatGPT things like:
- "Visualize the route for the Blue line northbound"
- "When is the next train from Montgomery to Bay Fair? Show me the route on a map"
Available Tools
System Information
- get_system_info - Get overall system statistics, active routes, and real-time data status
- get_service_status - Check current service health and data freshness
Route Tools
- get_active_routes_today - List all routes that are currently active based on today's schedule
- get_route_info - Get detailed information about a specific route including stops and trips
- list_all_routes - List all routes in the system (active and inactive)
Stop/Station Tools
- search_stops - Search for stations by name, ID, or code
- get_stop_info - Get detailed station information including location and upcoming departures
- get_upcoming_departures - Get upcoming train departures at a specific station with real-time updates
Trip Tools
- get_trip_info - Get detailed information about a specific trip including schedule and real-time status
- get_live_trips - Get currently active trips with real-time data, optionally filtered by route
- get_trip_schedule - Get the complete stop-by-stop schedule for a trip
User Tools
- save_trip - Save a trip to your user profile for quick access
- get_saved_trips - Retrieve all your saved trips
- remove_saved_trip - Remove a trip from your saved list
Data Sources
- Static GTFS Data: Routes, stops, trips, and schedules from BART's official GTFS feed
- Real-time Data: Live updates from BART's GTFS-Realtime API including delays, estimated arrivals, and service alerts
Static data is cached for 5 minutes, real-time data is cached for 30 seconds to balance freshness with API efficiency.