Skip to main content
Glama

Búsqueda de vuelos MCP

Un servicio de búsqueda de vuelos desarrollado con el Protocolo de Contexto de Modelo (MCP). Este servicio demuestra cómo implementar herramientas MCP para la búsqueda de vuelos.

¿Qué es el Protocolo de Contexto Modelo?

El Protocolo de Contexto de Modelo (MCP) es un estándar desarrollado por Anthropic que permite a los modelos de IA usar herramientas mediante la definición de un formato estructurado para sus descripciones, llamadas y respuestas. Este proyecto implementa herramientas MCP que pueden ser utilizadas por Claude y otros modelos compatibles con MCP.

Related MCP server: Google-Flights-MCP-Server

Instalación

# Install from PyPI
pip install mcp-flight-search

# Or install from the project directory (development mode)
pip install -e .

Uso

Inicie el servidor MCP:

# Using the command-line entry point
mcp-flight-search --connection_type http

# Or run directly
python main.py --connection_type http

También puede especificar un puerto personalizado:

python main.py --connection_type http --port 5000

Variables de entorno

Establezca la clave SerpAPI como una variable de entorno:

export SERP_API_KEY="your-api-key-here"

Características

  • Herramientas compatibles con MCP para la función de búsqueda de vuelos

  • Integración con SerpAPI Google Flights

  • Soporte para vuelos de ida y vuelta

  • Registro enriquecido con salida estructurada

  • Estructura de código modular y mantenible

Herramientas MCP

Este paquete proporciona las siguientes herramientas de Protocolo de Contexto de Modelo:

  • search_flights_tool : Busca vuelos entre aeropuertos con los siguientes parámetros:

    • origin : Código del aeropuerto de salida (p. ej., ATL, JFK)

    • destination : Código del aeropuerto de llegada (por ejemplo, LAX, ORD)

    • outbound_date : Fecha de salida (AAAA-MM-DD)

    • return_date : Fecha de regreso opcional para viajes de ida y vuelta (AAAA-MM-DD)

  • server_status : Comprueba si el servidor MCP se está ejecutando

Estructura del proyecto

mcp-flight-search/
├── mcp_flight_search/
│   ├── __init__.py              # Package initialization and exports
│   ├── config.py                # Configuration variables (API keys)
│   ├── models/
│   │   ├── __init__.py          # Models package init
│   │   └── schemas.py           # Pydantic models (FlightInfo)
│   ├── services/
│   │   ├── __init__.py          # Services package init
│   │   ├── search_service.py    # Main flight search logic
│   │   └── serpapi_client.py    # SerpAPI client wrapper
│   ├── utils/
│   │   ├── __init__.py          # Utils package init
│   │   └── logging.py           # Logging configuration
│   └── server.py                # MCP server setup and tool registration
├── main.py                      # Main entry point
├── pyproject.toml               # Python packaging configuration
├── LICENSE                      # MIT License
└── README.md                    # Project documentation

Autor

Para más artículos sobre IA/ML e IA generativa, sígueme en Medium: https://medium.com/@arjun-prabhulal

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

Available Tools

2 tools
search_flights_toolSearch flightsA
Read-only

Search Google Flights for one-way or round-trip flights between two airports.

Inputs: origin (required), destination (required), outbound_date (required), return_date. Returns: result

server_statusServer statusA
Read-only

Check that the flight search server is running.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools serve entirely distinct purposes: one performs a flight search, the other reports server health. There is no plausible way to confuse them, and the descriptions make the boundary explicit.

    Naming Consistency3/5

    Both names are snake_case, but the convention is inconsistent: 'search_flights_tool' uses a redundant '_tool' suffix and a verb_verb_noun shape, while 'server_status' is a plain noun phrase. Readable, but the pattern isn't predictable.

    Tool Count3/5

    Two tools is thin for a flight search server; the health-check tool arguably doesn't earn a slot as a first-class tool. It's a borderline-surface rather than an extreme mismatch.

    Completeness3/5

    Flight search is covered, but obvious adjacent operations are absent: airport/location lookup, date-range or fare-calendar search, multi-city itineraries, and filtering/sorting of results. An agent can do the core task but will hit dead ends on common follow-ups.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that connects to Amadeus API, enabling AI assistants to search flights, analyze prices, find best travel deals, and plan multi-city trips.
      18 npm
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables flight searching, booking, and payment processing. It also provides access to resources like user profiles, pricing rules, and company travel policies.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An interactive travel planning server that integrates flight searching, weather forecasting, and route calculation through external APIs like Amadeus and OpenWeather. It uses the Model Context Protocol to enable AI assistants to autonomously manage travel logistics and discover local services.
      -