Skip to main content
Glama
salamentic

Flight Planner MCP Server

by salamentic

飞行计划 MCP 服务器

使用快速航班 API 创建旅行社级别航班计划的模型上下文协议服务器。

特征

  • 搜索单程和往返航班

  • 根据旅行参数制定全面的旅行计划

  • 获取机场代码信息

  • 使用模板进行常见的旅行查询

Related MCP server: fli

安装

  1. 确保安装了 Python 3.10 或更高版本

  2. 安装所需的软件包:

pip install mcp fast-flights

用法

运行服务器

您可以直接运行服务器:

python flight_planner_server.py

与 Claude Desktop 集成

  1. 安装Claude Desktop

  2. 创建或编辑您的 Claude Desktop 配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  3. 添加飞行计划服务器配置:

{
  "mcpServers": {
    "flight-planner": {
      "command": "python",
      "args": [
        "/PATH/TO/flight_planner_server.py"
      ],
      "env": {
        "PYTHONPATH": "/PATH/TO/PROJECT"
      }
    }
  }
}
  1. 将/PATH/TO/替换为服务器文件的实际路径

  2. 重启Claude桌面

使用 MCP 检查器

对于测试和开发,您可以使用 MCP Inspector:

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

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

可用工具

  • search_one_way_flights :搜索机场之间的单程航班

  • search_round_trip_flights :搜索机场之间的往返航班

  • create_travel_plan :生成全面的旅行计划

可用资源

  • airport_codes://{query} :根据搜索查询获取机场代码信息

可用提示

  • flight_search_prompt :航班搜索模板

  • travel_plan_prompt :用于创建全面旅行计划的模板

Claude 的示例查询

与 Claude Desktop 集成后,您可以询问以下问题:

  • “2025 年 4 月 15 日有哪些从 NYC 飞往 SFO 的航班?”

  • “您能为我从 2025 年 5 月 1 日至 2025 年 5 月 8 日从 LAX 到 TPE 的商务旅行制定旅行计划吗?”

  • “帮我找到东京机场的代码。”

  • “什么时候是预订从波士顿飞往伦敦的暑假航班的最佳时间?”

执照

麻省理工学院

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Integrates Google Flights data into AI workflows for natural language flight searches, price comparisons, flexible date searches, and multi-city itinerary planning with support for various cabin classes and passenger types.
    9
    7
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables flight search and fare calendar exploration by interacting with Google Flights' API, supporting detailed filters for origin, destination, dates, cabin class, airlines, and more.
    4,499 PyPI
    3,206
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables live flight search and pricing via the Duffel Flights API, allowing AI agents to query flight data and pricing.
    153 npm
    MIT