Hosted MCP server · #61 most used on Smithery

Malaysia Transit MCP

hithereiamaliff/mcp-malaysiatransit

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, and various BAS.MY services across Malaysia. Currently covering the following areas: - Kangar - Alor Setar - Penang - Klang Valley (Kuala Lumpur, Selangor, Putrajaya) - Melaka - Johor Bahru - Kota Bharu - Kuala Terengganu - Kuching - Ipoh - Seremban More areas to be covered soon! Note: this is NOT an official MCP server by the Government of Malaysia or anyone from Prasarana Malaysia, Ministry of Transport (MOT), Agensi Pengangkutan Awam Darat (APAD), KTM Berhad, or operators involved in BAS.MY operations.

Uses
7.9k
Tools
43
Runs
Hosted
Listed
1.0y ago

Get started

Add it to your agent

npx -y @smithery/cli@latest install hithereiamaliff/mcp-malaysiatransit --client claude

Swap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.

What it can do

43 tools

list_service_areasList all available transit service areas in Malaysia (e.g., Klang Valley, Penang, Kuantan)
detect_location_area1 paramAutomatically detect which transit service area a location belongs to using geocoding. Use this when the user mentions a place name witho…

Automatically detect which transit service area a location belongs to using geocoding. Use this when the user mentions a place name without specifying the area (e.g., "KTM Alor Setar", "Komtar", "KLCC"). IMPORTANT: After detecting the area, use find_nearby_stops_with_arrivals or find_nearby_stops with the location parameter - these tools handle geocoding automatically and are more reliable than using coordinates from this tool.

ParameterTypeDescription
locationstringLocation name or place (e.g., "KTM Alor Setar", "Komtar", "Pavilion KL")
get_area_info1 paramGet detailed information about a specific transit service area
ParameterTypeDescription
areaIdstringService area ID (e.g., "penang", "klang-valley", "kuantan")
search_stops2 paramsSearch for bus or train stops by name in a specific area. The middleware will automatically geocode place names (like "Ideal Foresta") an…

Search for bus or train stops by name in a specific area. The middleware will automatically geocode place names (like "Ideal Foresta") and find nearby stops if no exact stop name match is found. IMPORTANT: If you are unsure which area a location belongs to, use detect_location_area first to automatically determine the correct area.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley"). Use detect_location_area if unsure.
querystringSearch query - can be a stop name (e.g., "Komtar") OR a place name (e.g., "Ideal Foresta"). Place names will be auto-geocoded to find nearby stops.
get_stop_details2 paramsGet detailed information about a specific bus or train stop
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
stopIdstringStop ID from search results
get_stop_arrivals2 paramsGet real-time arrival predictions for buses/trains at a specific stop
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
stopIdstringStop ID from search results
find_nearby_stops5 paramsFind bus or train stops near a specific location AND get all routes serving those stops. You can provide EITHER coordinates (lat/lon) OR …

Find bus or train stops near a specific location AND get all routes serving those stops. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode place names automatically.

ParameterTypeDescription
latnumberLatitude coordinate (optional if location is provided)
lonnumberLongitude coordinate (optional if location is provided)
areastringService area ID (e.g., "penang", "klang-valley")
radiusnumberSearch radius in meters (default: 500)
locationstringPlace name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar"). Use this instead of lat/lon for convenience.
find_nearby_stops_with_arrivals6 paramsFind bus stops near a location AND get real-time arrival predictions in one call. RECOMMENDED: Use this tool when users ask about nearby …

Find bus stops near a location AND get real-time arrival predictions in one call. RECOMMENDED: Use this tool when users ask about nearby bus stops and arrival times together. Accepts a place name (e.g., "Ideal Foresta") - the middleware handles geocoding automatically.

ParameterTypeDescription
latnumberLatitude coordinate (optional if location is provided)
lonnumberLongitude coordinate (optional if location is provided)
areastringService area ID (e.g., "penang", "klang-valley")
radiusnumberSearch radius in meters (default: 500)
locationstringPlace name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar")
routeFilterstringFilter arrivals by route number (e.g., "302", "101")
find_nearby_stops_with_routes5 paramsFind bus stops near a location AND get all routes serving those stops in one call. Accepts a place name (e.g., "Ideal Foresta") - the mid…

Find bus stops near a location AND get all routes serving those stops in one call. Accepts a place name (e.g., "Ideal Foresta") - the middleware handles geocoding automatically.

ParameterTypeDescription
latnumberLatitude coordinate (optional if location is provided)
lonnumberLongitude coordinate (optional if location is provided)
areastringService area ID (e.g., "penang", "klang-valley")
radiusnumberSearch radius in meters (default: 500)
locationstringPlace name to geocode (e.g., "Ideal Foresta", "KLCC", "Komtar")
list_routes1 paramList all available bus or train routes in a specific area
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
get_route_stops2 paramsGet all stops on a specific route. Use this to find which stops a bus/train route serves. IMPORTANT: First call list_routes to get the co…

Get all stops on a specific route. Use this to find which stops a bus/train route serves. IMPORTANT: First call list_routes to get the correct route_id.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
routeIdstringRoute ID from list_routes (e.g., "302", "101")
get_route_details2 paramsGet detailed information about a specific route including stops and geometry. IMPORTANT: First call list_routes to get the correct route_id.
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
routeIdstringRoute ID from list_routes (e.g., "302", "101")
get_route_geometry2 paramsGet the geographic path and stops for a specific route (for map visualization)
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
routeIdstringRoute ID from list_routes
get_live_vehicles2 paramsGet real-time positions of all buses and trains in a specific area
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
typestringFilter by transit type (optional)
get_provider_status1 paramCheck the operational status of transit providers in a specific area
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley")
get_route_departures3 paramsGet the next N departures for a specific route (both directions). Useful for showing upcoming bus/train times. IMPORTANT: Use route_short…

Get the next N departures for a specific route (both directions). Useful for showing upcoming bus/train times. IMPORTANT: Use route_short_name (e.g., "K10", "A32", "R10", "101") NOT the numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
countnumberNumber of departures to return (default: 5)
routeIdstringRoute SHORT NAME (e.g., "101", "K10", "A32") - NOT the numeric route_id. Get this from list_routes route_short_name field.
get_next_departure3 paramsGet the single next departure for a route in a specific direction. Quick way to find when the next bus/train leaves. IMPORTANT: Use route…

Get the single next departure for a route in a specific direction. Quick way to find when the next bus/train leaves. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
routeIdstringRoute SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id
directionstringDirection of travel (optional)
get_stop_routes3 paramsGet all routes serving a specific stop with their next departures. Shows which buses/trains stop here and when. Works for: penang, ipoh, …

Get all routes serving a specific stop with their next departures. Shows which buses/trains stop here and when. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
countnumberNumber of departures per route (default: 3)
stopIdstringStop ID from search_stops
get_route_schedule2 paramsGet the complete daily schedule for a route. Shows all departure times throughout the day. IMPORTANT: Use route_short_name (e.g., "101", …

Get the complete daily schedule for a route. Shows all departure times throughout the day. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
routeIdstringRoute SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id
get_route_origin3 paramsGet the origin stop name for a route in a specific direction. Useful for showing where the bus/train starts. IMPORTANT: Use route_short_n…

Get the origin stop name for a route in a specific direction. Useful for showing where the bus/train starts. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
routeIdstringRoute SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id
directionstringDirection of travel (optional)
get_route_status2 paramsCheck if a route is currently operating based on its schedule. Shows if buses/trains are running now. IMPORTANT: Use route_short_name (e.…

Check if a route is currently operating based on its schedule. Shows if buses/trains are running now. IMPORTANT: Use route_short_name (e.g., "101", "K10", "A32") NOT numeric route_id. Works for: penang, ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh", "seremban", "alor-setar")
routeIdstringRoute SHORT NAME (e.g., "101", "K10", "A32") - NOT numeric route_id
get_fare_routes1 paramGet all routes available for fare calculation in a specific area. MUST call this FIRST before calculate_fare to get valid route_id values…

Get all routes available for fare calculation in a specific area. MUST call this FIRST before calculate_fare to get valid route_id values. Supports: ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching, penang.

ParameterTypeDescription
areastringService area ID - must be: ipoh, seremban, kangar, alor-setar, kota-bharu, kuala-terengganu, melaka, johor, kuching, or penang
get_route_stops_for_fare2 paramsGet all stops on a route with their distances for fare calculation. MUST call this SECOND (after get_fare_routes) to get valid stop_id va…

Get all stops on a route with their distances for fare calculation. MUST call this SECOND (after get_fare_routes) to get valid stop_id values for calculate_fare. Returns stop IDs and names.

ParameterTypeDescription
areastringService area ID - same as used in get_fare_routes
routeIdstringThe route_id value from get_fare_routes response (e.g., "D62", "A32", "M15CWLMYMK")
calculate_fare4 paramsCalculate the bus fare between two stops on a route. IMPORTANT: You MUST first call get_fare_routes to get route_id, then get_route_stops…

Calculate the bus fare between two stops on a route. IMPORTANT: You MUST first call get_fare_routes to get route_id, then get_route_stops_for_fare to get valid stop_id values. Do NOT guess IDs.

ParameterTypeDescription
areastringService area ID - same as used in previous calls
toStopstringThe exact stop_id from get_route_stops_for_fare response
routeIdstringThe exact route_id from get_fare_routes (NOT route_short_name)
fromStopstringThe exact stop_id from get_route_stops_for_fare response
calculate_journey_fare2 paramsCalculate the total fare for a multi-leg journey with bus transfers. Each leg is a separate fare since BAS.MY does not have integrated tr…

Calculate the total fare for a multi-leg journey with bus transfers. Each leg is a separate fare since BAS.MY does not have integrated transfers.

ParameterTypeDescription
areastringBase service area ID (legs can specify different areas for inter-area journeys)
legsarrayArray of journey legs (max 5)
get_route_directions_for_fare2 paramsGet available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) to use for fare cal…

Get available directions for a route when calculating fares. Use this to determine which direction (outbound/inbound) to use for fare calculation.

ParameterTypeDescription
areastringService area ID (e.g., "penang", "ipoh")
routeIdstringRoute ID from get_fare_routes
get_ktm_komuter_stationsGet all 23 KTM Komuter Utara stations (Padang Besar - Butterworth - Ipoh line). Returns station codes, names, and coordinates.
calculate_ktm_komuter_fare2 paramsCalculate KTM Komuter Utara fare between two stations. Use station codes (e.g., "BU" for Butterworth, "IP" for Ipoh, "PB" for Padang Besar).
ParameterTypeDescription
tostringDestination station code (e.g., "BU", "IP", "PB")
fromstringOrigin station code (e.g., "BU", "IP", "PB")
get_ktm_komuter_fare_matrixGet the full KTM Komuter Utara fare matrix showing fares between all station pairs.
get_ktm_station_departures2 paramsGet departure times for a specific KTM station. Supports both KTM Komuter Utara and KTM Intercity schedules.
ParameterTypeDescription
typestringSchedule type: ktm-komuter-utara (Padang Besar-Ipoh) or ktm-intercity (SH/ERT routes)
stationNamestringStation name (e.g., "Butterworth", "Ipoh", "Padang Besar", "Gemas")
get_ktm_stations1 paramGet all KTM stations for a specific schedule type (Komuter Utara or Intercity).
ParameterTypeDescription
typestringSchedule type: ktm-komuter-utara or ktm-intercity
get_ktm_schedules1 paramGet full KTM schedule data for a specific schedule type. Returns complete timetable information.
ParameterTypeDescription
typestringSchedule type: ktm-komuter-utara or ktm-intercity
find_nearby_ktm_stations5 paramsFind KTM stations near a specific location. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode…

Find KTM stations near a specific location. You can provide EITHER coordinates (lat/lon) OR a location name - the middleware will geocode place names automatically.

ParameterTypeDescription
latnumberLatitude coordinate (optional if location is provided)
lonnumberLongitude coordinate (optional if location is provided)
typestringSchedule type: ktm-komuter-utara or ktm-intercity
radiusnumberSearch radius in kilometers (default: 10)
locationstringPlace name to geocode (e.g., "Butterworth", "Ipoh", "Padang Besar"). Use this instead of lat/lon for convenience.
get_penang_ferry_overviewGet Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry operates between Bu…

Get Penang Ferry service overview including terminals, operating hours, frequency, and contact information. The ferry operates between Butterworth and George Town.

get_penang_ferry_schedule2 paramsGet full Penang Ferry schedule with departure times. Supports filtering by direction and day type.
ParameterTypeDescription
daystringFilter by day type (optional)
directionstringFilter by direction (optional)
get_penang_ferry_next_departureGet next ferry departures from both Butterworth and George Town terminals in real-time. Shows minutes until departure.
get_penang_ferry_terminalsGet detailed information about Penang Ferry terminals including facilities, connections, parking, and nearby attractions.
get_penang_ferry_fareGet Penang Ferry fare information, payment methods, and terminal coordinates.
get_system_healthCheck the health status of the Malaysia Transit middleware service
get_debug_infoGet comprehensive debug information about the middleware service including memory usage and initialized areas
get_api_analytics1 paramGet API usage analytics and statistics from the middleware. Shows total requests, requests per hour, error rates, and usage by service ar…

Get API usage analytics and statistics from the middleware. Shows total requests, requests per hour, error rates, and usage by service area. Useful for monitoring API health and usage patterns.

ParameterTypeDescription
typestringType of analytics: summary (overview), endpoints (per-endpoint stats), areas (per-area stats), cumulative (all-time totals), clients (app/website usage)
get_area_analytics1 paramGet detailed API usage analytics for a specific service area. Shows which endpoints are most used for that area.
ParameterTypeDescription
areastringService area ID (e.g., "penang", "klang-valley", "ipoh")
helloA simple test tool to verify that the MCP server is working correctly