Skip to main content

Add your description here

Project description

Add to Cursor Add to VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

✈️ Flights MCP Server

A Model Context Protocol (MCP) server that provides flight search capabilities using the Aviasales Flight Search API. This server allows you to search for flights, filter results, get detailed flight information, and generate booking links.

https://github.com/user-attachments/assets/87d79d54-c4ab-4938-9792-18572315f1ba

How to use

You can either use the remote MCP server or deploy your own instance:

  • Remote MCP
    A public instance is available at:
    https://findflights.me/sse
    This server uses the SSE transport protocol and is ready to use without setup.

    ⚠️ Important: Currently not all LLM clients support remote MCP connections. For example, Claude.ai supports remote MCP integrations only on Pro+ plans.

  • Self-Hosted Deployment
    If you prefer to run your own server, follow the instructions in the Installation section.

    Note: To deploy your own server, you must obtain an Aviasales API Key and Marker ID.

Features

  • Flight Search: Search for one-way, round-trip, and multi-city flights
  • Advanced Filtering: Filter results by price, duration, airlines, departure/arrival times, and number of stops
  • Multiple Sorting Options: Sort by price, departure time, arrival time, or duration
  • Detailed Flight Information: Get comprehensive flight details including baggage allowances and airline information
  • Booking Links: Generate booking links for selected flights
  • Local Storage: Performed searches are stored locally so LLM can access past searches without waiting
  • Multiple MCP Transport Options: Supports stdio, HTTP, and SSE transports

Installation

Prerequisites

  • Aviasales API key
  • Python 3.12 or higher
  • UV package manager

Setup

  1. Clone the repository:
git clone <repository-url>
cd flights-mcp
  1. Set up environment variables (see Environment Variables section)

  2. Run the server

uv run src/flights-mcp/main.py

The server binds to 0.0.0.0, making it accessible on all network interfaces of the host machine.

Environment Variables

The following environment variables are required:

  • FLIGHTS_AVIASALES_API_TOKEN (required): Your Aviasales API token

  • FLIGHTS_AVIASALES_MARKER (required): Your Aviasales marker ID

  • FLIGHTS_TRANSPORT (optional): Transport protocol to use

    • Options: stdio (default), streamable_http, sse
  • FLIGHTS_HTTP_PORT (optional): Port for HTTP/SSE transport

    • Only used when FLIGHTS_TRANSPORT is streamable_http or sse
    • Default: 4200
  • FLIGHTS_HTTP_PATH (optional): URI path for the endpoint

    • Only used when FLIGHTS_TRANSPORT is streamable_http or sse
    • Default: /mcp

MCP Tools

The server provides the following MCP tools:

Tool Description
search_flights Searches for flights using the Aviasales Flight Search API. Returns search description with search_id and summary of found options.
get_flight_options Retrieves, filters, and sorts flight options from a previous search. Returns a paginated list of filtered flight options.
get_flight_option_details Returns detailed flight information including segments, pricing, baggage allowances, and agency terms.
request_booking_link Generates a booking link for a specific flight option.

Typical Usage Pattern

  1. Search for flights using search_flights() - Call multiple times for flexible dates
  2. Filter and browse options using get_flight_options() - Lightweight tool, call multiple times with different filters and sorting option
  3. Get detailed information using get_flight_option_details() - For user's preferred options
  4. Generate booking link using request_booking_link() - Only when user confirms booking intent

Support

For issues related to:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flights_mcp_fastmcp-0.1.1.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flights_mcp_fastmcp-0.1.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file flights_mcp_fastmcp-0.1.1.tar.gz.

File metadata

  • Download URL: flights_mcp_fastmcp-0.1.1.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for flights_mcp_fastmcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f42a9392271453b00f839734dc21e015220375f68d18fabe298bb1fb9a8bdabe
MD5 5be0ea8e07954bf4cb85eb97231fb488
BLAKE2b-256 b55e15c484907b266c2af8b5f8f05b837bfe06fc2e85c818793b8440c6b923b8

See more details on using hashes here.

File details

Details for the file flights_mcp_fastmcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flights_mcp_fastmcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1eda02463b1acfd098fe45cc59feaeda005d1cf11ef59533fb4727a660a312a5
MD5 23ba716d0454fe7aacd813172e8a9f41
BLAKE2b-256 e486617a1f94bf18a3783f18e70b4608a88ca823b6cdf2fa6466912bddbcbc1e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page