Scott D Brooks/flights-mcp-ts
Built by Metorial, the integration platform for agentic AI.
Scott D Brooks/flights-mcp-ts
Server Summary
Search for one-way flights
Search for round-trip flights
Search for multi-city flights
Retrieve detailed flight offers
Specify cabin class
Specify number of passengers
Set connection preferences
Filter flights by departure and arrival times
Search for hotels and accommodations
Retrieve guest reviews for hotels
A TypeScript implementation of a flight & Stay search MCP server that uses the Duffel API to search for flights. This MCP server provides tools to search for one-way, round-trip, and multi-city flights.
Install dependencies:
npm install
Build the project:
npm run build
Start the server:
npm start
Create a .env
file with:
DUFFEL_API_KEY=your_duffel_api_key
You can start with a test API key (duffel_test
) to try the functionality.
To publish this MCP to Smithery:
npx @smithery/cli publish
To run the published MCP:
npx @smithery/cli run @your-username/flights-mcp-ts --config "{\"duffelApiKey\":\"your_duffel_api_key\"}"
This MCP provides the following tools:
search_flights
- Search for one-way, round-trip, or multi-city flightsget_offer_details
- Get detailed information about a specific flight offersearch_multi_city
- A specialized tool for multi-city flight searchessearch_stays
- Search for travel stays (hotels/accommodations)get_stay_reviews
- Get guest reviews for a specific stay/hotelsearch_stays
)Parameters:
location
(string): City, airport code, or area to search for stayscheck_in_date
(string): Check-in date (YYYY-MM-DD)check_out_date
(string): Check-out date (YYYY-MM-DD)guests
(number): Number of guestsrooms
(number, optional): Number of roomsradius_km
(number, optional): Search radius in kilometersExample Request:
{
"location": "London",
"check_in_date": "2025-06-10",
"check_out_date": "2025-06-12",
"guests": 2
}
Example Response:
{
"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"
}
]
}
Note: Use the hotel_id
from the search results as the stay_id
for reviews.
get_stay_reviews
)Parameters:
stay_id
(string): The unique Duffel stay/hotel ID (from the search_stays result)after
(string, optional): Pagination cursor (after)before
(string, optional): Pagination cursor (before)limit
(number, optional): Max reviews to return (1-200)Example Request:
{
"stay_id": "acc_0000AWr2VsUNIF1Vl91xg0"
}
Example Response:
{
"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"
}
]
}
For development with automatic reloading:
npm run dev
MIT