Token导航 LogoToken导航TokenDH.com
Flightaware MCP logo
AI代理stdio官方级别未说明来源级核验

Flightaware MCP

MCP Server

flightaware-mcp

FlightAware MCP Server是一个桥接服务器,连接MCP客户端与FlightAware的AeroAPI,提供实时航空数据服务,适用于航班跟踪、机场运营监控和飞机信息查询等场景。

工具数

5

提示词数

0

GitHub Stars

1

资源数

0
JavaScriptAI代理工作流自动化

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

imonroe

提供方

imonroe

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx flightaware-mcp --port 8080 --aeroapi-key YOUR_API_KEY

详细介绍

FlightAware MCP服务器

一个桥接服务器,将模型上下文协议(MCP)客户端连接到FlightAware的AeroAPI,以获取实时航空数据。

特性

  • 航班信息:获取特定航班的实时信息
  • 机场运营:在机场跟踪到达和离开的航班
  • 飞机详细信息:按机尾号检索飞机信息
  • 机场搜索:按地区、国家或自定义查询查找机场
  • 详细跟踪:获取全面的航班运行详情
  • 灵活的协议支持:适用于TCP和WebSocket连接
  • 易于配置:通过环境变量或命令行进行简单设置

MCP工具

此服务器通过MCP接口提供以下工具:

getFlightByIdent

使用特定航班的标识符获取有关该航班的信息。

{
  "id": "req123",
  "method": "getFlightByIdent",
  "params": {
    "ident": "AAL100"
  }
}

getFlightsForAirport

列出抵达或离开特定机场的航班。

{
  "id": "req124",
  "method": "getFlightsForAirport",
  "params": {
    "airport_code": "KJFK",
    "arrivals": true,
    "departures": true,
    "type": "all"
  }
}

getAircraftByTail

通过机尾号获取特定飞机的信息。

{
  "id": "req125",
  "method": "getAircraftByTail",
  "params": {
    "tail": "N12345"
  }
}

getAirportsByRegion

按国家、地区或自定义查询搜索机场。

{
  "id": "req126",
  "method": "getAirportsByRegion",
  "params": {
    "country": "US",
    "region": "CA",
    "query": "international"
  }
}

getFlightDetails

获取特定航班的详细信息。

{
  "id": "req127",
  "method": "getFlightDetails",
  "params": {
    "ident": "AAL100"
  }
}

配置

AeroAPI密钥

您需要一个FlightAware AeroAPI密钥才能使用此服务器。

安装

使用NPX(无需安装)

直接使用npx运行:

npx flightaware-mcp --port 8080 --aeroapi-key YOUR_API_KEY

全球安装

全局安装并从任何地方运行:

npm install -g flightaware-mcp
flightaware-mcp --port 8080 --aeroapi-key YOUR_API_KEY

本地安装

在项目中本地安装:

npm install flightaware-mcp

然后添加到您的 package.json 脚本:

"scripts": {
  "start-mcp": "flightaware-mcp --port 8080"
}

命令行选项

Usage: flightaware-mcp [options]

Options:
  -V, --version               output the version number
  -p, --port          Port to listen on (default: "8080")
  -k, --aeroapi-key   FlightAware AeroAPI key
  -m, --mode          Server mode (tcp or ws) (default: "tcp")
  -t, --timeout       Request timeout in milliseconds (default: "30000")
  -d, --debug                 Enable debug mode with verbose logging
  -h, --help                  display help for command

Notes:
  - If you experience timeout errors (MCP error -32001), try increasing the timeout value.
  - Debug mode will provide detailed logs about requests and timeouts.
  - For n8n integrations, set a higher timeout value (60000 or more) if needed.

环境变量

您可以使用环境变量而不是命令行参数:

AEROAPI_KEY=your_api_key
MCP_SERVER_PORT=8080
MCP_SERVER_MODE=tcp  # or ws for WebSocket
MCP_REQUEST_TIMEOUT=60000  # timeout in milliseconds, increase if experiencing timeouts
DEBUG=true  # enable debug mode with verbose logging
LOG_LEVEL=info  # log level (error, warn, info, debug)

使用示例

MCP客户端配置

对于支持服务器配置的MCP客户端,您可以使用以下配置:

{
  "mcpServers": {
    "flightaware": {
      "command": "npx",
      "args": [
        "-y",
        "flightaware-mcp"
      ],
      "env": {
        "AEROAPI_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

MCP客户端代码示例

const net = require('net');

const client = new net.Socket();
client.connect(8080, '127.0.0.1', () => {
  console.log('Connected to MCP server');
  
  // Request flight information
  const request = {
    id: 'req1',
    method: 'getFlightByIdent',
    params: {
      ident: 'UAL123'
    }
  };
  
  client.write(JSON.stringify(request) + '\n');
});

client.on('data', (data) => {
  const response = JSON.parse(data.toString().trim());
  console.log('Received response:', response);
  client.end();
});

client.on('close', () => {
  console.log('Connection closed');
});

使用包含的客户端进行测试

此软件包包括一个测试客户端,便于测试:

# First, start the server
npm start

# In another terminal, run the test client
npm run client

发展

从源头构建

# Clone the repository
git clone 
cd flightaware-mcp

# Install dependencies
npm install

# Start development server
npm start

运行测试

npm test

代码检查

npm run lint

故障排除

超时错误

如果您遇到超时错误(MCP error -32001: Request timed out),尝试以下解决方案:

  1. 增加超时值:
   # With command line
   flightaware-mcp --timeout 60000

   # With environment variables
   MCP_REQUEST_TIMEOUT=60000 flightaware-mcp
  1. 启用调试模式以获取更多信息:
   flightaware-mcp --debug
  1. 检查您的网络连接:

- 确保您的服务器有稳定的互联网接入 - 检查是否有任何防火墙规则阻止出站请求

  1. 对于n8n集成:

- 设置更高的超时值(60000毫秒或更长) - 确保MCP服务器和n8n能够正常通信 - 尝试TCP和WebSocket模式(--mode ws--mode tcp)

  1. 检查AeroAPI速率限制:

- FlightAware AeroAPI根据您的订阅设置了费率限制 - 启用调试模式以查看详细的API响应信息

许可证

麻省理工学院

目录标签

目录标签

JavaScriptAI代理工作流自动化航空数据本地部署实时跟踪机场运营飞机信息MCP协议

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

flightaware-mcp

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP