Get the FREE Ultimate OpenClaw Setup Guide →

mcp-flight-search

MCP Server implementation for the Model Context Protocol (MCP) enabling AI tool usage - Realtime Flight Search

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio arjunprabhulal-mcp-flight-search python main.py --connection_type http \
  --env SERP_API_KEY="your-api-key-here"

How to use

This MCP server provides flight search capabilities as MCP tools that can be invoked by compatible AI agents. The server exposes tools such as search_flights_tool for querying flight options between origin and destination airports, supporting outbound dates and optional return dates, and server_status for checking whether the MCP server is running. To use these tools, run the server locally and interact with it through an MCP-enabled client or agent, which will call the defined tool descriptions, pass the required parameters, and receive structured results with flight options and metadata. The tooling is designed to integrate with SerpAPI-powered data sources for flight information and is organized to support one-way and round-trip searches with clear parameter validation.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Pip available in your environment

Installation steps:

  1. Install the package from PyPI (recommended): pip install mcp-flight-search

  2. Or install from the project directory (development mode): pip install -e .

  3. Obtain and set an API key for SerpAPI (required for flight data):

    • Sign up for SerpAPI and get your API key.
    • Set it as an environment variable (example for Unix-like shells): export SERP_API_KEY="your-api-key-here"
  4. Run the server (examples):

    Using the CLI entry point

    mcp-flight-search --connection_type http

    Or run directly via Python (from project root):

    python main.py --connection_type http

  5. Access or test tools via your MCP client by invoking:

    • search_flights_tool with parameters origin, destination, outbound_date, and optional return_date
    • server_status to verify the server is running

Additional notes

Tips and common notes:

  • Ensure SERP_API_KEY is set in the environment before starting the server since flight data calls require authentication.
  • The search_flights_tool supports common flight query parameters like origin, destination, outbound_date (YYYY-MM-DD), and optional return_date for round trips.
  • If you modify configuration or environment, restart the server to apply changes.
  • The server logs are structured to help diagnose issues; enable verbose logging if needed via environment or configuration (see project documentation).
  • If you encounter port conflicts, you can override the port using an explicit --port argument in the CLI (e.g., --port 5000).
  • This MCP server uses a Python-based implementation with a CLI entry point and a main.py runner; ensure you’re in a compatible Python environment when starting the server.

Related MCP Servers

Sponsor this space

Reach thousands of developers