SG

salamentic/google-flights-mcp

API development

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

22 stars 13 forks Качество 53 Тренд 0

Сервер Model Context Protocol, который создает планы полетов на уровне турагента с использованием API быстрых рейсов.

Обзор

Сервер Model Context Protocol, который создает планы полетов на уровне турагента с использованием API быстрых рейсов. - Поиск рейсов в одну сторону и в оба конца - Создание комплексных планов поездок на основе параметров поездки - Получить информацию о коде аэропорта - Используйте шаблоны для общих запросов на поездки 1 Убедитесь, что у вас установлен Python 3.10 или выше 2. Установите необходимые пакеты: 1.Установить Claude Desktop 2.Создать или отредактировать файл конфигурации Claude Desktop: - macOS: ~/Library/Application Support/Claude/claude desktop config.json - Windows: %APPDATA%\Claude\claude desktop config.json - Windows: %APPDATA%\Claude\claude desktop config.json 3. Добавить конфигурацию сервера планировщика полета: 4. Заменить /PATH/TO/ фактическим путем к файлу 5 сервера. Скачать Claude Desktop Для тестирования и разработки можно использовать MCP Inspector: - search one way flights: Search for one-way flights between airports - search round trip flights: Search for round-trip flights between airports - create travel plan: Generate a comprehensive travel plan

Обзор (машинный перевод)

Сервер Model Context Protocol, который создает планы полетов на уровне турагента с использованием API быстрых рейсов.

Особенности

  • Поиск рейсов в одну сторону и в оба конца Создание комплексных планов поездок на основе параметров поездки Получить информацию о коде аэропорта Используйте шаблоны для общих запросов на поездки

##Установка

  1. Убедитесь, что установлен Python 3.10 или выше 2.Установить необходимые пакеты:

Использование

Запуск сервера

Вы можете запустить сервер напрямую:

Интеграция с Claude Desktop

1 Установить Claude Desktop 2. Создайте или отредактируйте конфигурационный файл Claude Desktop:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
  1. Добавить конфигурацию сервера планировщика полета:

  2. Заменить /PATH/TO/ фактическим путем к файлу сервера 5 Перезагрузка Claude Desktop

Использование MCP-инспектора

Для тестирования и разработки можно использовать MCP Inspector:

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

  • [[Т3]]: Поиск односторонних рейсов между аэропортами
  • [[Т4]]: Поиск рейсов туда и обратно между аэропортами
  • [[Т5]]: Создайте комплексный план путешествий

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Flight Planner MCP Server

A Model Context Protocol server that creates travel agent-level flight plans using the fast-flights API.

Features

  • Search for one-way and round-trip flights
  • Create comprehensive travel plans based on trip parameters
  • Get airport code information
  • Use templates for common travel queries

Installation

  1. Make sure you have Python 3.10 or higher installed
  2. Install the required packages:
pip install mcp fast-flights

Usage

Running the Server

You can run the server directly:

python flight_planner_server.py

Integrating with Claude Desktop

  1. Install Claude Desktop

  2. Create or edit your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the flight-planner server configuration:

{
  "mcpServers": {
    "flight-planner": {
      "command": "python",
      "args": [
        "/PATH/TO/flight_planner_server.py"
      ],
      "env": {
        "PYTHONPATH": "/PATH/TO/PROJECT"
      }
    }
  }
}
  1. Replace /PATH/TO/ with the actual path to your server file
  2. Restart Claude Desktop

Using the MCP Inspector

For testing and development, you can use the MCP Inspector:

# Install the inspector
npm install -g @modelcontextprotocol/inspector

# Run the inspector with your server
npx @modelcontextprotocol/inspector python flight_planner_server.py

Available Tools

  • search_one_way_flights: Search for one-way flights between airports
  • search_round_trip_flights: Search for round-trip flights between airports
  • create_travel_plan: Generate a comprehensive travel plan

Available Resources

  • airport_codes://{query}: Get airport code information based on a search query

Available Prompts

  • flight_search_prompt: Template for searching flights
  • travel_plan_prompt: Template for creating a comprehensive travel plan

Example Queries for Claude

Once integrated with Claude Desktop, you can ask things like:

  • “What flights are available from NYC to SFO on 2025-04-15?”
  • “Can you create a travel plan for my business trip from LAX to TPE from 2025-05-01 to 2025-05-08?”
  • “Help me find airport codes for Tokyo.”
  • “What’s the best time to book flights from Boston to London for a summer vacation?”

License

MIT

Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector python flight_planner_server.py
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "flight-planner": { "command": "python", "args": [ "/PATH/TO/flight_planner_server.py" ], "env": { "PYTHONPATH": "/PATH/TO/PROJECT" } } } }