Skip to main content
Glama
finack

Aviation Weather MCP Server

航空气象 MCP 服务器

这是一个模型上下文协议 (MCP) 服务器,为飞行计划提供航空气象信息。它连接到航空气象 API 以获取 METAR、TAF、PIREP 和其他数据。

免责声明

请勿使用此工具进行飞行计划或飞行中决策。

重要免责声明:本航空天气 MCP 服务器提供的天气数据源自aviationweather.gov,仅供参考。本工具提供的信息绝不能作为飞行计划或飞行中决策的唯一依据。

天气数据可能不完整、延迟或不准确。此外,解释这些数据的大型语言模型可能会误解或错误地表达关键信息。在任何飞行前,请务必咨询官方航空气象来源,并从授权提供商处获取适当的天气简报。

此工具未经美国联邦航空管理局 (FAA) 批准,不可替代经认证的气象服务,仅供参考。开发者对基于此工具提供的信息做出的决策不承担任何责任。

始终通过官方渠道核实关键天气信息。

Related MCP server: Weather MCP Server

特征

  • 从官方航空天气 API Swagger 定义自动生成的类型安全 API 客户端

  • 用于气象数据的 MCP 工具

    • get-metar :获取当前天气观测数据

    • get-taf :获取终端机场预报

    • get-pireps :获取机场附近的飞行员报告

    • get-route-weather :获取两座机场之间航线的综合天气信息

设置

先决条件

  • Node.js 18 或更高版本

  • npm 或 yarn

  • curl(用于获取 Swagger YAML)

安装

  1. 克隆此存储库:

    git clone https://github.com/yourusername/aviation-weather-mcp-server.git cd aviation-weather-mcp-server
  2. 安装依赖项:

    npm install
  3. 构建服务器(这将获取最新的 Swagger 定义、生成 API 客户端并编译 TypeScript):

    npm run build
  4. 启动服务器:

    npm start

与 Claude for Desktop 一起使用

要将此服务器与 Claude for Desktop 一起使用:

  1. 编辑 Claude for Desktop 配置文件:

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

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

  2. 将服务器添加到配置中:

    { "mcpServers": { "aviation-weather": { "command": "node", "args": [ "/absolute/path/to/aviation-weather-mcp-server/build/index.js" ] } } }
  3. 重启 Claude 桌面版

示例查询

与 Claude 建立联系后,您可以提出以下问题:

  • “KJFK 现在的天气怎么样?”

  • “KORD 有可用的 TAF 吗?”

  • 我计划明天从 KBOS 飞往 KPHL。天气怎么样?”

  • “KDEN 附近有 PIREP 吗?”

发展

项目结构

  • src/index.ts :主服务器代码

  • packages/aviation-weath-api :为 Aviation Weather .gov 自动生成 API 客户端

构建航空气象客户端

构建过程遵循以下步骤:

  1. npm run aviation-weather-api:clean :删除现有客户端

  2. npm run aviation-weather-api:fetch :从 Aviationweather.gov 获取最新的 Swagger 定义

  3. npm run aviation-weather-api:generate :根据 Swagger 定义生成类型化的 TypeScript 客户端

构建并运行应用程序

  1. npm run build :构建 JavaScript 客户端

  2. npm run start :运行 MCP 服务器

添加更多工具

要向服务器添加新工具,请遵循以下模式:

server.tool( "tool-name", { // Zod schema for parameters param1: z.string().describe("Parameter description"), param2: z.number().optional().describe("Optional parameter") }, async ({ param1, param2 }) => { try { // Implementation return { content: [{ type: "text", text: "Response text" }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true }; } } );

工作原理

  1. 服务器从aviationweather.gov获取最新的Swagger定义

  2. OpenAPI 生成器根据此定义创建一个类型安全的客户端

  3. 服务器使用此客户端以正确的类型进行 API 调用

  4. 错误处理和响应格式确保流畅的体验

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/finack/aviation-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server