航空气象 MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,为飞行计划提供航空气象信息。它连接到航空气象 API 以获取 METAR、TAF、PIREP 和其他数据。
免责声明
请勿使用此工具进行飞行计划或飞行中决策。
重要免责声明:本航空天气 MCP 服务器提供的天气数据源自aviationweather.gov,仅供参考。本工具提供的信息绝不能作为飞行计划或飞行中决策的唯一依据。
天气数据可能不完整、延迟或不准确。此外,解释这些数据的大型语言模型可能会误解或错误地表达关键信息。在任何飞行前,请务必咨询官方航空气象来源,并从授权提供商处获取适当的天气简报。
此工具未经美国联邦航空管理局 (FAA) 批准,不可替代经认证的气象服务,仅供参考。开发者对基于此工具提供的信息做出的决策不承担任何责任。
始终通过官方渠道核实关键天气信息。
特征
- 从官方航空天气 API Swagger 定义自动生成的类型安全 API 客户端
- 用于气象数据的 MCP 工具:
get-metar
:获取当前天气观测数据get-taf
:获取终端机场预报get-pireps
:获取机场附近的飞行员报告get-route-weather
:获取两座机场之间航线的综合天气信息
设置
先决条件
- Node.js 18 或更高版本
- npm 或 yarn
- curl(用于获取 Swagger YAML)
安装
- 克隆此存储库:
- 安装依赖项:
- 构建服务器(这将获取最新的 Swagger 定义、生成 API 客户端并编译 TypeScript):
- 启动服务器:
与 Claude for Desktop 一起使用
要将此服务器与 Claude for Desktop 一起使用:
- 编辑 Claude for Desktop 配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- 将服务器添加到配置中:
- 重启 Claude 桌面版
示例查询
与 Claude 建立联系后,您可以提出以下问题:
- “KJFK 现在的天气怎么样?”
- “KORD 有可用的 TAF 吗?”
- 我计划明天从 KBOS 飞往 KPHL。天气怎么样?”
- “KDEN 附近有 PIREP 吗?”
发展
项目结构
src/index.ts
:主服务器代码packages/aviation-weath-api
:为 Aviation Weather .gov 自动生成 API 客户端
构建航空气象客户端
构建过程遵循以下步骤:
npm run aviation-weather-api:clean
:删除现有客户端npm run aviation-weather-api:fetch
:从 Aviationweather.gov 获取最新的 Swagger 定义npm run aviation-weather-api:generate
:根据 Swagger 定义生成类型化的 TypeScript 客户端
构建并运行应用程序
npm run build
:构建 JavaScript 客户端npm run start
:运行 MCP 服务器
添加更多工具
要向服务器添加新工具,请遵循以下模式:
工作原理
- 服务器从aviationweather.gov获取最新的Swagger定义
- OpenAPI 生成器根据此定义创建一个类型安全的客户端
- 服务器使用此客户端以正确的类型进行 API 调用
- 错误处理和响应格式确保流畅的体验
执照
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
通过模型上下文协议服务器提供航空天气信息,仅允许访问 METAR、TAF、PIREP 和航线天气数据以供参考。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that retrieves current weather information for specified cities using the Open-Meteo API, requiring no API key.Last updated -4PythonApache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides real-time flight tracking and status information using the AviationStack API.Last updated -302JavaScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that provides comprehensive weather data querying capabilities based on the Caiyun Weather API, supporting real-time weather, forecasts, and alerts with multi-language support.Last updated -72TypeScript
- -security-license-qualityA collection of lightweight servers that expose weather and financial capabilities through the Model Context Protocol, allowing users to access weather alerts, forecasts, and financial market data with technical analysis.Last updated -1Python