# Malaysia Transit MCP

A Model Context Protocol server that taps access to real-time bus and train information across 12 Malaysian cities. Get live arrivals, vehicle tracking, and route details from Rapid KL, Rapid Penang,…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add hithereiamaliff/mcp-malaysiatransit

# Browse available tools
npx -y @smithery/cli@latest tool list hithereiamaliff/mcp-malaysiatransit

# Get full schema for a tool
npx -y @smithery/cli@latest tool get hithereiamaliff/mcp-malaysiatransit list_service_areas

# Call a tool
npx -y @smithery/cli@latest tool call hithereiamaliff/mcp-malaysiatransit list_service_areas '{}'
```

## Direct MCP Connection

Endpoint: `https://mcp-malaysiatransit--hithereiamaliff.run.tools`

## Tools (43)

- `list_service_areas` — List all available transit service areas in Malaysia (e.g., Klang Valley, Penang, Kuantan)
- `detect_location_area` — Automatically detect which transit service area a location belongs to using geocoding. Use this when the user mentions …
- `get_area_info` — Get detailed information about a specific transit service area
- `search_stops` — Search for bus or train stops by name in a specific area. The middleware will automatically geocode place names (like "…
- `get_stop_details` — Get detailed information about a specific bus or train stop
- `get_stop_arrivals` — Get real-time arrival predictions for buses/trains at a specific stop
- `find_nearby_stops` — Find bus or train stops near a specific location AND get all routes serving those stops. You can provide EITHER coordin…
- `find_nearby_stops_with_arrivals` — Find bus stops near a location AND get real-time arrival predictions in one call. RECOMMENDED: Use this tool when users…
- `find_nearby_stops_with_routes` — Find bus stops near a location AND get all routes serving those stops in one call. Accepts a place name (e.g., "Ideal F…
- `list_routes` — List all available bus or train routes in a specific area
- `get_route_stops` — Get all stops on a specific route. Use this to find which stops a bus/train route serves. IMPORTANT: First call list_ro…
- `get_route_details` — Get detailed information about a specific route including stops and geometry. IMPORTANT: First call list_routes to get …
- `get_route_geometry` — Get the geographic path and stops for a specific route (for map visualization)
- `get_live_vehicles` — Get real-time positions of all buses and trains in a specific area
- `get_provider_status` — Check the operational status of transit providers in a specific area
- `get_route_departures` — Get the next N departures for a specific route (both directions). Useful for showing upcoming bus/train times. IMPORTAN…
- `get_next_departure` — Get the single next departure for a route in a specific direction. Quick way to find when the next bus/train leaves. IM…
- `get_stop_routes` — Get all routes serving a specific stop with their next departures. Shows which buses/trains stop here and when. Works f…
- `get_route_schedule` — Get the complete daily schedule for a route. Shows all departure times throughout the day. IMPORTANT: Use route_short_n…
- `get_route_origin` — Get the origin stop name for a route in a specific direction. Useful for showing where the bus/train starts. IMPORTANT:…
- `get_route_status` — Check if a route is currently operating based on its schedule. Shows if buses/trains are running now. IMPORTANT: Use ro…
- `get_fare_routes` — Get all routes available for fare calculation in a specific area. MUST call this FIRST before calculate_fare to get val…
- `get_route_stops_for_fare` — Get all stops on a route with their distances for fare calculation. MUST call this SECOND (after get_fare_routes) to ge…
- `calculate_fare` — Calculate the bus fare between two stops on a route. IMPORTANT: You MUST first call get_fare_routes to get route_id, th…
- `calculate_journey_fare` — Calculate the total fare for a multi-leg journey with bus transfers. Each leg is a separate fare since BAS.MY does not …
- `get_route_directions_for_fare` — Get available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) t…
- `get_ktm_komuter_stations` — Get all 23 KTM Komuter Utara stations (Padang Besar - Butterworth - Ipoh line). Returns station codes, names, and coord…
- `calculate_ktm_komuter_fare` — Calculate KTM Komuter Utara fare between two stations. Use station codes (e.g., "BU" for Butterworth, "IP" for Ipoh, "P…
- `get_ktm_komuter_fare_matrix` — Get the full KTM Komuter Utara fare matrix showing fares between all station pairs.
- `get_ktm_station_departures` — Get departure times for a specific KTM station. Supports both KTM Komuter Utara and KTM Intercity schedules.
- `get_ktm_stations` — Get all KTM stations for a specific schedule type (Komuter Utara or Intercity).
- `get_ktm_schedules` — Get full KTM schedule data for a specific schedule type. Returns complete timetable information.
- `find_nearby_ktm_stations` — Find KTM stations near a specific location. You can provide EITHER coordinates (lat/lon) OR a location name - the middl…
- `get_penang_ferry_overview` — Get Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry o…
- `get_penang_ferry_schedule` — Get full Penang Ferry schedule with departure times. Supports filtering by direction and day type.
- `get_penang_ferry_next_departure` — Get next ferry departures from both Butterworth and George Town terminals in real-time. Shows minutes until departure.
- `get_penang_ferry_terminals` — Get detailed information about Penang Ferry terminals including facilities, connections, parking, and nearby attraction…
- `get_penang_ferry_fare` — Get Penang Ferry fare information, payment methods, and terminal coordinates.
- `get_system_health` — Check the health status of the Malaysia Transit middleware service
- `get_debug_info` — Get comprehensive debug information about the middleware service including memory usage and initialized areas
- `get_api_analytics` — Get API usage analytics and statistics from the middleware. Shows total requests, requests per hour, error rates, and u…
- `get_area_analytics` — Get detailed API usage analytics for a specific service area. Shows which endpoints are most used for that area.
- `hello` — A simple test tool to verify that the MCP server is working correctly

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get hithereiamaliff/mcp-malaysiatransit <tool-name>
```

---

Source: https://github.com/hithereiamaliff/mcp-malaysiatransit
