Skip to main content
Glama
ravinahp

Find Flights MCP Server

by ravinahp

Buscar vuelos Servidor MCP Opción #1

insignia de herrería Servidor MCP para buscar y recuperar información de vuelos mediante la API de Duffel.

Cómo funciona

Vuelo

Related MCP server: Flight + Stay Search MCP

Demostración en vídeo

https://github.com/user-attachments/assets/c111aa4c-9559-4d74-a2f6-60e322c273d4

Por qué esto es útil

Aunque herramientas como Google Flights funcionan de maravilla para viajes sencillos, esta herramienta destaca al gestionar planes de viaje complejos. Aquí te explicamos por qué:

  • Memoria contextual : Claude recuerda todas tus búsquedas de vuelos anteriores en el chat, por lo que no necesitas mantener varias pestañas abiertas para comparar precios

  • Búsqueda de fecha flexible : Busque fácilmente en varios días para encontrar los mejores precios sin tener que verificar manualmente cada fecha.

  • Itinerarios complejos : perfectos para viajes de varias ciudades, vuelos con una sola escala o cuando necesitas comparar diferentes opciones de ruta, ¡simplemente puedes preguntar!

  • Conversación natural : simplemente describe lo que estás buscando: ya no tendrás que hacer clic en interfaces de calendario ni hacer malabarismos con parámetros de búsqueda para analizar nombres de ciudades, fechas y horas.

Piense en ello como si tuviera un agente de viajes en su chat que recuerda todo lo que han discutido y puede buscar instantáneamente fechas y rutas.

Características

  • Buscar vuelos entre múltiples destinos

  • Soporte para consultas de vuelos de ida, de ida y vuelta y de varias ciudades

  • Información detallada de la oferta de vuelos

  • Parámetros de búsqueda flexibles (horarios de salida, clase de cabina, número de pasajeros)

  • Gestión automática de conexiones de vuelos

  • Busque vuelos con varios días de antelación para encontrar el mejor vuelo para su viaje (más lento)

Prerrequisitos

  • Python 3.x

  • Clave activa de la API de Duffel

Cómo obtener su clave API de Duffel

Duffel requiere verificación de cuenta y configuración de información de pago, pero este servidor MCP solo usa la API para buscar vuelos: no se realizarán reservas ni cargos reales a su cuenta.

Prueba primero duffel_test para comprobar la eficacia de esta herramienta. Si te convence, puedes seguir el proceso de verificación a continuación para usar la clave activa.

Modo de prueba primero (recomendado)

Puede comenzar con una clave API de prueba ( duffel_test ) para probar la funcionalidad con datos simulados antes de pasar por el proceso de verificación completo:

  1. Visita la página de registro de Duffel

  2. Crea una cuenta (puedes seleccionar "Uso personal" para el nombre de la empresa)

  3. Vaya a Más > Desarrollador para encontrar su clave API de prueba (ya se proporciona una)

Obtener una clave API en vivo

Para acceder a datos de vuelo reales, siga estos pasos:

  1. En el panel de Duffel, desactive el "Modo de prueba" en la esquina superior izquierda.

  2. El proceso de verificación requiere varios pasos: deberá desactivar el modo de prueba repetidamente:

    • Primer cambio: Verifique su dirección de correo electrónico

    • Alternar de nuevo: Información completa de la empresa (uso personal está bien)

    • Alternar nuevamente: Agregar información de pago (requerida por Duffel pero este servidor MCP NO REALIZARÁ CARGOS)

    • Alternar nuevamente: Complete los pasos de verificación restantes

    • Último interruptor: Acceda al modo en vivo después de hacer clic en "Aceptar y enviar".

  3. Una vez que esté completamente verificado, vaya a Más > Desarrollador > Crear token en vivo

  4. Copia tu clave API en vivo

💡 CONSEJO: Cada vez que completes un paso de verificación, tendrás que desactivar el modo de prueba para continuar con el siguiente. Sigue desactivándolo hasta que hayas completado todos los requisitos.

⚠️ NOTAS IMPORTANTES:

  • Su información de pago es manejada directamente por Duffel y no es accedida ni almacenada por el servidor de MCP.

  • Este servidor MCP es de SOLO LECTURA: solo puede buscar vuelos, no reservarlos.

  • No se realizarán cargos a su método de pago a través de esta integración.

  • Toda la información confidencial (incluidas las claves API) permanece local en su máquina

  • Puede comenzar con la clave API de prueba ( duffel_test ) para evaluar la funcionalidad

  • El proceso de verificación puede tardar algún tiempo: este es un requisito estándar de Duffel

Nota de seguridad

Este servidor MCP solo utiliza los puntos de búsqueda de Duffel y no puede realizar reservas ni cargos. Su información de pago es únicamente para el proceso de verificación de Duffel y nunca se accede ni se comparte con el servidor MCP.

Nota sobre los límites de uso de la API

  • Consulte los precios actuales y los límites de uso de Duffel

  • Diferentes niveles disponibles según sus necesidades.

  • Se recomienda revisar los precios actuales en su sitio web.

Instalación

Instalación mediante herrería

Para instalar Find Flights para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @ravinahp/travel-mcp --client claude

Instalación manual

Clonar el repositorio:

git clone https://github.com/ravinahp/flights-mcp
cd flights-mcp

Instalar dependencias usando uv:

uv sync

Nota: Usamos uv en lugar de pip ya que el proyecto usa pyproject.toml para la gestión de dependencias.

Configurar como servidor MCP

Para agregar esta herramienta como servidor MCP, modifique el archivo de configuración del escritorio Claude.

Ubicaciones de los archivos de configuración:

  • MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

  • Ventanas: %APPDATA%/Claude/claude_desktop_config.json

Agregue la siguiente configuración a su archivo JSON:

{
    "flights-mcp": {
        "command": "uv",
        "args": [
            "--directory",
            "/Users/YOUR_USERNAME/Code/flights-mcp",
            "run",
            "flights-mcp"
        ],
        "env": {
            "DUFFEL_API_KEY_LIVE": "your_duffel_live_api_key_here"
        }
    }
}

⚠️ IMPORTANTE:

  • Reemplace YOUR_USERNAME con su nombre de usuario actual del sistema

  • Reemplace your_duffel_live_api_key_here con su clave API de Duffel Live real

  • Asegúrese de que la ruta del directorio coincida con su instalación local

Despliegue

Edificio

Prepare el paquete:

# Sync dependencies and update lockfile
uv sync

# Build package
uv build

Esto creará distribuciones en el directorio dist/ .

Depuración

Para obtener la mejor experiencia de depuración, utilice el Inspector MCP:

npx @modelcontextprotocol/inspector uv --directory /path/to/find-flights-mcp run find-flights-mcp

El Inspector proporciona:

  • Monitoreo de solicitudes y respuestas en tiempo real

  • Validación de entrada/salida

  • Seguimiento de errores

  • Métricas de rendimiento

Herramientas disponibles

1. Buscar vuelos

@mcp.tool()
async def search_flights(params: FlightSearch) -> str:
    """Search for flights based on parameters."""

Admite tres tipos de vuelos:

  • Vuelos de ida

  • Vuelos de ida y vuelta

  • Vuelos multiciudad

Los parámetros incluyen:

  • type : Tipo de vuelo ('solo ida', 'ida y vuelta', 'varias ciudades')

  • origin : Código del aeropuerto de origen

  • destination : Código del aeropuerto de destino

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

  • Parámetros opcionales:

    • return_date : Fecha de regreso para viajes de ida y vuelta

    • adults : Número de pasajeros adultos

    • cabin_class : Clase de cabina preferida

    • departure_time : rango de hora de salida específico

    • arrival_time : Rango de tiempo de llegada específico

    • max_connections : Número máximo de conexiones

2. Obtener detalles de la oferta

@mcp.tool()
async def get_offer_details(params: OfferDetails) -> str:
    """Get detailed information about a specific flight offer."""

Recupera detalles completos de una oferta de vuelo específica utilizando su identificación única.

3. Buscar vuelos multiciudad

@mcp.tool(name="search_multi_city")
async def search_multi_city(params: MultiCityRequest) -> str:
    """Search for multi-city flights."""

Herramienta especializada para itinerarios de vuelos complejos entre múltiples ciudades.

Los parámetros incluyen:

  • segments : Lista de segmentos de vuelo

  • adults : Número de pasajeros adultos

  • cabin_class : Clase de cabina preferida

  • max_connections : Número máximo de conexiones

Casos de uso

Algunos ejemplos (¡Pruébelo usted mismo!)

Puede utilizar estas herramientas para encontrar vuelos con distintas complejidades:

  • Encuentra un vuelo de ida de San Francisco a Nueva York el 7 de enero para dos adultos en clase ejecutiva.

  • Busco un vuelo de ida y vuelta de Los Ángeles a Londres, con salida el 8 de enero y regreso el 15 de enero.

  • Planifique un viaje a varias ciudades: de Nueva York a París el 7 de enero, luego a Roma el 10 de enero y de regreso a Nueva York el 15 de enero.

  • "¿Cuál es el vuelo más barato de SFO a LAX del 7 al 15 de enero para 2 adultos en clase económica?"

  • Incluso puedes buscar vuelos con varios días de antelación para encontrar el mejor vuelo para tu viaje. Por ahora, se recomienda buscar solo vuelos de ida o de ida y vuelta de esta manera. Ejemplo: "Encuentra el vuelo más barato de SFO a LAX del 7 al 10 de enero para 2 adultos en clase económica".

Formato de respuesta

Las herramientas devuelven respuestas en formato JSON con:

  • Detalles de la oferta de vuelo

  • Información de precios

  • Detalles de la ruta

  • Información del transportista

  • Detalles de la conexión

Manejo de errores

El servicio incluye un manejo robusto de errores para:

  • Errores en las solicitudes de API

  • Códigos de aeropuerto no válidos

  • Claves API faltantes o no válidas

  • Tiempos de espera de la red

  • Parámetros de búsqueda no válidos

Contribuyendo

[Añadir pautas para la contribución, si corresponde]

Licencia

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

Notas de rendimiento

  • Las búsquedas están limitadas a 50 ofertas para vuelos de ida o de ida y vuelta.

  • Las búsquedas multiciudad están limitadas a 10 ofertas

  • El tiempo de espera del proveedor se establece entre 15 y 30 segundos según el tipo de búsqueda.

Clases de cabina

Clases de cabina disponibles:

  • economy : Clase económica estándar

  • premium_economy : Clase económica premium

  • business : Clase ejecutiva

  • first : Primera clase

Ejemplo de solicitud con clase de cabina:

{
  "params": {
    "type": "one_way",
    "adults": 1,
    "origin": "SFO",
    "destination": "LAX",
    "departure_date": "2025-01-12",
    "cabin_class": "business"  // Specify desired cabin class
  }
}

Available Tools

3 tools
get_offer_detailsB

Get detailed information about a specific flight offer.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it's a read operation ('Get'), implying it's non-destructive, but doesn't disclose behavioral traits like authentication requirements, rate limits, error handling, or what 'detailed information' entails beyond the input schema. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which likely defines the return structure), the description doesn't need to explain return values. However, with no annotations, 0% schema description coverage, and one parameter, the description is minimal. It covers the basic purpose but lacks usage guidelines and behavioral details, making it incomplete for optimal agent use despite the output schema's support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'a specific flight offer', which aligns with the 'offer_id' parameter in the input schema. However, schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds minimal semantics by implying the parameter identifies an offer, but doesn't explain format, source, or constraints, offering only basic compensation for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'detailed information about a specific flight offer', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_flights' or 'search_multi_city', which appear to be search operations rather than detail retrieval for a specific offer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing an offer ID from a previous search, or clarify that it's for retrieving details of a single, pre-identified offer rather than searching for new ones.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_flightsD

Search for flights based on parameters.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1.9/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but provides none. It doesn't indicate whether this is a read-only operation, whether it requires authentication, what rate limits might apply, what format results are returned in, or any other behavioral characteristics. For a search tool that likely interacts with external APIs, this lack of transparency is a significant gap that leaves the agent guessing about important operational aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is maximally concise at just 6 words. While this conciseness comes at the expense of completeness, every word earns its place - 'Search' indicates the action, 'for flights' specifies the resource, and 'based on parameters' acknowledges the input requirements. There's no wasted verbiage or redundant phrasing, making it efficiently front-loaded despite its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of flight search (11 parameters with nested objects, multiple flight types, and sibling tools), the description is woefully incomplete. While the presence of an output schema means the description doesn't need to explain return values, it fails to provide context about the tool's scope, limitations, or relationship to other tools. With no annotations and minimal description, the agent lacks crucial information needed to use this tool effectively in context with 'search_multi_city' and 'get_offer_details'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description states 'based on parameters' but provides zero information about what those parameters are or their semantics. With schema description coverage at 0% (the schema has descriptions but they're not counted in coverage), the description fails to compensate by explaining any of the 11 parameters documented in the schema. The agent must rely entirely on the schema to understand parameters like 'type', 'origin', 'destination', 'departure_date', etc., with no high-level guidance from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for flights based on parameters' is tautological - it essentially restates the tool name 'search_flights' with minimal elaboration. While it indicates the general action (search) and resource (flights), it lacks specificity about what kind of search this performs or how it differs from sibling tools like 'search_multi_city'. The description doesn't provide meaningful differentiation from what the name already conveys.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides absolutely no guidance about when to use this tool versus alternatives. With sibling tools like 'search_multi_city' and 'get_offer_details' available, the agent receives no indication whether this is the primary search tool, whether it's for simple searches while 'search_multi_city' handles complex itineraries, or any prerequisites or constraints. The description offers zero contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_multi_cityC

Search for multi-city flights.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'search' but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, rate limits, pagination, error handling, or what the search returns (e.g., flight options, prices). For a complex search tool with no annotations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with a single sentence ('Search for multi-city flights.'). It's front-loaded and wastes no words, though this conciseness comes at the cost of completeness. Every word earns its place by stating the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multi-city flight search with 1 parameter containing nested objects), no annotations, and an output schema (which reduces need to describe returns), the description is incomplete. It lacks context on usage, behavior, and doesn't leverage the output schema to clarify purpose. For a search tool with rich schema but no annotations, more guidance is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the input schema has detailed descriptions for all parameters (e.g., 'Flight segments', 'Departure date (YYYY-MM-DD)'). The description adds no parameter information beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting, though the description doesn't compensate for the 0% coverage with any additional context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for multi-city flights' states the basic action (search) and resource (multi-city flights), but it's vague about scope and doesn't distinguish from sibling 'search_flights'. It doesn't specify what 'search' entails (e.g., finding available flights, prices, routes) or how multi-city differs from other flight types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus 'search_flights' or 'get_offer_details'. The description implies usage for multi-city flights but doesn't specify prerequisites, constraints (e.g., minimum segments), or alternatives. Without explicit when/when-not instructions, the agent lacks context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv1.0.0
    • First observedget_offer_details
    • First observedsearch_flights
    • First observedsearch_multi_city

TDQS

C2.8/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: get_offer_details retrieves details for a specific offer, search_flights handles standard flight searches, and search_multi_city handles multi-city itineraries. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case: get_offer_details, search_flights, and search_multi_city. The naming is predictable and readable throughout.

Tool Count3/5

With only 3 tools, the set feels thin for a flight search domain. While the core search functions are covered, typical operations like booking, managing reservations, or checking availability are missing, making the scope borderline minimal.

Completeness2/5

The toolset is significantly incomplete for flight operations. It lacks essential actions such as booking flights, canceling reservations, checking seat availability, or managing user profiles, which are critical for a functional flight service. Agents will face dead ends in common workflows.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers