Flight Search MCP server

Provides flight search capabilities using the Aviasales Flight Search API
Back to servers
Provider
maratsarbasov
Release date
Jun 03, 2025
Language
Go
Stats
1 star

The Flights MCP Server implements the Model Context Protocol to provide flight search capabilities through the Aviasales Flight Search API. It allows you to search for flights, filter results, get detailed information, and generate booking links with support for multiple transport protocols.

How to Use

You have two options for using the Flights MCP Server:

Remote MCP Server

A public instance is available at: https://findflights.me/sse

This server uses the SSE transport protocol and is ready to use without any 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

For those who prefer running their own server, follow the installation instructions below.

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

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 below)

  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

Available MCP Tools

The server provides the following MCP tools:

  • 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

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later