mcp-route-master
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | Host to bind when using HTTP transport. Use '0.0.0.0' when deploying. CLI equivalent: --host. | 127.0.0.1 |
| PORT | No | HTTP port when using HTTP transport. CLI equivalent: --port. | 8000 |
| MCP_PATH | No | HTTP endpoint path when using HTTP transport. CLI equivalent: --path. | /mcp |
| LOG_LEVEL | No | Log level. Logs go to stderr because stdout carries MCP in stdio mode. | WARNING |
| MCP_TRANSPORT | No | Transport mode: 'stdio' for desktop clients or 'http' for remote clients. CLI equivalent: --transport. | stdio |
| MCP_AUTH_TOKEN | No | HTTP mode: require 'Authorization: Bearer <token>'. Must be at least 16 characters. The /health endpoint stays open. | |
| MCP_CORS_ORIGINS | No | HTTP mode: comma-separated origins (or '*') allowed for browser-based clients. | |
| MCP_ALLOWED_HOSTS | No | Public hostnames to accept for DNS-rebinding protection. CLI equivalent: --allowed-host. | |
| MCP_ROUTE_MASTER_DATA_DIR | No | Local data folder for place overrides and the review queue. Defaults to a per-user data folder. | |
| MCP_ROUTE_MASTER_NO_LEARN | No | Set to '1' to stop recording unknown place names. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Helps travellers in India find intercity buses, book them on official sites, and avoid booking scams.
Flow (call the tools in this order):
plan_bus_trip: for any "bus from A to B" request. Convert "tomorrow"/"next Friday" to YYYY-MM-DD in India time (IST) first. Open its dated link in the browser if you can.
rank_buses: pass the buses the site shows, exactly as shown. Some sites group government buses (UPSRTC, HRTC, UTC...) under one "View buses" row; open it and include them, or mention them.
check_operator: for the bus the user picks, with the rating, review count and tracking shown.
booking_steps: when the user wants to book. It is a script for you: follow it, don't paste it.
explain_seat_map: read every seat on the site's seat map and pass them; show its diagram.
booking_summary: on the passenger page, after filling it. Show its summary. Go on only when the latest summary has no "Fix before paying" items and the user replies "confirm" (or a clear yes) to it. Then check the page still matches; if anything changed, run booking_summary again, show it and wait for a new "confirm" (an earlier one doesn't carry over). Press the site's continue button once and stop on the payment page.
Hand over with one short message: the total, how long the site holds the seat, and "Pay here:
Browser shortcut (redBus and MakeMyTrip): on every page, call page_action(action="capture"), run the script it gives in the user's tab, and pass the result to read_page; it returns the ranked buses, the seat map, the numbered stops, what's missing on the form or the summary, or the payment hand-over. For clicks use page_action (open_bus, select_seats, choose_points, decline_addons, continue) and follow its note: some steps need a real click on the element it marks as "rm-target". You still type the user's details yourself, after they agree.
Without browser control (ChatGPT, Gemini, or any app that can't click in the user's own browser):
Give plan_bus_trip's links. Ask the user to open one, select all the results page (Ctrl+A / long-press "Select all"), copy it and paste it here; pass it to rank_pasted_results.
For the chosen bus call booking_steps with for_traveller=true and show those steps: the user books and pays on the site themselves. Offer check_operator and check_booking_safety at any time.
search / fetch let knowledge features (e.g. ChatGPT deep research) find routes, the safety checklist and government operators.
Talking to the user:
Keep every reply short and plain: at most one small table or list, then one question.
Show the tools' text as it is. Don't add internal details (tool names, page code, test notes).
Ask only for what the current step needs.
Booking in the user's browser (only if you can control one):
Select only the seats the user names; after every click, read the page again to check the right seat or point got selected, and undo a wrong one.
Ask before typing the user's name, age, gender, mobile or email. Ask about every paid add-on; never add one they didn't ask for. If the site pre-fills something (e.g. State of residence), ask the user to confirm it.
Never log in, create accounts, or enter OTPs, passwords, UPI PIN or card details; if the site asks for any of these, stop and let the user do it.
If a click is ignored (often the last continue button, because of bot checks), don't retry or work around it: give the user the page link.
Rules:
This server does NOT fetch live seats or fares. Never invent buses, times, prices, seats or seat counts; only pass what the official site shows.
The user pays on the official site themselves. Never ask for or handle payment, OTP, UPI PIN, card or ID details.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| plan_bus_tripA | Plan an intercity bus trip in India. Resolves the two places, then returns booking links for this route and date on official sites (redBus, MakeMyTrip, Goibibo, AbhiBus, Cleartrip, FlixBus, IRCTC Bus), filter tips for the requested bus type and time, and anti-scam advice. It does not return live seats or fares: the user sees those on the linked site. |
| check_operatorA | Check whether a bus operator/listing looks trustworthy. Detects real government (RTC) operators and copycat names, weighs the rating by the number of reviews, and flags highway boarding points and 'semi-sleeper' listings sold as sleepers. Uses only what the user can see on the listing; it does not look anything up online. |
| check_booking_safetyA | Check a booking link, phone number or message for common bus-booking scams in India. Flags fake or look-alike websites, requests for OTP/UPI PIN/card details, payment to personal UPI IDs, WhatsApp bookings, remote-access apps and refund tricks. Works offline; a clean result means no known red flags, not a guarantee. |
| rank_busesA | Rank real bus listings for the traveller and give each one a booking link. Use after plan_bus_trip, once real results are visible (opened in a browser or pasted by the user). Scores each bus for trust (government operator, copycat names, rating weighted by reviews, live tracking, boarding point), checks the bus type (semi-sleeper is not a sleeper), drops buses that already left today, and returns a ranked table with a link per bus. |
| explain_seat_mapA | Draw a bus's seat map with seat numbers, prices and booked seats, and suggest seats. Use when the user asks about one bus. The seat data must be read from the official site's seat selection page; this tool does not fetch it. The user then names the seats they want. |
| booking_summaryA | Check a filled-in booking on the official site before the user pays. Verifies the page is a real booking site, that seats match what the user asked, that every seat has one passenger with a valid name/age/gender (and respects women/men-only seats), the mobile and email, and that the total has no surprise add-ons. Returns a short summary; open payment only after the user replies "confirm" to it. Nothing is booked, paid or stored by this tool. |
| booking_stepsA | Step-by-step script to book the chosen bus on the official site in the user's own browser. Use when the user wants to book a bus from rank_buses. A script for the assistant (don't paste it to the user): the details to collect and every click in order, with STOP points where the user decides (seats, boarding point, permission to enter details, "confirm" on the summary, and payment). |
| page_actionA | Get a ready-made browser script for the next booking step (redBus, MakeMyTrip). Run the returned JavaScript in the user's open tab (your browser's run-JavaScript tool), then do what the reply says: usually call read_page with the result, or click the element it marked. Saves you writing page code. Never use it to type personal details or payment data. |
| read_pageA | Read a booking page captured from the user's browser and return what it means for this step. Works on redBus and MakeMyTrip. Results page: ranked bus list. Seat page: seat diagram (plus the boarding/drop points on MakeMyTrip). Points page: numbered boarding and drop points. Passenger page: what's still missing, or the booking summary to confirm. Payment page: the total, the hold time and the "Pay here" link. Nothing is stored. |
| rank_pasted_resultsA | Rank buses from a results page the user copied and pasted (redBus or MakeMyTrip). For apps that can't open the user's browser (ChatGPT, Gemini): the user opens plan_bus_trip's link, copies the whole page and pastes it. Returns the same ranked table as rank_buses. |
| searchA | Search route-master's knowledge: bus routes (booking links), the pay-safely checklist and government (RTC) operators. Returns JSON {"results": [{"id", "title", "url"}]}; open one with fetch. Standard search tool for ChatGPT connectors and deep research. |
| fetchA | Open one search result by id. Returns JSON {"id", "title", "text", "url", "metadata"}. Standard fetch tool for ChatGPT connectors and deep research. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| find_bus | Search, rank and explain buses for a trip. |
| book_bus | Book a chosen bus on the official site up to the payment page; you pay yourself. |
| check_scam | Check a link, phone number, SMS or WhatsApp message about a bus booking or refund. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| how-it-works | The booking flow (which tool when) and the safety rules. |
| safety-checklist | What to check before paying for a bus ticket in India, and where to report fraud. |
| supported-sites | Which pages read_page and page_action handle on redBus and MakeMyTrip. |
| capture-script | JavaScript that reads the open booking page into JSON for read_page. |
| government-operators | State transport operators known to route-master, with only verified websites. |
| booking-platforms | Booking sites route-master treats as official, with their domains. |
TDQS
Scored across 12 tools
The tools map to mostly distinct workflow stages: knowledge lookup, trip planning, ranking, trust/scam checks, seat explanation, booking guidance, page reading and final payment verification. The closest pairs are booking_steps vs page_action and explain_seat_map vs read_page, but their descriptions make the intended roles separable.
All names use snake_case and most are verb_noun (plan_bus_trip, check_operator, rank_buses, read_page), giving a predictable pattern. A few are noun phrases (booking_summary, booking_steps, page_action), which is a minor deviation rather than a confusing mix.
12 tools is well within the ideal 3-15 range for a multi-step bus planning and booking assistant. Each tool corresponds to a distinct stage of the workflow, so the count is well-scoped rather than inflated.
The surface covers planning, ranking, operator and scam checks, seat advice, booking steps, page interpretation, and pre-payment verification. Minor gaps remain: browser-reading/action tools explicitly support only redBus and MakeMyTrip, and post-booking operations are absent, but the core lifecycle is covered.