# Agent Flights agent quickstart

> Cheap flights worldwide, ranked by all-in price. Free remote MCP server and REST API. Guests work keyless; one call gives you a key with higher limits and booking attribution.

MCP: https://lowest.flights/mcp (Streamable HTTP) · REST: https://lowest.flights/api/v1 · OpenAPI: https://lowest.flights/api/v1/openapi.json · Version 1.3.0

## If you are an AI agent

Follow these steps in order.

1. Connect. If your client speaks MCP, add the remote server https://lowest.flights/mcp (Streamable HTTP, no sign-in). Claude Code: `claude mcp add --transport http agent-flights https://lowest.flights/mcp`. Grok CLI: `grok mcp add --transport http agent-flights https://lowest.flights/mcp`. No MCP? Use REST: `GET https://lowest.flights/api/v1/search`.
2. Search right away. No key is needed: guests can call every tool (fair-use limits).
3. Optional key. If `AGENT_FLIGHTS_API_KEY` is already set, send it as `Authorization: Bearer <key>`. If not and you want higher limits plus credit for the bookings you send, call the `register_agent` tool once or `POST https://lowest.flights/api/v1/agents/register` with {"name":"My agent","client":"claude"}. The key is shown once; store it as a secret.
4. Answer with `cheapest` and `cheapestSensible`, the warnings (`separateTickets`, `priceKind: indicative`, `feeNotes`), and each offer's `bookingLink` unchanged.
5. Do not guess prices, keys or links. Re-run the search if an offer is older than ~30 minutes.

Agent skill (SKILL.md): https://lowest.flights/skill.md · Markdown docs: https://lowest.flights/agents.md · Framework quickstarts: https://lowest.flights/agents#frameworks

## One-click install

- [Add to Cursor](https://cursor.com/en/install-mcp?name=agent-flights&config=eyJ1cmwiOiJodHRwczovL2xvd2VzdC5mbGlnaHRzL21jcCJ9)
- [Add to VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=agent-flights&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flowest.flights%2Fmcp%22%7D)
- [Add to VS Code Insiders](https://insiders.vscode.dev/redirect/mcp/install?name=agent-flights&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flowest.flights%2Fmcp%22%7D&quality=insiders)
- [Add to LM Studio](https://lmstudio.ai/install-mcp?name=agent-flights&config=eyJ1cmwiOiJodHRwczovL2xvd2VzdC5mbGlnaHRzL21jcCJ9)
- [Add to Claude](https://claude.ai/settings/connectors)
- [Add to Grok](https://grok.com/connectors)

## Install by client

### Claude (claude.ai, Desktop, mobile)

Settings → Connectors → Add custom connector → paste the URL. No sign-in needed.

```
https://lowest.flights/mcp
```

### Claude Code

Terminal

```
claude mcp add --transport http agent-flights https://lowest.flights/mcp
```

### ChatGPT

Settings → Apps → Advanced settings → Developer mode → Create app → paste the URL (Authentication: none).

```
https://lowest.flights/mcp
```

### Grok (grok.com)

grok.com/connectors → New Connector → Custom → paste the URL.

```
https://lowest.flights/mcp
```

### Grok Bot

Ask in a chat, then approve the confirmation card.

```
Add a custom MCP server called agent-flights at https://lowest.flights/mcp
```

### Grok CLI

Terminal

```
grok mcp add --transport http agent-flights https://lowest.flights/mcp
```

### Cursor

One click: “Add to Cursor” above, or ~/.cursor/mcp.json (.cursor/mcp.json in a project)

```
{
  "mcpServers": {
    "agent-flights": {
      "url": "https://lowest.flights/mcp"
    }
  }
}
```

### VS Code (Copilot agent mode)

One click: “Add to VS Code” above, or .vscode/mcp.json

```
{
  "servers": {
    "agent-flights": {
      "type": "http",
      "url": "https://lowest.flights/mcp"
    }
  }
}
```

### OpenAI Codex CLI

~/.codex/config.toml

```
[mcp_servers.agent_flights]
url = "https://lowest.flights/mcp"
```

### Gemini CLI

Terminal (or the gemini-extension.json in the public repo)

```
gemini mcp add --transport http agent-flights https://lowest.flights/mcp
```

### Windsurf / Devin Desktop

~/.codeium/windsurf/mcp_config.json

```
{
  "mcpServers": {
    "agent-flights": {
      "serverUrl": "https://lowest.flights/mcp"
    }
  }
}
```

### Cline / Roo Code

MCP Servers → Remote Servers, or cline_mcp_settings.json

```
{
  "mcpServers": {
    "agent-flights": {
      "url": "https://lowest.flights/mcp",
      "type": "streamableHttp"
    }
  }
}
```

### Zed

settings.json → context_servers

```
{
  "context_servers": {
    "agent-flights": {
      "url": "https://lowest.flights/mcp"
    }
  }
}
```

### Goose

One click: “Add to Goose” above, or Extensions → Add custom extension → Streamable HTTP

```
https://lowest.flights/mcp
```

### LM Studio

One click: “Add to LM Studio” above, or Program → Edit mcp.json

```
{
  "mcpServers": {
    "agent-flights": {
      "url": "https://lowest.flights/mcp"
    }
  }
}
```

### stdio-only clients (Claude Desktop config, older apps)

claude_desktop_config.json or any mcpServers file

```
{
  "mcpServers": {
    "agent-flights": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://lowest.flights/mcp"
      ]
    }
  }
}
```

### Le Chat, Perplexity, Copilot Studio, other remote-MCP clients

Add a custom connector / MCP server with this URL (Streamable HTTP, no auth needed).

```
https://lowest.flights/mcp
```

## Framework quickstarts

### Vercel AI SDK

```bash
npm i ai @ai-sdk/mcp @ai-sdk/openai
```

```typescript
import { generateText, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";

const flights = await createMCPClient({ transport: { type: "http", url: "https://lowest.flights/mcp" } });
try {
  const { text } = await generateText({
    model: openai("gpt-5-mini"),
    tools: await flights.tools(),
    stopWhen: stepCountIs(5),
    prompt: "Cheapest flight from Abidjan to Paris in December, flexible by 3 days",
  });
  console.log(text);
} finally {
  await flights.close();
}
```

### OpenAI Agents SDK (Python)

```bash
pip install openai-agents
```

```python
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
    async with MCPServerStreamableHttp(name="agent-flights", params={"url": "https://lowest.flights/mcp"}) as flights:
        agent = Agent(
            name="Trip planner",
            instructions="Find the cheapest sensible flight and give the traveller the bookingLink.",
            mcp_servers=[flights],
        )
        result = await Runner.run(agent, "Cheapest flight from Abidjan to Paris in December, flexible by 3 days")
        print(result.final_output)

asyncio.run(main())
```

### OpenAI Responses API (hosted MCP tool)

```bash
pip install openai
```

```python
from openai import OpenAI

client = OpenAI()
resp = client.responses.create(
    model="gpt-5-mini",
    tools=[{"type": "mcp", "server_label": "agent_flights", "server_url": "https://lowest.flights/mcp", "require_approval": "never"}],
    input="Cheapest flight from Abidjan to Paris in December, flexible by 3 days",
)
print(resp.output_text)
```

### Claude Agent SDK (TypeScript)

```bash
npm i @anthropic-ai/claude-agent-sdk
```

```typescript
import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: "Cheapest flight from Abidjan to Paris in December, flexible by 3 days",
  options: { mcpServers: { "agent-flights": { type: "http", url: "https://lowest.flights/mcp" } } },
})) {
  if (message.type === "result" && message.subtype === "success") console.log(message.result);
}
```

### LangChain / LangGraph

```bash
pip install langchain langchain-mcp-adapters langchain-openai
```

```python
import asyncio
from langchain.agents import create_agent
from langchain_mcp_adapters.client import MultiServerMCPClient

async def main():
    client = MultiServerMCPClient({"agent_flights": {"transport": "streamable_http", "url": "https://lowest.flights/mcp"}})
    agent = create_agent("openai:gpt-5-mini", await client.get_tools())
    result = await agent.ainvoke({"messages": [{"role": "user", "content": "Cheapest flight from Abidjan to Paris in December, flexible by 3 days"}]})
    print(result["messages"][-1].content)

asyncio.run(main())
```

### CrewAI

```bash
pip install crewai 'crewai-tools[mcp]'
```

```python
from crewai import Agent, Crew, Task
from crewai_tools import MCPServerAdapter

with MCPServerAdapter({"url": "https://lowest.flights/mcp", "transport": "streamable-http"}) as flight_tools:
    finder = Agent(
        role="Flight finder",
        goal="Find the cheapest sensible flight and return its bookingLink",
        backstory="Travel agent focused on all-in prices.",
        tools=flight_tools,
    )
    task = Task(description="Cheapest flight from Abidjan to Paris in December, flexible by 3 days", expected_output="Cheapest and cheapest-sensible offer with bookingLink", agent=finder)
    print(Crew(agents=[finder], tasks=[task]).kickoff())
```

### Google ADK

```bash
pip install google-adk
```

```python
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams

root_agent = LlmAgent(
    model="gemini-2.5-flash",
    name="flight_finder",
    instruction="Find the cheapest sensible flight and give the traveller the bookingLink.",
    tools=[McpToolset(connection_params=StreamableHTTPConnectionParams(url="https://lowest.flights/mcp"))],
)
```

### xAI API (Grok remote MCP)

```bash
pip install openai
```

```python
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["XAI_API_KEY"], base_url="https://api.x.ai/v1")
resp = client.responses.create(
    model="grok-4",
    tools=[{"type": "mcp", "server_label": "agent_flights", "server_url": "https://lowest.flights/mcp"}],
    input="Cheapest flight from Abidjan to Paris in December, flexible by 3 days",
)
print(resp.output_text)
```

### Plain HTTP (no MCP)

```bash
curl -s "https://lowest.flights/api/v1/search?origin=ABJ&destination=CDG&departureDate=2026-12-15&flexDays=3&currency=EUR" \
  -H "x-agent-client: my-agent"
```

## MCP tools

- `search_flights` (Search cheapest flights): Search cheap flights between two airports or cities and return the cheapest all-in fare plus a cheapest-sensible alternative (penalises 20h+ layovers and risky overnight transfers). Compares live fares and cached data where available, expands nearby airports and combines self-transfer one-ways when cheaper. One-way, return, multi-passenger, cabin and bag filters. Example: {"origin":"ABJ","destination":"CDG","departureDate":"2026-12-18","returnDate":"2027-01-05","flexDays":3,"currency":"XOF"}. Returns {cheapest, cheapestSensible, offers[] (each with bookingLink and bookingOptions on several booking sites), sources, notes}. Compact by default; view=full for every field.
- `find_cheapest_dates` (Find cheapest dates): Cheapest known fare for each day of a month on one route: a price calendar to pick the cheapest day to fly. Example: {"origin":"DSS","destination":"LIS","month":"2026-12","currency":"EUR"}. Prices may be cached (priceKind indicative); confirm with search_flights before booking.
- `explore_cheap_destinations` (Explore cheap destinations): Where can I fly cheaply from here? Lists the cheapest destinations from an origin for a month, optionally under a budget. Example: {"origin":"ABJ","month":"2026-12","budget":400,"currency":"EUR"}.
- `get_flight_offer` (Get flight offer): Full details of one offer from search_flights: legs, segments, layovers, baggage, fees and warnings. Example: {"id":"off_8f2c1a"}. Offers expire about 30 minutes after the search.
- `get_booking_link` (Get booking link): Booking link for an offer: bookingLink is a lowest.flights /go URL to send the traveller to. It attributes the click to your agent. For separate tickets, tickets[] has one /go link each. Includes self-transfer and cached-price warnings to show the traveller. Example: {"id":"off_8f2c1a"}.
- `list_flight_sources` (List flight sources): Which flight data sources are live right now and cache status. No input.
- `register_agent` (Register agent (get API key)): Self-register this agent and get an Agent Flights API key instantly (free; no email confirmation). Use it as Authorization: Bearer <apiKey> (or x-api-key) on /mcp and /api/v1 for higher limits and booking-click attribution. Optional: guests can use every tool without a key. Example: {"name":"Trip planner","client":"claude"}. The key is shown once.
- `unlock_mcp` (MCP access (free for now)): MCP is free for now: every Agent Flights tool works with no key and no payment. Calling this returns that notice and creates no checkout. No input needed.

## Support

- Email: babacar@lowest.flights
- Issues: https://github.com/lomiafrica/agent-flights-mcp/issues
- Privacy: https://lowest.flights/privacy · Terms: https://lowest.flights/terms
- Publisher: LOMI. INC, 300 Creek View Road, Suite 209, Newark, Delaware 19711, United States
