Логотип Flights MCP

Flights MCP

Сообщество
ravinahp

An MCP server to search for flights.

Издательravinahp
Репозиторийflights-mcp
ЯзыкPython
Форки
45
Звёзды
229
Доступные инструменты
0
Тип транспортаstdio
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Flights MCP предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 229, форки: 45 — в связанном репозитории.

Find Flights MCP Server

MCP server for searching and retrieving flight information using Duffel API.

How it Works

Flight

Video Demo

https://github.com/user-attachments/assets/c111aa4c-9559-4d74-a2f6-60e322c273d4

Why This is Helpful

While tools like Google Flights work great for simple trips, this tool shines when dealing with complex travel plans. Here's why:

  • Contextual Memory: Claude remembers all your previous flight searches in the chat, so you don't need to keep multiple tabs open to compare prices
  • Flexible Date Search: Easily search across multiple days to find the best prices without manually checking each date
  • Complex Itineraries: Perfect for multi-city trips, one-stop flights, or when you need to compare different route options you can just ask!
  • Natural Conversation: Just describe what you're looking for - no more clicking through calendar interfaces or juggling search parameters down to parsing city names, dates, and times.

Think of it as having a travel agent in your chat who remembers everything you've discussed and can instantly search across dates and routes.

Features

  • Search for flights between multiple destinations
  • Support for one-way, round-trip, and multi-city flight queries
  • Detailed flight offer information
  • Flexible search parameters (departure times, cabin class, number of passengers)
  • Automatic handling of flight connections
  • Search for flights within multiple days to find the best flight for your trip (slower)

Prerequisites

  • Python 3.x
  • Duffel API Live Key

Getting Your Duffel API Key

Duffel requires account verification and payment information setup, but this MCP server only uses the API for searching flights - no actual bookings or charges will be made to your account.

Try using duffel_test first to see the power of this tool. If you end up liking it, you can go through the verification process below to use the live key.

Test Mode First (Recommended)

You can start with a test API key (duffel_test) to try out the functionality with simulated data before going through the full verification process:

  1. Visit Duffel's registration page
  2. Create an account (you can select "Personal Use" for Company Name)
  3. Navigate to More > Developer to find your test API key (one is already provided)

Getting a Live API Key

To access real flight data, follow these steps:

  1. In the Duffel dashboard, toggle "Test Mode" off in the top left corner
  2. The verification process requires multiple steps - you'll need to toggle test mode off repeatedly:
    • First toggle: Verify your email address
    • Toggle again: Complete company information (Personal Use is fine)
    • Toggle again: Add payment information (required by Duffel but NO CHARGES will be made by this MCP server)
    • Toggle again: Complete any remaining verification steps
    • Final toggle: Access live mode after clicking "Agree and Submit"
  3. Once fully verified, go to More > Developer > Create Live Token
  4. Copy your live API key

💡 TIP: Each time you complete a verification step, you'll need to toggle test mode off again to proceed to the next step. Keep toggling until you've completed all requirements.

⚠️ IMPORTANT NOTES:

  • Your payment information is handled directly by Duffel and is not accessed or stored by the MCP server
  • This MCP server is READ-ONLY - it can only search for flights, not book them
  • No charges will be made to your payment method through this integration
  • All sensitive information (including API keys) stays local to your machine
  • You can start with the test API key (duffel_test) to evaluate the functionality
  • The verification process may take some time - this is a standard Duffel requirement

Security Note

This MCP server only uses Duffel's search endpoints and cannot make bookings or charges. Your payment information is solely for Duffel's verification process and is never accessed by or shared with the MCP server.

Note on API Usage Limits

  • Check Duffel's current pricing and usage limits
  • Different tiers available based on your requirements
  • Recommended to review current pricing on their website

Installation

Installing via Smithery

To install Find Flights for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @ravinahp/travel-mcp --client claude

Manual Installation

Clone the repository:

bash
git clone https://github.com/ravinahp/flights-mcp
cd flights-mcp

Install dependencies using uv:

bash
uv sync

Note: We use uv instead of pip since the project uses pyproject.toml for dependency management.

Configure as MCP Server

To add this tool as an MCP server, modify your Claude desktop configuration file.

Configuration file locations:

  • MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

Add the following configuration to your JSON file:

json
{
    "flights-mcp": {
        "command": "uv",
        "args": [
            "--directory",
            "/Users/YOUR_USERNAME/Code/flights-mcp",
            "run",
            "flights-mcp"
        ],
        "env": {
            "DUFFEL_API_KEY_LIVE": "your_duffel_live_api_key_here"
        }
    }
}

⚠️ IMPORTANT:

  • Replace YOUR_USERNAME with your actual system username
  • Replace your_duffel_live_api_key_here with your actual Duffel Live API key
  • Ensure the directory path matches your local installation

Deployment

Building

Prepare the package:

bash
# Sync dependencies and update lockfile
uv sync

# Build package
uv build

This will create distributions in the dist/ directory.

Debugging

For the best debugging experience, use the MCP Inspector:

bash
npx @modelcontextprotocol/inspector uv --directory /path/to/find-flights-mcp run flights-mcp

The Inspector provides:

  • Real-time request/response monitoring
  • Input/output validation
  • Error tracking
  • Performance metrics

Available Tools

1. Search Flights

python
@mcp.tool()
async def search_flights(params: FlightSearch) -> str:
    """Search for flights based on parameters."""

Supports three flight types:

  • One-way flights
  • Round-trip flights
  • Multi-city flights

Parameters include:

  • type: Flight type ('one_way', 'round_trip', 'multi_city')
  • origin: Origin airport code
  • destination: Destination airport code
  • departure_date: Departure date (YYYY-MM-DD)
  • Optional parameters:
    • return_date: Return date for round-trips
    • adults: Number of adult passengers
    • cabin_class: Preferred cabin class
    • departure_time: Specific departure time range
    • arrival_time: Specific arrival time range
    • max_connections: Maximum number of connections

2. Get Offer Details

python
@mcp.tool()
async def get_offer_details(params: OfferDetails) -> str:
    """Get detailed information about a specific flight offer."""

Retrieves comprehensive details for a specific flight offer using its unique ID.

3. Search Multi-City Flights

python
@mcp.tool(name="search_multi_city")
async def search_multi_city(params: MultiCityRequest) -> str:
    """Search for multi-city flights."""

Specialized tool for complex multi-city flight itineraries.

Parameters include:

  • segments: List of flight segments
  • adults: Number of adult passengers
  • cabin_class: Preferred cabin class
  • max_connections: Maximum number of connections

Use Cases

Some Example (But try it out yourself!)

You can use these tools to find flights with various complexities:

  • "Find a one-way flight from SFO to NYC on Jan 7 for 2 adults in business class"
  • "Search for a round-trip flight from LAX to London, departing Jan 8 and returning Jan 15"
  • "Plan a multi-city trip from New York to Paris on Jan 7, then to Rome on Jan 10, and back to New York on Jan 15"
  • "What is the cheapest flight from SFO to LAX from Jan 7 to Jan 15 for 2 adults in economy class?"
  • You can even search for flights within multiple days to find the best flight for your trip. Right now, the reccomendation is to only search for one-way or round-trip flights this way. Example: "Find the cheapest flight from SFO to LAX from Jan 7 to Jan 10 for 2 adults in economy class"

Response Format

The tools return JSON-formatted responses with:

  • Flight offer details
  • Pricing information
  • Slice (route) details
  • Carrier information
  • Connection details

Error Handling

The service includes robust error handling for:

  • API request failures
  • Invalid airport codes
  • Missing or invalid API keys
  • Network timeouts
  • Invalid search parameters

Contributing

[Add guidelines for contribution, if applicable]

License

This project is licensed under the MIT License - see the LICENSE file for details.

Performance Notes

  • Searches are limited to 50 offers for one-way/round-trip flights
  • Multi-city searches are limited to 10 offers
  • Supplier timeout is set to 15-30 seconds depending on the search type

Cabin Classes

Available cabin classes:

  • economy: Standard economy class
  • premium_economy: Premium economy class
  • business: Business class
  • first: First class

Example request with cabin class:

json
{
  "params": {
    "type": "one_way",
    "adults": 1,
    "origin": "SFO",
    "destination": "LAX",
    "departure_date": "2025-01-12",
    "cabin_class": "business"  // Specify desired cabin class
  }
}

Используйте MCP Flights MCP с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Flights MCP вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Flights MCP как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Flights MCP.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "flights-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Flights MCP, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Flights MCP.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Flights MCP?
Flights MCP
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Flights MCP.

Часто задаваемые вопросы

Для чего используется сервер MCP Flights MCP?

Flights MCP — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Flights MCP с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Flights MCP с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Flights MCP с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Flights MCP, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Flights MCP к TypingMind?

Flights MCP работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP Flights MCP в TypingMind?

Flights MCP предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Flights MCP?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Flights MCP требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇