modellers/mcp-duffel-travels
If you are the rightful owner of mcp-duffel-travels and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
MCP Server for Flight traveling and booking using Duffel API
MCP Duffel Travels
A Model Context Protocol (MCP) server that provides flight search and booking capabilities using the Duffel API.
Features
This MCP server implements the complete flight booking workflow with the following tools:
- flight_offer_request - Search for flight offers based on origin, destination, dates, and passengers
- flight_offers - Get detailed information about a specific flight offer
- flight_booking_validate_or_price_offer - Validate an offer and confirm current pricing
- flight_booking_list_services_and_seatmaps - View available services and seat maps
- flight_booking_create_order - Create a booking order with passenger details
- flight_booking_pay_for_order - Process payment for a held order
- flight_booking_get_order_status - Retrieve order status and e-tickets
Prerequisites
- Node.js 18 or higher
- A Duffel API key (get one at https://duffel.com)
Installation
npm install
npm run build
Configuration
Set your Duffel API key as an environment variable:
export DUFFEL_API_KEY=your_duffel_api_key_here
Usage
Running the Server
node build/index.js
Using with Claude Desktop
Add the following to your Claude Desktop configuration file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"duffel-travels": {
"command": "node",
"args": ["/absolute/path/to/mcp-duffel-travels/build/index.js"],
"env": {
"DUFFEL_API_KEY": "your_duffel_api_key_here"
}
}
}
}
Flight Booking Workflow
The typical flight booking flow follows these steps:
1. Search for Flights
Use flight_offer_request to search for available flights:
{
"origin": "JFK",
"destination": "LAX",
"departure_date": "2024-12-20",
"return_date": "2024-12-27",
"passengers": [
{ "type": "adult" }
],
"cabin_class": "economy"
}
2. Get Offer Details
Use flight_offers to get detailed information about a specific offer:
{
"offer_id": "off_123abc..."
}
3. Validate Offer
Use flight_booking_validate_or_price_offer to confirm the current price:
{
"offer_id": "off_123abc..."
}
4. View Services and Seats (Optional)
Use flight_booking_list_services_and_seatmaps to see available add-ons:
{
"offer_id": "off_123abc..."
}
5. Create Order
Use flight_booking_create_order to reserve the flight:
{
"offer_id": "off_123abc...",
"passengers": [
{
"id": "pas_0000...",
"given_name": "John",
"family_name": "Doe",
"born_on": "1990-01-01",
"email": "john.doe@example.com",
"phone_number": "+1234567890"
}
]
}
6. Pay for Order (if needed)
Use flight_booking_pay_for_order if the order is on hold:
{
"order_id": "ord_123abc...",
"payment": {
"type": "balance",
"amount": "100.00",
"currency": "USD"
}
}
7. Check Order Status
Use flight_booking_get_order_status to retrieve tickets and confirmation:
{
"order_id": "ord_123abc..."
}
Development
Build
npm run build
Watch Mode
npm run watch
API Documentation
For detailed information about the Duffel API, visit:
License
MIT