飞常准-Aviation

@variflight-ai/variflight-mcp
Hosted
71 Stars 3.7w 次浏览 variflight-ai 更新于 2026-08-23

VariFlight航班信息服务的模型上下文协议(MCP)服务器实现方案。该服务器提供了多种工具,支持查询航班信息、天气数据及航班舒适度指标。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "variflight": {
      "args": [
        "-y",
        "@variflight-ai/variflight-mcp"
      ],
      "command": "npx",
      "env": {
        "VARIFLIGHT_API_KEY": "your_api_key_here"
      }
    }
  }
}

该服务需要配置环境变量:VARIFLIGHT_API_KEY

可用工具 (8 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

searchFlightsByDepArr 5 个参数 需填 1 项

Search for flights between airports or cities by date. For cities with multiple airports, use depcity and arrcity parameters; otherwise use dep and arr parameters. Date must be in YYYY-MM-DD format. For today's date, use the getTodayDate tool. All airport/city codes must be valid IATA 3-letter codes (e.g.BJS for city of Beijing, PEK for Beijing Capital Airport).

必填参数:date

searchFlightsByNumber 4 个参数 需填 2 项

Search flights by flight number and date. Flight number should include airline code (e.g. MU2157, CZ3969). dep and arr are optional, keep empty if you don't know them. Date format: YYYY-MM-DD. IMPORTANT: For today's date, you MUST use getTodayDate tool instead of hardcoding any date. Airport codes (optional) should be IATA 3-letter codes.

必填参数:fnum、date

getFlightTransferInfo 3 个参数 需填 3 项

Get flight transfer info by departure city and arrival city and departure date. Date format: YYYY-MM-DD. IMPORTANT: For today's date, you MUST use getTodayDate tool instead of hardcoding any date. Airport codes should be IATA 3-letter codes.

必填参数:depdate、depcity、arrcity

flightHappinessIndex 4 个参数 需填 2 项

using this tool when you need information related to following topics: Detailed flight comparisons (punctuality, amenities, cabin specs),Health safety protocols for air travel,Baggage allowance verification,Environmental impact assessments,Aircraft configuration visualization,Comfort-focused trip planning (seat dimensions, entertainment, food). etc.

必填参数:fnum、date

getRealtimeLocationByAnum 1 个参数 需填 1 项

Get flight realtime location by aircraft number. aircraft number should be Aircraft registration numberlike B2021, B2022, B2023, etc. if aircraft number is unknown, you shuold try to request it using searchFlightsByNumber tool

必填参数:anum

getTodayDate 1 个参数

Get today's date in local timezone (YYYY-MM-DD format). Use this tool whenever you need today's date - NEVER hardcode dates.

该工具无需必填参数,直接调用即可

getFutureWeatherByAirport 1 个参数 需填 1 项

Get airport future weather for 3days (today、tomorrow、the day after tomorrow) by airport IATA 3-letter code. Airport codes should be IATA 3-letter codes (e.g. PEK for Beijing, SHA for Shanghai, CAN for Guangzhou, HFE for Hefei).

必填参数:airport

searchFlightItineraries 3 个参数 需填 3 项

Search for purchasable flight options and the lowest price using the departure city three-letter code, arrival city three-letter code, and departure date. (e.g. BJS for Beijing, SHA for Shanghai, CAN for Guangzhou, HFE for Hefei).

必填参数:depCityCode、depDate、arrCityCode

服务介绍

Variflight MCP 服务器

为 VariFlight 航班信息服务实现的模型上下文协议(MCP)服务器。该服务器提供了多种工具来查询航班信息、天气数据和飞行舒适度指标。

Variflight API 密钥

要使用 Variflight MCP 服务器,您需要拥有一个 Variflight API 密钥。您可以从这里获取它。

安装


{

    "mcpServers": {

        "variflight": {

            "command": "npx",

            "args": [

                "-y",

                "@variflight-ai/variflight-mcp"

            ],

            "env": {

                "VARIFLIGHT_API_KEY": "your_api_key_here"

            }

        }

    }

}

可用工具

1. 按出发地和目的地搜索航班

使用 IATA 代码搜索机场之间的航班:

searchFlightsByDepArr({
  dep: "PEK",  // Beijing
  arr: "SHA",  // Shanghai
  date: "2024-03-20"
})

2. 按航班号搜索航班

使用航班号搜索航班:

searchFlightsByNumber({
  fnum: "MU2157",
  date: "2024-03-20"
})

3. 获取航班中转信息

查找城市间的中转选项:

getFlightTransferInfo({
  depcity: "BJS",
  arrcity: "LAX",
  depdate: "2024-03-20"
})

4. 飞行幸福指数

获取详细的飞行舒适度指标:

flightHappinessIndex({
  fnum: "MU2157",
  date: "2024-03-20"
})

5. 实时飞机位置

使用注册号跟踪飞机位置:

getRealtimeLocationByAnum({
  anum: "B2021"
})

6. 机场天气预报

获取机场三天天气预报:

getFutureWeatherByAirport({
  airport: "PEK"
})

7. 搜索航班行程

搜索可购买的航班选项并获取最低价格:

searchFlightItineraries({
  depCityCode: "BJS",  // Beijing
  arrCityCode: "SHA",  // Shanghai
  depDate: "2025-04-20"
})

许可证

ISC 许可证 - 详情请参阅 LICENSE

作者

Variflight (https://mcp.variflight.com)

版本

当前版本:0.0.2

相关 MCP 服务