Skip to main content
The MCP server can be customized using environment variables. All configuration is optional and has sensible defaults.

Environment variables

All configuration variables use the FLI_MCP_ prefix.

FLI_MCP_DEFAULT_PASSENGERS

FLI_MCP_DEFAULT_PASSENGERS
integer
default:"1"
Default number of adult passengers for searches. Must be at least 1.
FLI_MCP_DEFAULT_PASSENGERS=2

FLI_MCP_DEFAULT_CURRENCY

FLI_MCP_DEFAULT_CURRENCY
string
default:"USD"
Three-letter currency code returned with search results. Must be exactly 3 characters.
FLI_MCP_DEFAULT_CURRENCY=EUR

FLI_MCP_DEFAULT_CABIN_CLASS

FLI_MCP_DEFAULT_CABIN_CLASS
string
default:"ECONOMY"
Default cabin class when none is specified. Options:
  • ECONOMY
  • PREMIUM_ECONOMY
  • BUSINESS
  • FIRST
FLI_MCP_DEFAULT_CABIN_CLASS=BUSINESS

FLI_MCP_DEFAULT_SORT_BY

FLI_MCP_DEFAULT_SORT_BY
string
default:"CHEAPEST"
Default sorting strategy for flight results. Options:
  • CHEAPEST - Sort by lowest price
  • DURATION - Sort by shortest flight time
  • DEPARTURE_TIME - Sort by earliest departure
  • ARRIVAL_TIME - Sort by earliest arrival
FLI_MCP_DEFAULT_SORT_BY=DURATION

FLI_MCP_DEFAULT_DEPARTURE_WINDOW

FLI_MCP_DEFAULT_DEPARTURE_WINDOW
string
Default departure time window in ‘HH-HH’ 24-hour format. If not set, no time restriction is applied.
FLI_MCP_DEFAULT_DEPARTURE_WINDOW=6-20  # 6am to 8pm

FLI_MCP_MAX_RESULTS

FLI_MCP_MAX_RESULTS
integer
Maximum number of results returned by each tool. Must be greater than 0. If not set, all results are returned.
FLI_MCP_MAX_RESULTS=10

Configuration with Claude Desktop

Set environment variables in your Claude Desktop configuration file:
{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_CURRENCY": "EUR",
        "FLI_MCP_DEFAULT_CABIN_CLASS": "BUSINESS",
        "FLI_MCP_DEFAULT_SORT_BY": "DURATION",
        "FLI_MCP_DEFAULT_DEPARTURE_WINDOW": "8-22",
        "FLI_MCP_MAX_RESULTS": "10"
      }
    }
  }
}

Configuration file locations

macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json

Configuration examples

Configure for Euro currency and preferred departure times:
{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_CURRENCY": "EUR",
        "FLI_MCP_DEFAULT_DEPARTURE_WINDOW": "9-18"
      }
    }
  }
}
Configure for business class and minimal results:
{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_CABIN_CLASS": "BUSINESS",
        "FLI_MCP_DEFAULT_SORT_BY": "DEPARTURE_TIME",
        "FLI_MCP_MAX_RESULTS": "5"
      }
    }
  }
}
Configure for multiple passengers:
{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_PASSENGERS": "4",
        "FLI_MCP_DEFAULT_SORT_BY": "CHEAPEST"
      }
    }
  }
}
Focus on cheapest options with limited results:
{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_SORT_BY": "CHEAPEST",
        "FLI_MCP_MAX_RESULTS": "3"
      }
    }
  }
}

FlightSearchConfig class

The configuration is implemented using the FlightSearchConfig Pydantic settings class in fli/mcp/server.py:51. This class:
  • Automatically loads environment variables with the FLI_MCP_ prefix
  • Validates all configuration values
  • Provides type safety for configuration options
  • Exposes defaults through the MCP resource endpoint

Configuration schema

The server exposes its configuration schema through an MCP resource. AI assistants can query this resource to understand the current configuration:
{
  "defaults": {
    "default_passengers": 1,
    "default_currency": "USD",
    "default_cabin_class": "ECONOMY",
    "default_sort_by": "CHEAPEST",
    "default_departure_window": null,
    "max_results": null
  },
  "schema": {
    "properties": {
      "default_passengers": {
        "type": "integer",
        "minimum": 1,
        "description": "Default number of adult passengers to include in searches."
      },
      "default_currency": {
        "type": "string",
        "minLength": 3,
        "maxLength": 3,
        "description": "Three-letter currency code returned with search results."
      }
    }
  }
}

Applying configuration changes

After modifying environment variables:
  1. Save the configuration file
  2. Completely quit Claude Desktop (not just close the window)
  3. Restart Claude Desktop
  4. The new configuration will be loaded automatically

Validating configuration

You can verify your configuration by asking Claude:
What is your current Fli configuration?
Claude can access the configuration resource to show you the active settings.

Next steps

Tool reference

Learn about search parameters and options

Setup guide

Initial installation and configuration

Build docs developers (and LLMs) love