Sponsored by Deepsite.site

Flight + Stay Search MCP (TypeScript)

Created By
clockworked24710 months ago
A TypeScript implementation of a flight 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.
Content

Flight + Stay Search MCP (TypeScript)

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.

smithery badge

Features

  • Search for one-way, round-trip, and multi-city flights
  • Get detailed information about specific flight offers
  • Specify cabin class, number of passengers, and connection preferences
  • Filter by departure and arrival time windows
  • Search for travel stays (hotels/accommodations)
  • Get guest reviews for a specific stay/hotel

Setup

  1. Install dependencies:

    npm install
    
  2. Build the project:

    npm run build
    
  3. Start the server:

    npm start
    

Environment Variables

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.

Using with Smithery

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\"}"

Available Tools

This MCP provides the following tools:

  1. search_flights - Search for one-way, round-trip, or multi-city flights
  2. get_offer_details - Get detailed information about a specific flight offer
  3. search_multi_city - A specialized tool for multi-city flight searches
  4. search_stays - Search for travel stays (hotels/accommodations)
  5. get_stay_reviews - Get guest reviews for a specific stay/hotel

Example Queries

  • "Find flights from SFO to NYC on May 15, 2025"
  • "Search for a round-trip flight from LAX to LHR departing June 10 and returning June 20"
  • "Find business class flights from Tokyo to Paris for 2 adults"
  • "Get details for flight offer [offer_id]"
  • "Find hotels in London for 2 guests from 2025-06-10 to 2025-06-12"
  • "Get reviews for stay [hotel_id]"

Stays/Hotel Search and Reviews

1. Search for Stays (search_stays)

Parameters:

  • location (string): City, airport code, or area to search for stays
  • check_in_date (string): Check-in date (YYYY-MM-DD)
  • check_out_date (string): Check-out date (YYYY-MM-DD)
  • guests (number): Number of guests
  • rooms (number, optional): Number of rooms
  • radius_km (number, optional): Search radius in kilometers

Example 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.


2. Get Stay 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"
    }
  ]
}

Local Development

For development with automatic reloading:

npm run dev

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
WindsurfThe new purpose-built IDE to harness magic
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.