Aviation Weather MCP Server
航空气象 MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,为飞行计划提供航空气象信息。它连接到航空气象 API 以获取 METAR、TAF、PIREP 和其他数据。
免责声明
请勿使用此工具进行飞行计划或飞行中决策。
重要免责声明:本航空天气 MCP 服务器提供的天气数据源自aviationweather.gov,仅供参考。本工具提供的信息绝不能作为飞行计划或飞行中决策的唯一依据。
天气数据可能不完整、延迟或不准确。此外,解释这些数据的大型语言模型可能会误解或错误地表达关键信息。在任何飞行前,请务必咨询官方航空气象来源,并从授权提供商处获取适当的天气简报。
此工具未经美国联邦航空管理局 (FAA) 批准,不可替代经认证的气象服务,仅供参考。开发者对基于此工具提供的信息做出的决策不承担任何责任。
始终通过官方渠道核实关键天气信息。
Related MCP server: mcp-metar
特征
从官方航空天气 API Swagger 定义自动生成的类型安全 API 客户端
用于气象数据的 MCP 工具:
get-metar:获取当前天气观测数据get-taf:获取终端机场预报get-pireps:获取机场附近的飞行员报告get-route-weather:获取两座机场之间航线的综合天气信息
设置
先决条件
Node.js 18 或更高版本
npm 或 yarn
curl(用于获取 Swagger YAML)
安装
克隆此存储库:
git clone https://github.com/yourusername/aviation-weather-mcp-server.git cd aviation-weather-mcp-server安装依赖项:
npm install构建服务器(这将获取最新的 Swagger 定义、生成 API 客户端并编译 TypeScript):
npm run build启动服务器:
npm start
与 Claude for Desktop 一起使用
要将此服务器与 Claude for Desktop 一起使用:
编辑 Claude for Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
将服务器添加到配置中:
{ "mcpServers": { "aviation-weather": { "command": "node", "args": [ "/absolute/path/to/aviation-weather-mcp-server/build/index.js" ] } } }重启 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 服务器
添加更多工具
要向服务器添加新工具,请遵循以下模式:
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
};
}
}
);工作原理
服务器从aviationweather.gov获取最新的Swagger定义
OpenAPI 生成器根据此定义创建一个类型安全的客户端
服务器使用此客户端以正确的类型进行 API 调用
错误处理和响应格式确保流畅的体验
执照
麻省理工学院
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Aviation Weather MCP — METAR, TAF, PIREPs, AIRMET/SIGMET, station info
NOAA and ECMWF weather forecast MCP for discovery, validation, and GribStream OAuth queries.
Fetch METARs, TAFs, PIREPs, and domestic SIGMETs from the NWS Aviation Weather Center.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables processing and handling of weather-related data requests through the Model Context Protocol, providing meteorological information via a configured MCP server.-
- AlicenseNot gradedqualityCmaintenanceMCP server for fetching METAR and TAF aviation weather data for airports by ICAO code.MIT
- AlicenseNot gradedqualityDmaintenanceEnables to interact with comprehensive weather data through the MCP protocol, including current conditions, multi-day forecasts, hourly forecasts, and geocoding.12 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server providing real-time aviation weather data (METAR, TAF, PIREPs, AIRMETs) from aviationweather.gov for flight planning and analysis.9 npmMIT