Sponsored by Deepsite.site

FlightAware MCP Server

Created By
imonroe7 months ago
An MCP server to access the flightaware api
Content

FlightAware MCP Server

A bridge server connecting Model Context Protocol (MCP) clients to FlightAware's AeroAPI for real-time aviation data.

Features

  • Flight Information: Get real-time information about specific flights
  • Airport Operations: Track arriving and departing flights at airports
  • Aircraft Details: Retrieve aircraft information by tail number
  • Airport Search: Find airports by region, country, or custom query
  • Detailed Tracking: Get comprehensive flight operation details
  • Flexible Protocol Support: Works with both TCP and WebSocket connections
  • Easy Configuration: Simple setup via environment variables or command line

MCP Tools

This server provides the following tools via the MCP interface:

getFlightByIdent

Get information about a specific flight using its identifier.

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

getFlightsForAirport

List flights arriving at or departing from a specific airport.

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

getAircraftByTail

Get information about a specific aircraft by its tail number.

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

getAirportsByRegion

Search for airports by country, region, or custom query.

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

getFlightDetails

Get detailed information about a specific flight.

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

Configuration

AeroAPI Key

You'll need a FlightAware AeroAPI key to use this server.

Installation

Using NPX (No installation required)

Run directly with npx:

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

Global Installation

Install globally and run from anywhere:

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

Local Installation

Install locally in your project:

npm install flightaware-mcp

Then add to your package.json scripts:

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

Command Line Options

Usage: flightaware-mcp [options]

Options:
  -V, --version               output the version number
  -p, --port <number>         Port to listen on (default: "8080")
  -k, --aeroapi-key <string>  FlightAware AeroAPI key
  -m, --mode <string>         Server mode (tcp or ws) (default: "tcp")
  -t, --timeout <number>      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.

Environment Variables

You can use environment variables instead of command line arguments:

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)

Usage Examples

MCP Client Configuration

For MCP clients that support server configuration, you can use this configuration:

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

Sample MCP Client Code

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');
});

Testing with Included Client

This package includes a test client for easy testing:

# First, start the server
npm start

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

Development

Building from Source

# Clone the repository
git clone <repository-url>
cd flightaware-mcp

# Install dependencies
npm install

# Start development server
npm start

Running Tests

npm test

Linting

npm run lint

Troubleshooting

Timeout Errors

If you're experiencing timeout errors (MCP error -32001: Request timed out), try these solutions:

  1. Increase the timeout value:

    # With command line
    flightaware-mcp --timeout 60000
    
    # With environment variables
    MCP_REQUEST_TIMEOUT=60000 flightaware-mcp
    
  2. Enable debug mode to get more information:

    flightaware-mcp --debug
    
  3. Check your network connectivity:

    • Ensure your server has stable internet access
    • Check if there are any firewall rules blocking outbound requests
  4. For n8n integration:

    • Set a higher timeout value (60000ms or more)
    • Make sure the MCP server and n8n can communicate properly
    • Try both TCP and WebSocket modes (--mode ws or --mode tcp)
  5. Check AeroAPI rate limits:

    • FlightAware AeroAPI has rate limits based on your subscription
    • Enable debug mode to see detailed API response information

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
DeepChatYour AI Partner on Desktop
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.