# MTA Transit MCP

> MTA MCP gives your AI client direct access to New York City's entire public transit network. You can track subway trains, buses, and commuter rails in real-time, check for service disruptions across all lines (LIRR, Metro-North), and get accurate arrival predictions instantly. It’s the single source of truth for NYC travel planning.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** real-time-transit, gtfs-rt, public-transportation, arrival-predictions, service-alerts, commuter-rail

## Description

Your AI client now acts as a dedicated transit analyst for New York City. Instead of juggling multiple websites or opening separate apps to check subway status, bus arrivals, and commuter train delays, you talk to your agent once. This MCP connects your AI client to all the real-time data sources used by MTA—from tracking every active bus vehicle to monitoring major commuter lines like LIRR and Metro-North. It pulls live feed data for all NYC Subway lines, tracks specific buses at stops, and gives you immediate service alerts if anything is wrong with any part of the system. Using this through Vinkius makes your AI client a true trip planner that understands complex rail and bus schedules. You get accurate arrival predictions, even knowing which route (local vs. express) is coming next.

## Tools

### get_bus_estimated_arrival
Predicts when buses will arrive at a stop, optionally filtering results by the specific route number.

### get_bus_predictions
Provides real-time predictions for next bus arrivals at any given bus stop location.

### get_bus_routes
Lists all active MTA bus routes serving the city, including their names and service areas.

### get_bus_stops
Retrieves a list of all physical bus stops for any specified route, giving coordinates and sequence order.

### get_bus_vehicle_at_stop
Tracks buses that are currently at or approaching a specific stop with estimated arrival times.

### get_bus_vehicles
Gets the real-time GPS coordinates and status of all active MTA bus vehicles across NYC.

### get_lirr_feed
Retrieves live tracking, delays, and arrival predictions for Long Island Rail Road trains.

### get_metro_north_feed
Provides real-time tracking and service updates for Metro-North Railroad commuter trains.

### get_service_alerts
Checks the current status of major disruptions, maintenance, or incidents across all MTA modes.

### get_stations
Lists detailed information on every NYC Subway station, including its borough and coordinates.

### get_subway_feed
Gathers live train positions, delays, and arrival data for specific major subway lines (e.g., the 1 train or the A line).

### get_system_time
Returns the official MTA system timestamp to verify API connection integrity.

## Prompt Examples

**Prompt:** 
```
Show me the next trains on the 1/2/3 line.
```

**Response:** 
```
Fetching subway feed for lines 1/2/3/4/5/6/S (feed ID: 1)... Real-time GTFS-RT data shows: 1 Train to Van Cortlandt Park — 3 stops away, arriving in 4 minutes; 2 Train to Wakefield-241st — 5 stops away, arriving in 7 minutes; 3 Train to Harlem-148th St — 8 stops away, arriving in 11 minutes. All trains currently running on or close to scheduled times with no major delays reported. Would you like predictions for a specific station?
```

**Prompt:** 
```
When is the next M15 bus arriving at the stop near 14th Street and 3rd Avenue?
```

**Response:** 
```
Looking up M15 route stops... Found stop ID 308238 at 14 St/3 Av. Checking real-time predictions: M15 Select Bus Service southbound to South Ferry — arriving in 2 minutes; M15 local southbound — arriving in 8 minutes; M15 SBS northbound to East Harlem — arriving in 12 minutes. All vehicles currently on schedule. The SBS stop requires fare payment at street-level machines before boarding. Would you like me to track the exact GPS positions of these buses?
```

**Prompt:** 
```
Check if there are any service alerts affecting the LIRR right now.
```

**Response:** 
```
Checking MTA service alerts... Currently 2 active LIRR alerts: 1) Babylon Branch — Trains experiencing 10-15 minute delays due to earlier signal problem at Jamaica. Normal service expected to resume by 6:30 PM. 2) Port Jefferson Branch — Track work in effect between Huntington and Northport, expect single-tracking with 20 minute delays through 11:00 PM tonight. All other LIRR branches running on schedule. Penn Station and Grand Central Madison terminals operating normally. Would you like me to check specific train predictions for your branch?
```

## Capabilities

### Monitor all service alerts
Check for active disruptions across the entire MTA system, including buses, subways, LIRR, and Metro-North.

### Track subway lines in real time
Get live train positions and arrival predictions for every major NYC Subway line.

### Predict bus arrivals at a stop
Determine exactly when the next bus is expected to arrive, or track multiple routes approaching one specific spot.

### Track all MTA vehicles system-wide
View the current GPS positions of every active bus on the road across NYC.

### Monitor commuter rail lines
Get real-time status and arrival predictions for both LIRR and Metro-North trains into Manhattan.

### Discover station network details
List all NYC Subway stations, including their coordinates and borough information.

## Use Cases

### Planning a cross-borough commute
A user asks their agent for travel plans from Queens to the Upper West Side. The agent first uses `get_service_alerts` to check for weekend maintenance, then uses `get_subway_feed` to predict arrival times on the 4/5/6 line, and finally checks `get_bus_predictions` if a bus connection is needed.

### Managing a field crew visit
A manager needs to know where several buses are in relation to an event. They run `get_bus_vehicles` and then use `get_bus_stops` to find the closest official boarding points for their staff, ensuring no one is left stranded.

### Diagnosing a service failure
A transit analyst asks, 'Why are buses running slow today?' The agent checks `get_bus_vehicles` to see cluster density and then runs `get_service_alerts` to correlate the delay with known incidents.

### Guiding a tourist through the system
A tourist asks for the nearest train. The agent uses `get_stations` to list nearby stations, checks `get_subway_feed` for real-time status on that specific line, and provides immediate directions.

## Benefits

- Avoid manual checks by asking for service alerts; the `get_service_alerts` tool immediately tells you if LIRR or subway lines are experiencing major delays.
- Pinpoint exact arrivals: Instead of guessing, use `get_bus_predictions` to know exactly when the next bus is coming to your specific stop.
- See the full network picture by using `get_bus_routes` to list every service area and then pinpointing stops with `get_bus_stops`.
- Track trains across all modes: Monitor subway movements using `get_subway_feed`, while simultaneously checking commuter rail status via `get_lirr_feed` or `get_metro_north_feed`.
- Know where vehicles are right now: Use `get_bus_vehicles` to see the system-wide positions of every active bus, not just those near you.

## How It Works

The bottom line is you get accurate, immediate answers about NYC transit without needing to open any separate transit app.

1. Subscribe to this MCP on Vinkius and input your MTA API key.
2. Connect your AI client (Claude, Cursor, etc.) to the catalog using your credentials.
3. Ask your agent a specific transit question—for example, 'What are the delays on the LIRR' or 'When does the next M15 bus arrive at 34th Street?'

## Frequently Asked Questions

**Does the MTA MCP cover all NYC Subway lines?**
Yes. The `get_subway_feed` tool supports major subway lines by their feed ID, providing real-time status for most of the system.

**How do I find a bus stop ID to use with get_bus_predictions?**
Use the `get_bus_stops` tool. This function lists all stops for any given MTA bus route and provides the required unique Stop IDs.

**Can this MCP track buses system-wide or just near me?**
It handles both. You can check every vehicle's location using `get_bus_vehicles`, or narrow it down to specific approaching vehicles with `get_bus_vehicle_at_stop`.

**Is the LIRR data separate from subway data in MTA MCP?**
Yes. The system keeps commuter rail and subway data distinct. Use `get_lirr_feed` for Long Island Rail Road status, and `get_subway_feed` for underground trains.

**What if I just need to know the total number of stations?**
You can run `get_stations`. This tool returns a complete list of all NYC Subway station records, giving you the necessary count and geographic details.