logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

duffel-travel-orchestrator-ts

A robust TypeScript micro-service orchestrator interfacing with the Duffel API, designed for comprehensive air travel itinerary planning (outbound, return, and itinerary segments) and associated lodging reservations. It supports granular retrieval of fare proposals, selection of seating class, definition of passenger complements, and application of temporal constraints. Furthermore, it incorporates functionality for sourcing accommodation bookings.

Author

duffel-travel-orchestrator-ts logo

clockworked247

No License

Quick Info

GitHub GitHub Stars 4
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

flightstsflightflights mcpclockworked247 flightsflights finding

Duffel Travel & Lodging Orchestrator (TypeScript)

This component is a TypeScript-based server implementation utilizing the Duffel API endpoints to query and manage airfare and accommodation bookings. It exposes interfaces for querying single-direction, round-trip, and complex multi-segment flight paths.

smithery badge

Core Capabilities

  • Execute searches for unidirectional, bilateral, and multi-leg air journeys
  • Retrieve exhaustive specifications for identified flight options
  • Configure booking parameters: seating tier, passenger quota, and connection logic
  • Apply filtering based on origin and destination time windows
  • Initiate inquiries for lodging reservations (accommodations/hotels)
  • Fetch validated user feedback pertaining to specific lodging establishments

Deployment Steps

  1. Install requisite packages: bash npm install

  2. Compile the source code: bash npm run build

  3. Initialize the service runtime: bash npm start

Configuration Directives

Establish a .env file containing:

DUFFEL_API_KEY=your_duffel_api_key

Testing can be initiated using the designated test key (duffel_test).

Integration via Smithery

To deploy this Orchestrator to the Smithery platform:

npx @smithery/cli publish

To execute the deployed Orchestrator:

npx @smithery/cli run @your-username/flights-mcp-ts --config "{\"duffelApiKey\":\"your_duffel_api_key\"}"

Exposed Service Primitives

This Orchestrator furnishes the following utilities:

  1. search_flights - Query for one-way, round-trip, or multi-city flight itineraries
  2. get_offer_details - Obtain comprehensive data for a selected flight offer identifier
  3. search_multi_city - A dedicated primitive for multi-segment air travel investigation
  4. search_stays - Initiate a query for travel lodging (hotels/accommodations)
  5. get_stay_reviews - Retrieve validated guest commentary associated with a lodging property

Illustrative Usage Scenarios

  • "Ascertain air travel options from SFO to NYC scheduled for May 15, 2025"
  • "Investigate a return journey from LAX to LHR, outbound June 10 and inbound June 20"
  • "Source business-class transportation for two occupants traveling from Tokyo to Paris"
  • "Request specifics for offer reference [offer_id]"
  • "Locate lodging in the metropolitan area of London for 2 patrons between 2025-06-10 and 2025-06-12"
  • "Fetch client feedback for lodging located at [hotel_id]"

Lodging Search and Review Retrieval

1. Lodging Search Primitive (search_stays)

Input Arguments: - location (text): Geographic designation (city, airport identifier, or locale) for the accommodation search - check_in_date (text): Initial occupancy date (Format: YYYY-MM-DD) - check_out_date (text): Final occupancy date (Format: YYYY-MM-DD) - guests (integer): Total number of occupants - rooms (integer, optional): Required partitioning of sleeping areas - radius_km (numeric, optional): Search boundary extent defined in kilometers

Sample Payload:

{
  "location": "London",
  "check_in_date": "2025-06-10",
  "check_out_date": "2025-06-12",
  "guests": 2
}

Sample Result:

{
  "offers": [
    {
      "offer_id": "off_123",
      "hotel_id": "acc_0000AWr2VsUNIF1Vl91xg0",
      "hotel_name": "The Grand Hotel",
      "address": "1 Main St, London",
      "price": { "amount": "350.00", "currency": "GBP" },
      "room_type": "Deluxe Suite",
      "cancellation_policy": "Free cancellation until 24h before check-in"
    }
  ]
}

Reference Note: Employ the retrieved hotel_id as the stay_id parameter when invoking the review retrieval primitive.


2. Lodging Review Retrieval Primitive (get_stay_reviews)

Input Arguments: - stay_id (text): The Duffel-assigned unique identifier for the lodging entity (sourced from search_stays output) - after (text, optional): Pagination marker for subsequent results - before (text, optional): Pagination marker for preceding results - limit (integer, optional): Maximum volume of feedback records to return (Range: 1 to 200)

Sample Payload:

{
  "stay_id": "acc_0000AWr2VsUNIF1Vl91xg0"
}

Sample Result:

{
  "meta": { "limit": 50, "after": "..." },
  "reviews": [
    {
      "text": "Excellent facilities. Polite staff.\nAir conditioning could use some maintenance.\n",
      "score": 8.4,
      "reviewer_name": "Bessie Coleman",
      "created_at": "2025-01-01"
    }
  ]
}

Local Iteration Environment

To facilitate development with instantaneous code reflection:

npm run dev

Licensing Information

Permitted under the MIT License.

WIKIPEDIA: Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO. It is commonly referred to as "the cloud".

== Defining Attributes == In 2011, the National Institute of Standards and Technology (NIST) enumerated five "essential characteristics" pertinent to cloud architectures. Presented below are the precise definitions as documented by NIST:

On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service. By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.

== Chronology ==

The genesis of cloud computing traces back to the 1960s, marked by the initial concepts surrounding time-sharing gaining traction through remote job entry (RJE). The prevailing operational model during this decade was the "data center" paradigm, wherein users delegated job execution to system operators running mainframes. This period fostered significant exploration and experimentation focused on democratizing access to substantial computational capacity via time-sharing, thereby maximizing the utilization of infrastructure, platforms, and applications, and boosting end-user efficacy. The designation of the "cloud" as a symbol for virtualized functionalities emerged in 1994, utilized by General Magic to denote the collective domain of "locations" accessible by mobile agents within the Telescript framework. This graphical representation is generally attributed to David Hoffman, a communications specialist at General Magic, drawing inspiration from its established convention within telecommunications and networking contexts. The term cloud computing gained broader visibility in 1996 when Compaq Computer Corporation drafted a strategic blueprint for prospective computing endeavors and the Internet. The firm's primary objective was to superch

See Also

`