ashmita123/MCP-Server
If you are the rightful owner of MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Duffle MCP Server is a Model Context Protocol server that integrates with the Duffel API to provide flight search and booking functionalities.
search_flights
Search for flight offers based on origin, destination, date, cabin class, and passenger count.
book_flight
Book a flight offer by providing offer ID and passenger details.
Duffle MCP Server
This project is a Model Context Protocol (MCP) server that provides flight search and booking capabilities via the Duffel API. It exposes two tools: search_flights
to find flight offers and book_flight
to book flights using those offers.
Setup
Install Dependencies
npm install
Build the Project
npm run build
Run the Server
node build/index.js
You should see the message: Duffel MCP ready — search_flights · book_flight
Usage
The server implements two tools: • search_flights: Search for flight offers based on origin, destination, date, cabin class, and passenger count. • book_flight: Book a flight offer by providing offer ID and passenger details.
Search Example
Run the search script with optional parameters: origin, destination, date
node test/call-search.js [ORIGIN] [DESTINATION] [DATE]
Example:
node test/call-search.js SFO LAX 2025-06-15
This script will save the top offer ID to /tmp/offer_id.txt for booking.
Book Example
Run the booking script with optional passenger info:
node test/call-booking.js [NAME] [PHONE] [BORN_ON]
Example:
node test/call-booking.js "Ashmita Pandey" "+442080160508" "1990-01-01"
This script reads the saved offer ID from /tmp/offer_id.txt and attempts to book the flight.
Test Scripts
• test/test-search.sh: Shell script to perform a flight search via FIFO pipes.
• test/test-book.sh: Shell script to book a flight using a saved offer ID.
Ensure that the MCP server is running before using these scripts.
Environment Variables
Set your Duffel API token in .env or environment variables:
DUFFEL_TOKEN=your_duffel_api_token_here
Author
•Ashmita Pandey
•GitHub: https://github.com/ashmita123
•LinkedIn: https://linkedin.com/in/ashmitapandey
License
MIT License