# Flights MCP Server — live flights for AI agents (`lergassy/flights-mcp-server`) Actor

MCP server that gives an AI agent live flight data: search fares, compare Google Flights against KAYAK, find the cheapest dates for a route and the cheapest destinations from an airport. Works with Claude, Cursor, ChatGPT and any MCP client. $0.03 per tool call.

- **URL**: https://apify.com/lergassy/flights-mcp-server.md
- **Developed by:** [Matvey](https://apify.com/lergassy) (community)
- **Categories:** Travel, Agents
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $22.00 / 1,000 tool calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Flights MCP Server

Give your AI agent live flight data. This is an **MCP server**: connect it once in Claude, Cursor, ChatGPT or any MCP client, and the agent can search fares, compare two sources, find the cheapest dates and the cheapest destinations — on its own, mid-conversation.

**$0.03 per tool call. Nothing else — no run fee, no subscription, no fee for the rows behind the answer.**

### The four tools

| Tool | What the agent can finally answer |
|---|---|
| `search_flights` | "How much is DPS–SIN on 15 March, business class, nonstop?" — live fares with airline, flight numbers, times, stops and Google's low/typical/high verdict |
| `compare_flight_prices` | "Find me the cheapest" — the same search on **Google Flights and KAYAK**, with which source won and by how much |
| `cheapest_dates` | "When is it cheapest to fly there?" — lowest fare for every day over up to a year, cheapest days first |
| `cheap_destinations` | "Where can I go from Bali for under $200?" — destinations with price, airline, stops and dates |

### Connect it

**Claude Desktop / Claude Code / Cursor** — add to your MCP config:

```json
{
  "mcpServers": {
    "flights": {
      "url": "https://lergassy--flights-mcp-server.apify.actor/mcp",
      "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
    }
  }
}
```

**Any other MCP client** — endpoint `https://lergassy--flights-mcp-server.apify.actor/mcp`, transport streamable HTTP, auth a Bearer token (your Apify API token from Settings → Integrations).

That is the whole setup. There is no server to host, no key to rotate, nothing to start by hand — the server wakes on the first call and sleeps when the conversation ends.

### What it costs

**$0.03 per tool call.** A normal planning conversation makes three to six calls, so it lands around ten to twenty cents. There is no charge for how many flights come back: `compare_flight_prices` running two sources and returning sixty itineraries is the same $0.03 as a single-source lookup.

Failed calls are still calls — but a tool that cannot answer returns a short error to the agent instead of burning the conversation, and the underlying data has no separate bill.

### Why an MCP server and not an API

An agent with an API needs you to write the glue: build the request, parse the response, handle the retries. An agent with this server just has four tools with self-describing arguments, so it picks the right one and fills the fields itself. The difference shows up in prompts like *"we have a week in March and $400 — where should we go and when do we book?"*, which needs three of these tools in sequence and no code at all.

### Example prompts once connected

- *"Cheapest nonstop from Bali to Singapore in March, in USD — and is that a good price?"*
- *"Compare Google Flights and KAYAK for JFK–LHR on 15 March and tell me where to book."*
- *"When is the cheapest week to fly DPS–BKK in the next six months?"*
- *"Where can I fly from London for under £150 next month?"*
- *"Plan a two-week trip from Bali in March under $600 of flights — pick the destination and the dates."*

### Notes and limits

Prices are live and move during the day, so a quote is a quote for right now. Round-trip prices are the total for both directions. Tools read publicly displayed fares without logging in or collecting personal data; the sites' terms restrict automated access, and the legality of scraping public data depends on your jurisdiction and use.

### Need another tool?

**Open an issue on this Actor's page** and say what the agent should be able to do — tools get added on request.

The same data as plain Actors, if you would rather call them directly: [Google Flights Scraper](https://apify.com/lergassy/google-flights-scraper) · [Flight Price Comparison](https://apify.com/lergassy/flight-price-comparison) · [Kayak Flights Scraper](https://apify.com/lergassy/kayak-flights-scraper) · [Flight Price Calendar](https://apify.com/lergassy/flight-price-calendar) · [Cheap Flight Destinations](https://apify.com/lergassy/cheap-flight-destinations)

# Actor input Schema

## `note` (type: `string`):

You do not start it by hand. Point your MCP client at <code>https://lergassy--flights-mcp-server.apify.actor/mcp</code> with your Apify token, and the four flight tools appear in the client. Starting it normally just prints the setup instructions.

## Actor input object example

```json
{
  "note": ""
}
```

# Actor output Schema

## `toolResults` (type: `string`):

This Actor answers MCP tool calls directly to the connected AI client, so results arrive in the conversation rather than in a dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("lergassy/flights-mcp-server").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("lergassy/flights-mcp-server").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call lergassy/flights-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lergassy/flights-mcp-server"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pKUHc5vVtdlYekaeW/builds/C7fzdCgznepLdUnT9/openapi.json
