redbus-mcp
Click on "Install 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-mcpbuses 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-emtrafesa
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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables querying Renfe train schedules, checking prices, and finding stations across Spain using official GTFS data.Last updated33MIT
- Alicense-qualityCmaintenanceEnables AI assistants to access Emtrafesa bus transportation services in Peru, including querying terminals, schedules, tickets, and FAQs.Last updated398MIT
- Alicense-qualityDmaintenanceEnables searching Turkish high-speed train (YHT) tickets via TCDD API. Supports real-time availability, station name resolution, date formatting, and passenger count.Last updatedMIT
- AlicenseAqualityCmaintenanceConnects MCP-compatible AI agents to Peru's official statistics platform (INEI Estadist), providing access to Census 2017 data, population indicators, and geographic profiles for all Peruvian departments, provinces, and districts without requiring an API key.Last updated9MIT
Related MCP Connectors
Peru CPE invoices for AI agents - issue, query, void facturas/boletas via SUNAT (2 backends).
Peru payments for AI agents — Yape / PagoEfectivo via Mercado Pago. Never holds funds.
Read-only MCP server for Muovi, Argentina's trust-first local services marketplace (6 tools).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulxcz/redbus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server