redbus-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@redbus-mcp buses de Lima a Arequipa el 15 de agosto"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
redbus-mcp
Servidor MCP (Model Context Protocol) para consultar pasajes de bus interprovinciales en Perú a través de redbus.pe. Permite que asistentes de IA compatibles con MCP (Cursor, VS Code, etc.) busquen buses en lenguaje natural: "buses de Lima a Arequipa el 20 de julio".
Alcance: solo consulta (lectura). No reserva ni realiza pagos.
Herramientas expuestas
Herramienta | Qué hace |
| Busca ciudades/terminales por nombre y devuelve su ID (ej. Lima = |
| Lista buses de una ruta y fecha: empresa, tipo, horarios, duración, precios, asientos disponibles, calificación, embarque/descenso y amenidades. Acepta nombres o IDs de ciudad. |
| Detalle de un servicio: mapa de asientos (número, tipo, precio, disponibilidad, piso) y puntos de embarque/descenso con horas y direcciones. |
Related MCP server: mcp-entur
Requisitos
Node.js ≥ 18 (probado en Node 22).
Instalación
npm install
npm run buildVerificación
Prueba end-to-end contra la API real de RedBus (sin capa MCP):
npm run smoke # usa una fecha 3 días en el futuro
npm run smoke 2026-08-05 # o una fecha concreta (ISO yyyy-MM-dd)Inspección interactiva del servidor MCP:
npm run inspector # abre el MCP InspectorUso en un cliente MCP
Registra el servidor en la configuración MCP de tu cliente (el formato mcpServers es común a
la mayoría). Ejemplo:
{
"mcpServers": {
"redbus-peru": {
"command": "node",
"args": ["C:\\Users\\paranda\\Documents\\Proyectos-personales\\redbus-mcp\\build\\index.js"]
}
}
}Reinicia el cliente y pregunta, por ejemplo: "¿Qué buses hay de Lima a Cusco el 2026-07-20? Ordénalos por precio."
En Cursor / VS Code la configuración es equivalente (mcp.json / settings del cliente),
apuntando command/args al mismo build/index.js.
Fechas
Entrada del usuario: ISO
yyyy-MM-dd(ej.2026-07-20).Internamente el cliente convierte al formato que exige cada endpoint de RedBus (
dd-MMM-yyyypara la búsqueda, ISO para el layout de asientos).La fecha debe ser hoy o futura; RedBus suele vender con pocas semanas de anticipación.
Cómo funciona (arquitectura)
RedBus expone una API interna en https://www.redbus.pe/rpw/api/. Un fetch plano es
rechazado (protección anti-bot), por lo que src/redbusClient.ts:
Envía headers realistas de Chrome (User-Agent, Referer,
Accept-Language: es-PE, etc.).Hace warm-up: visita la home para obtener cookies y las reenvía en cada llamada.
Reintenta con backoff y re-hace el warm-up si detecta bloqueo (403/429/reset).
Aplica un rate-limit suave entre peticiones.
Toda la lógica anti-bot está aislada en redbusClient.ts: si RedBus endurece la protección,
se puede migrar ese módulo a un navegador headless (Playwright) sin tocar las herramientas.
Estructura
src/
index.ts # arranque del servidor MCP (stdio) + registro de tools
redbusClient.ts # cliente HTTP: cookies, headers, warm-up, reintentos, endpoints
types.ts # tipos de las respuestas de RedBus
tools/ # buscar_ciudades, buscar_buses, detalle_servicio
lib/ # fechas, normalización de datos, catálogo de amenidadesAviso
Este proyecto consume una API interna no pública de RedBus con fines personales y educativos. Respeta sus términos de servicio y evita un uso intensivo (ya incluye un rate-limit suave). No está afiliado a RedBus.
Licencia
MIT
Available Tools
3 toolsbuscar_busesBuscar busesA
Busca buses interprovinciales en Perú (vía RedBus) para una ruta y fecha. Acepta nombres de ciudad o IDs para origen/destino. Devuelve empresa, tipo de bus, horarios, duración, precios, asientos disponibles, calificación, punto de embarque/descenso y las amenidades, además de routeId/operatorId para consultar el detalle con 'detalle_servicio'.
Inputs: fecha (required), origen (required), destino (required), limite, +1 more.
buscar_ciudadesBuscar ciudadesA
Busca ciudades/terminales de Perú en RedBus por nombre y devuelve su ID numérico. Necesario porque 'buscar_buses' funciona con IDs de ciudad. Devuelve también los terminales/áreas de cada ciudad.
Inputs: texto (required), limite.
detalle_servicioDetalle del servicio de busA
Devuelve el detalle de un servicio de bus concreto: mapa de asientos (número, tipo, precio, disponibilidad, piso) y puntos de embarque y descenso con horarios y direcciones. Requiere routeId, operatorId y los IDs de ciudad que entrega 'buscar_buses'.
Inputs: fecha (required), routeId (required), origenId (required), destinoId (required), +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: buscar_ciudades retrieves city IDs, buscar_buses searches for buses, and detalle_servicio gets detailed seat maps. No overlap or ambiguity.
All tools use Spanish and follow a verb_noun pattern except detalle_servicio which is noun_noun, creating a minor inconsistency. However, the naming is readable and descriptive.
Three tools cover the core data retrieval workflow (lookup city, search buses, get details) for a bus information service. The count is appropriate, though slightly minimal.
The tools support finding cities, searching buses, and obtaining seat details, but lack booking functionality and advanced filters. Coverage is adequate for basic search but incomplete for a full booking lifecycle.
Maintenance
Related MCP Connectors
Grounded, multilingual travel data + a cited travel concierge. 12+ languages, deep India coverage.
Omio MCP server for ChatGPT, Claude and any AI agent: search trips, find the cheapest day and start booking in your own Omio account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Omio yourself; Cotlet does not store your password and you need no Omio API key. About the official Omio API: Omio has no public API for your own account (checked 24 Oct 2026). Its affiliate programme lists a Search API for partners, and its app in ChatGPT searches trips; Your Bookings, saved travelers and checkout work only on omio.com and in the Omio app. Setup and FAQ: https://cotlet.dev/integrations/omio-api-mcp-server
Give AI assistants access to real-time data. Search the web, compare flights, find hotels, and more.
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to access Emtrafesa bus transportation services in Peru, including querying terminals, schedules, tickets, and FAQs.24 npm8MIT
- AlicenseNot gradedqualityBmaintenanceProvides access to Norway's nationwide public transport data (all modes) via the Entur API, enabling queries about routes, stops, and departures through natural language.156 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to search ClickBus places and trips, view booking history, and track bookings while keeping credentials local, with booking and cancellation actions blocked by default until explicitly enabled.1413 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables real-time Singapore bus arrival lookups, bus stop search, and nearby stop discovery through plain-language queries.MIT