# CTA MCP

> CTA gives your AI agent full control of Chicago's public transit data. Track L trains and buses in real-time, check arrival predictions at any stop, and monitor service alerts immediately. You get an accurate view of the entire system—from bus routes to train positions—all through natural conversation.

## Overview
- **Category:** government-public-data
- **Price:** Free
- **Tags:** public-transit, real-time-tracking, arrival-predictions, transportation-data, route-planning, service-alerts

## Description

Using this MCP lets your agent talk directly to Chicago's transit backbone. Forget jumping between different websites or opening multiple apps just to figure out how long the next train is coming. Instead, you ask for it once, and the system handles the complexity.

Whether you need to know if a bus is running late due to an accident or want to see exactly where every active train is on the Blue Line right now, your agent pulls that live data instantly. It’s like having a dedicated transit analyst who knows the whole network inside and out. You access this power through Vinkius, connecting it to any MCP-compatible client you already use.

Your AI acts as more than just an assistant; it's a trip planner for Chicago. It combines real-time vehicle tracking with static route maps, giving you precise arrival estimates and clear alerts on service disruptions before you even leave the house.

## Tools

### get_bus_predictions
Gets predicted arrival times for buses at specific CTA stops.

### get_bus_routes
Lists all official bus routes serving Chicago, giving their names and colors.

### get_bus_stops
Retrieves detailed information and IDs for every CTA bus stop location.

### get_bus_vehicles
Tracks the live GPS positions of all active CTA buses across the city or by route.

### get_route_directions
Determines the direction (Northbound, Southbound, etc.) that a specific bus route follows.

### get_route_status
Provides a quick status check on all CTA routes, noting if they are delayed or running normally.

### get_service_alerts
Pulls current system-wide alerts regarding disruptions, detours, and maintenance across the CTA.

### get_stop_details
Gathers detailed location data for any specific bus stop ID or name.

### get_system_time
Returns the current official CTA system timestamp to verify connectivity and timing.

### get_train_arrivals
Predicts when the next L train will arrive at a specific station, including line colors and destinations.

### get_train_positions
Tracks the real-time locations of all active CTA trains system-wide or by line.

## Prompt Examples

**Prompt:** 
```
When is the next Red Line train arriving at Clark/Lake?
```

**Response:** 
```
Fetching arrivals for Clark/Lake (mapId: 40360)... Next Red Line trains: Howard — 3 minutes, approaching; 95th/Dan Ryan — 6 minutes, on-time; Howard — 10 minutes, scheduled; 95th/Dan Ryan — 14 minutes, on-time. All Red Line trains currently running on schedule with no delays reported. Trains arrive approximately every 4-6 minutes during peak hours.
```

**Prompt:** 
```
Show me all CTA bus stops on route 22 Clark.
```

**Response:** 
```
Fetching stops for route 22 Clark... I found 89 stops along this major north-south corridor. Key stops include: Howard Street (North end), Morse, Loyola, Granville, Bryn Mawr, Berwyn, Lawrence, Montrose, Irving Park, Belmont, Fullerton, North/Clybourn, Chicago Ave, Grand, Washington, Jackson, Harrison, Roosevelt, Cermak-Chinatown, 35th-Bronzeville, 47th, 51st, 55th-Garfield, 63rd, and 95th Street (South end). Would you like arrival predictions for a specific stop?
```

**Prompt:** 
```
How is CTA running today? Any delays on the L or bus routes?
```

**Response:** 
```
Checking CTA route status... System overview: Red Line — GOOD, Blue Line — GOOD, Brown Line — GOOD, Green Line — GOOD, Orange Line — GOOD, Purple Line — GOOD, Pink Line — GOOD, Yellow Line — GOOD. All L lines currently running on schedule with no major disruptions. For bus routes, most routes are operating normally. Would you like me to check specific alerts for a particular line or route, or get arrival predictions for your commute?
```

## Capabilities

### Get live train arrivals
The MCP predicts when the next L train will arrive at any specified station.

### Track active trains system-wide
It provides the current location and direction for every running CTA train line.

### Predict bus arrival times
The MCP estimates when a specific bus will arrive at your selected stop.

### Map all available routes and stops
It lists every official bus route and retrieves detailed information for any bus stop location.

### Check system-wide service disruptions
The MCP pulls active alerts, showing the cause, severity, and affected lines or routes.

## Use Cases

### Dealing with a sudden system failure
You're heading out and hear rumors about delays. Instead of calling someone, you ask your agent to check for alerts, which uses `get_service_alerts`. It immediately confirms that the Green Line has severe delays due to track maintenance, saving you the time of finding an alternative route.

### Finding a complex transfer point
You need to get from a bus stop near Roosevelt to the nearest L train. You ask your agent which lines serve that area. The MCP uses `get_bus_stops` to confirm the closest stops, then uses `get_train_arrivals` to give you the next Red Line arrival time.

### Tracking a specific bus fleet
You're tracking an employee who needs to get across town. You ask your agent for all active buses on that route, using `get_bus_vehicles`. It gives you real-time locations so you know when the nearest bus will pass their current spot.

### Determining system health
You need a quick overall status check for an event. You ask your agent, 'How is CTA running today?' It uses `get_route_status` to give you a simple overview of all lines and routes without needing deep dive details.

## Benefits

- Avoid guesswork with `get_service_alerts`: Instead of checking multiple apps for delays, your agent pulls all active disruptions in one go, telling you if the Red Line or Blue Line is affected.
- Master your commute using `get_bus_predictions`: You ask 'when' and get a precise estimate—not just an idea. This saves you from waiting unnecessarily at the stop.
- Visualize the whole network with `get_train_positions` and `get_bus_vehicles`: See where every train and bus is right now, which is way more useful than just knowing the schedule.
- Plan stops accurately with `get_stop_details`: If you only have a street intersection name, this tool gives you the exact coordinates needed for reliable trip planning.
- Know your options using `get_bus_routes` and `get_route_directions`: Need to know if Route 36 goes northbound? This checks that direction pattern before you even plan the trip.

## How It Works

The bottom line is your AI acts as the interface between you and Chicago's entire transit network.

1. First, you subscribe to this MCP and enter both your CTA Train Tracker API key and CTA Bus Tracker API key.
2. Next, you tell your AI agent what you need—for example, 'What's the status of the Red Line?' or 'When does the 22 Clark bus get here?'
3. The agent uses the available tools to pull real-time data from the CTA system and gives you a single, conversational answer.

## Frequently Asked Questions

**How do I check if there are any delays on the Red Line using get_service_alerts?**
You ask your agent to check service alerts. The tool immediately pulls system-wide disruption data, confirming if any maintenance or incidents affect the specific line you need.

**What is the difference between get_bus_predictions and get_train_arrivals?**
While both predict arrival times, `get_bus_predictions` focuses specifically on bus routes using bus stops. `get_train_arrivals` handles L trains at specific stations.

**Can I find all the available CTA bus stops with get_bus_stops?**
Yes, this tool retrieves a list of every official stop ID and its exact coordinates. This helps you plan routes even if you don't know the station name.

**Should I use get_route_status or get_service_alerts for an overall system check?**
Use `get_route_status` first for a general, quick overview of all lines. If that looks good but you suspect something specific is wrong, follow up with `get_service_alerts` to find the root cause.

**What does get_bus_vehicles actually track?**
It tracks real-time GPS data for every active bus. It tells you not just that a route exists, but where the physical vehicle is right now and which direction it's heading.

**What should I check first when setting up my agent to use get_system_time?**
You must obtain your CTA Developer Portal API keys first. Running get_system_time confirms your connection and synchronizes the timestamp across all data streams, which is critical for correlating real-time bus or train movements accurately.

**How do I understand the direction of a specific route using get_route_directions?**
The tool returns explicit direction IDs and names (like Northbound or Southbound). You use this to map out the full geometry of any CTA bus line, ensuring your agent knows if it needs to search for stops in the correct traveling pattern.

**Is there a difference between getting bus tracking data via get_bus_vehicles and train positions using get_train_positions?**
Yes. get_bus_vehicles tracks every active CTA bus using real-time GPS coordinates system-wide for fleet monitoring purposes. get_train_positions, however, focuses only on the L lines (Red, Blue, etc.), providing dedicated rail network location data.

**Can my AI check when the next L train is arriving at my station?**
Yes! Use the `get_train_arrivals` tool with the station mapId (a 5-digit parent station ID, e.g., 40360 for Clark/Lake, 40900 for Jackson). Your AI will return all upcoming trains with destination names, line colors (Red, Blue, Brown, Green, Orange, Purple, Pink, Yellow), predicted arrival times in minutes, operating status (on-time, delayed, approaching, boarding, departing), and whether the train is scheduled or real-time tracked. If you do not know the mapId, it can be found in the CTA GTFS static data feed.

**How do I check when the next CTA bus is arriving at a specific stop?**
First use `get_bus_stops` with a route ID to find the stop ID (stpid) for your location. Then use `get_bus_predictions` with that stop ID to get real-time estimated arrival times, route information, destination descriptions, and vehicle IDs. For route-filtered predictions, you can also pass the route ID to narrow results to a specific bus line. Stop IDs are numeric identifiers assigned by CTA to each physical bus stop across Chicago.

**Are there any service disruptions affecting the Red Line or my bus route right now?**
Use `get_service_alerts` to check all active service disruptions across the CTA system. This returns alerts with affected routes and stations, disruption descriptions, severity levels, cause types (maintenance, incident, weather, special events, construction), and detour information. You can also use `get_route_status` for a quick system-wide health check showing which L lines and bus routes are running on-time, delayed, or have planned work. Always check this before planning any CTA journey.