Skip to main content
Glama

📝 Resumen de arquitectura y notas del ingeniero: tanayshah.dev/projects/travel-mcp-server/ — por Tanay Shah, ingeniero de IA en NYC.

Servidor MCP de viajes

Un servidor MCP que brinda a los asistentes de IA acceso en tiempo real a datos de vuelos, hoteles y clima.

Por qué construí esto

Quería ver si podía hacer que Claude fuera realmente útil para la planificación de viajes: no solo para charlar sobre viajes, sino para buscar vuelos, comparar precios de hoteles y consultar pronósticos meteorológicos. El Protocolo de Contexto de Modelo (MCP) hace esto posible al permitir que los asistentes de IA llamen a herramientas externas.

La parte difícil no fue la integración con MCP, sino obtener datos de viaje fiables. Google Flights bloquea agresivamente a los scrapers, por lo que los vuelos recurren a datos de muestra. Booking.com es más permisivo, por lo que el scraping de hoteles realmente funciona. El clima utiliza la API gratuita de Open-Meteo, que simplemente funciona.

Related MCP server: ts-travel-mcp-server

Qué hace

Herramienta

Fuente de datos

Estado

get_latest_flight_data

Google Flights (vía fast-flights)

Reserva de datos de muestra

get_latest_hotel_data

Booking.com (scraper de Playwright)

Scraping en vivo

get_weather_on_dates

API de Open-Meteo

API en vivo

Inicio rápido

# Install
pip install -e .
playwright install chromium

# Start MongoDB
docker run -d --name mongodb -p 27017:27017 mongo:latest

# Test it
travel-mcp test weather --city Paris --start 2025-06-15
travel-mcp test hotels --city "New York"
travel-mcp test flights --from JFK --to LAX --date 2025-06-15

Uso con Claude Desktop

Añadir a ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "travel": {
      "command": "travel-mcp",
      "args": ["serve"]
    }
  }
}

Luego pregúntale a Claude cosas como:

  • "Búscame hoteles en Tokio por menos de $200/noche"

  • "¿Qué tiempo hará en París la próxima semana?"

  • "Busca vuelos de JFK a LAX"

Comandos CLI

travel-mcp serve              # Run MCP server
travel-mcp test flights ...   # Test flight search
travel-mcp test hotels ...    # Test hotel search
travel-mcp test weather ...   # Test weather search
travel-mcp cache stats        # View cache statistics
travel-mcp cache clear        # Clear cached data

Arquitectura

Claude Desktop
     ↓ (MCP protocol)
Travel MCP Server
     ↓
┌────────────┬─────────────┬──────────────┐
│  Flights   │   Hotels    │   Weather    │
│ fast-flights│ Playwright  │  Open-Meteo  │
└────────────┴─────────────┴──────────────┘
     ↓              ↓              ↓
         MongoDB (cache layer)

Stack tecnológico

  • Python 3.11+ con asyncio

  • MCP SDK para la integración con Claude

  • Playwright para la automatización del navegador

  • MongoDB para almacenamiento en caché con índices TTL

  • Typer para CLI

  • Loguru para registro de logs

Licencia

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A smart MCP gateway that routes AI agents to the right tools using hybrid search (vector + full-text) on MongoDB Atlas, collapsing the retrieval infrastructure into a single query.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A full-stack travel booking MCP server that enables AI clients to search flights, make reservations, cancel bookings, and manage persistent state across sessions.
    9
    15 npm
    5
    MIT
  • F
    license
    B
    quality
    B
    maintenance
    Unified MCP server exposing 12 DevOps tools across GitHub, PostgreSQL, Slack, and Google Calendar for AI agents, with rate limiting, input validation, and per-service scoped tokens.
    30
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for agentic travel recommendations, exposing tools to retrieve member profiles and personalized travel recommendations with partner-specific rules and policies.
    -