mcp-emtrafesa
v2.1.1A Model Context Protocol (MCP) server for accessing Emtrafesa bus transportation services in Peru
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get-terminals Get Terminals
Retrieve all Emtrafesa bus terminals across Peru. Returns a list of terminals, each with an id, name, and address. Call this tool first to discover valid terminal ids before querying destinations or schedules. The id field is required as input for get-arrival-terminals and get-departure-schedules.
get-arrival-terminals Get Arrival Terminals
List the cities you can travel to from a given origin city. Pass city names as the traveller says them; matching ignores case and accents. Use this to answer 'where can I go from X', or to check a route exists before asking for schedules.
| Parameter | Type | Description |
|---|---|---|
from * | string | Origin city name, e.g. 'Chiclayo'. Call get-terminals if you need the list of cities Emtrafesa serves. |
get-departure-schedules Get Departure Schedules
Find bus departures between two Peruvian cities. Pass city names as the traveller says them, e.g. from 'Chiclayo' to 'Trujillo'; matching ignores case and accents, and this tool resolves the route itself. Each departure carries departsAt and arrivesAt as ISO 8601 UTC timestamps, departureTime and arrivalTime as local Peru clock times, the service name, seats still available, deck count, the price per deck, and whether it is direct. Omitting date means today in Peru.
| Parameter | Type | Description |
|---|---|---|
from * | string | Origin city name, e.g. 'Chiclayo'. |
to * | string | Destination city name, e.g. 'Trujillo'. |
date | string | Travel date as DD/MM/YYYY, e.g. '25/12/2026'. Defaults to today in Peru (America/Lima). Cannot be in the past. |
get-available-seats Get Available Seats
See which individual seats are still free on one departure, and on which deck. Call get-departure-schedules first and pass the scheduleId of the departure you care about, plus the same two city names. Use this when the traveller asks about seats, wants a window or lower-deck seat, or is choosing between departures on availability.
| Parameter | Type | Description |
|---|---|---|
from * | string | Origin city name, e.g. 'Chiclayo'. |
scheduleId * | number | The id of the departure, taken from get-departure-schedules. |
to * | string | Destination city name, e.g. 'Lima'. |
get-frequently-asked-questions Get Frequently Asked Questions
Retrieve the official Emtrafesa FAQ list covering topics such as terminal locations, ticket purchasing, passenger categories (children, seniors, etc.), luggage policies, and service rules. Use this to answer general questions about how Emtrafesa operates without needing to query schedules or tickets.
get-latest-purchased-tickets Get Latest Purchased Tickets
Look up the most recently purchased Emtrafesa bus tickets associated with a passenger's DNI and email address. Returns ticket records including travel date/time, seat numbers, ticket codes, price, operation number, and origin/destination. Use the values from the ticketsCodes array as input for get-ticket-pdf to download each PDF receipt.
| Parameter | Type | Description |
|---|---|---|
DNI * | string | The passenger's DNI (Documento Nacional de Identidad), the Peruvian national ID number. Numeric string, typically 8 digits. |
email * | string | The email address used when purchasing the tickets. Must match the DNI exactly as registered with Emtrafesa. |
get-ticket-pdf Get Ticket PDF
Download an Emtrafesa bus ticket as a PDF document. Returns the PDF as a base64-encoded resource. Requires a ticketCode obtained from the ticketsCodes array in get-latest-purchased-tickets results. A single purchase may have multiple ticket codes, one per seat — call this tool once per code to retrieve each document.
| Parameter | Type | Description |
|---|---|---|
ticketCode * | string | The individual ticket code (boleto code) for a single seat. Obtain from the ticketsCodes array returned by get-latest-purchased-tickets. |