# TransportAPI Alternative MCP

> TransportAPI Alternative provides full UK public transport intelligence for your AI agent. It handles everything from checking live bus and train departures to planning complex, multi-modal journeys across multiple lines. You can search stations by name or postcode, audit fares, and get detailed timetables—all without opening a separate travel app.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** public-transport, logistics, real-time-data, journey-planning, transit-schedules

## Description

You're getting full UK public transport intelligence right here for your agent. You don't gotta open another travel app or deal with messy websites; your AI client handles all the complex logistics and gives you actionable data straight up.

Your agent calculates step-by-step journeys using **`plan_public_transport_journey`**, figuring out the optimal route between any two spots. It maps out multi-modal trips, meaning it accounts for bus transfers, train segments, and even how long you'll walk between points. 

Need to know what's happening right now? You can check live departures for both buses and trains. **`get_live_bus_departures`** gives real-time times, destinations, and operators for any specific UK bus stop. Similarly, **`get_live_train_departures`** pulls the current status of trains leaving any specified station code or name.

Finding your starting point is simple. You can use **`search_transport_places`** to locate specific train stations or bus stops just by naming 'em. If you only have a UK postcode, **`get_transport_by_postcode`** identifies all the public transport options available from that zip code. For precise location finding using coordinates, **`get_nearby_bus_stops`** finds every bus stop near those GPS points, and **`get_nearby_transport_places`** locates major hubs like train stations or large bus interchanges nearby.

For planning ahead, you've got deep access to schedules. You can grab the full operational calling pattern for a specific rail line using **`get_train_service_details`**. For all trains running through one station, **`get_train_station_timetable`** provides the comprehensive schedule. If you focus on buses, **`get_bus_service`** retrieves detailed info about an entire bus line, and **`get_bus_route_timetable`** pulls the specific scheduled timetable for a single route ID.

Figuring out ticket costs is straightforward. You just run **`get_train_fares`**, and it compares the exact ticket price you need to travel between any two UK train stations. Your agent also handles general location discovery by letting you use **`get_transport_by_postcode`** when coordinates aren't an option, covering all public transport methods available from that postcode.

## Tools

### get_bus_service
Retrieves detailed information about an entire bus service or line.

### get_bus_route_timetable
Gets the scheduled timetable for a specific bus route ID.

### get_transport_by_postcode
Identifies available public transport options when you only have a UK postcode, not coordinates.

### get_live_bus_departures
Returns real-time departure times, destinations, and operators for a UK bus stop.

### get_live_train_departures
Returns real-time train departures for any specified UK station code or name.

### get_nearby_bus_stops
Finds all bus stops located near a given GPS coordinate pair.

### get_nearby_transport_places
Locates general transport hubs (like train stations or major bus interchanges) near specific coordinates.

### get_train_fares
Compares and retrieves the ticket price required to travel between any two UK train stations.

### get_train_service_details
Gives the full operational calling pattern of a specific train service or route.

### get_train_station_timetable
Provides the scheduled timetable for all trains running through a specific station.

### plan_public_transport_journey
Calculates the optimal, step-by-step journey plan between two specified locations.

### search_transport_places
Searches for specific train stations or bus stops by name.

## Prompt Examples

**Prompt:** 
```
Show live train departures for station 'EUS' (Euston) using TransportAPI.
```

**Response:** 
```
I've retrieved the live departures for London Euston. Notable trains include the service to Manchester Piccadilly at 10:20 and Birmingham New Street at 10:35. Would you like the platform numbers?
```

**Prompt:** 
```
Plan a journey from 'London Waterloo' to 'Brighton'.
```

**Response:** 
```
Journey plan retrieved! The best route is a direct train from Waterloo, taking approximately 1 hour and 10 minutes. I can provide the full list of intermediate stops and aimed departure times.
```

**Prompt:** 
```
Search for bus stops near coordinate 51.5074, -0.1278.
```

**Response:** 
```
I've identified several bus stops near Charing Cross. Notable stops include 'Trafalgar Square' and 'Horse Guards Parade'. Would you like the live departures for any specific stop ATCO code?
```

## Capabilities

### Plan Multi-Modal Journeys
Calculates step-by-step routes, including bus transfers, train segments, and walking time, between any two UK locations.

### Check Live Departures
Retrieves current, real-time departure times for both buses and trains at specific stops or stations.

### Search by Location Type
Finds nearby bus stops or general transport hubs using precise GPS coordinates.

### Determine Fares
Calculates the ticket price needed to travel between any two identified stations.

### Get Timetables and Services
Retrieves full scheduled timetables for both bus routes (`get_bus_route_timetable`) and train stations.

## Use Cases

### Emergency Commute Audit
A commuter needs to get from Waterloo to Brighton quickly. They ask their agent to run `plan_public_transport_journey`. The agent returns the fastest route, but before confirming, the user prompts for live status using `get_live_train_departures` at Waterloo to ensure no unexpected delays are reported.

### New Site Logistics Assessment
A project manager needs to know how people get to a new construction site defined only by a postcode. They use `get_transport_by_postcode` first, then use `search_transport_places` to verify if major bus stops are within walking distance, planning the final leg using `plan_public_transport_journey`.

### Route Reliability Check
A company needs to audit a key worker's daily journey. The agent runs `get_bus_service` for the primary bus line and then uses `get_bus_route_timetable` to pull the full schedule, letting the manager flag any service variations or gaps in coverage.

### Multi-Stop Data Collection
An academic researcher wants to map transit options around a central point. They run `get_nearby_transport_places` using GPS coordinates and then use `get_live_bus_departures` for the top three resulting stops to gather real-time data points.

## Benefits

- Real-time Status Checks: Don't guess the schedule. Use `get_live_bus_departures` or `get_live_train_departures` to get instant updates on bus and train arrivals at any stop.
- Full Trip Planning: The `plan_public_transport_journey` tool builds complete, multi-segment routes between locations—you don't have to stitch together different travel apps.
- Fare Comparison: Need to know the cost? `get_train_fares` quickly compares ticket prices for journeys between two stations so you can budget right away.
- Flexible Search Inputs: Stuck on an address? Use `get_transport_by_postcode` if you only have a UK postcode, or use `get_nearby_bus_stops` if you're working with GPS coordinates.
- Deep Service Data: For detailed analysis, pull the full schedule using `get_train_station_timetable`, or check service variations with `get_train_service_details`. This is depth data, not just a quick trip plan.

## How It Works

The bottom line is that you get a single conversation interface to manage complex transport queries that usually require multiple websites and manual steps.

1. 1. Subscribe to this server, then enter your TransportAPI App ID and API Key.
2. 2. Your AI client calls a specific tool (e.g., `get_live_train_departures`) with required parameters like station code or coordinates.
3. 3. The server executes the call against the live UK transit data and returns structured JSON containing departure times, routes, or journey segments.

## Frequently Asked Questions

**How do I find nearby bus stops using TransportAPI Alternative MCP Server?**
You use the `get_nearby_bus_stops` tool and provide your GPS coordinates. This finds all available stops near that specific point.

**Can I plan a journey if I only have a postcode, not coordinates? (Using TransportAPI Alternative MCP Server)**
Yes. First, run `get_transport_by_postcode` to get transport options based on the UK postcode, and then use those results in your planning calls.

**Is getting live departures for trains different than buses? (Using TransportAPI Alternative MCP Server)**
Yes. You must call `get_live_train_departures` for train status, and use `get_live_bus_departures` specifically for real-time bus updates.

**What is the difference between planning a journey and checking fares? (Using TransportAPI Alternative MCP Server)**
The `plan_public_transport_journey` gives you the route steps. The `get_train_fares` tool only calculates the current ticket price between two points, regardless of the full itinerary.

**How do I search for stations by name? (Using TransportAPI Alternative MCP Server)**
Use the `search_transport_places` tool. It allows you to input a station or bus stop name directly and returns matching IDs and locations.

**How do I get scheduled timetable data using the `get_train_station_timetable` tool?**
The `get_train_station_timetable` tool returns the static, published schedule for a station. This means you see when trains *should* run, regardless of real-time delays. It's crucial for planning long-term schedules or checking service patterns.

**What credentials do I need to connect and use the `TransportAPI Alternative MCP Server`?**
You must provide an API Key and App ID when configuring the server. These keys authenticate your AI client with TransportAPI, giving your agent access to all live departure and planning tools.

**When should I use `get_nearby_transport_places` versus searching by name?**
Use `get_nearby_transport_places` when you only have GPS coordinates and need a comprehensive list of all nearby hubs. If you know the exact name, stick to `search_transport_places` for faster, more targeted results.

**How do I find my TransportAPI credentials?**
Log in to your [**TransportAPI dashboard**](https://developer.transportapi.com/), and you will find your App ID and App Key under your 'Account' or 'Apps' section. Copy and paste them below.

**Does this cover transport outside of the UK?**
TransportAPI provides high-density data primarily for the UK transport network, including national rail, London Underground, and regional bus services.

**Can the agent plan a journey from coordinates?**
Yes. Use the `get_journey_plan` tool providing coordinates in 'lat,lon' format for the 'from' or 'to' parameters. Your agent will calculate the best public transport route instantly.