> ## Documentation Index
> Fetch the complete documentation index at: https://docs.farelint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP integration

> Connect AI agents to Farelint using your existing API key.

Connect an MCP client to Farelint's **Streamable HTTP** endpoint:

```text theme={null}
https://api.farelint.com/mcp
```

Use an API key from [your Farelint dashboard](https://farelint.com/dashboard/keys). Authentication uses `Authorization: Bearer YOUR_API_KEY` on every request. Keys have the same workspace access and revocation behavior as the HTTP API. Keep the key in your environment or client secret storage.

## Connect your client

> [tab] Claude Code
>
> Set `FARELINT_API_KEY` in the environment that launches Claude Code. Add this to your project's `.mcp.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "farelint": {
>       "type": "http",
>       "url": "https://api.farelint.com/mcp",
>       "headers": {
>         "Authorization": "Bearer ${FARELINT_API_KEY}"
>       }
>     }
>   }
> }
> ```
>
> Open `/mcp` in Claude Code to check the connection. See [Claude Code's MCP configuration guide](https://code.claude.com/docs/en/mcp).

> [tab] Cursor
>
> Set `FARELINT_API_KEY` in the environment available to Cursor. Add this to `.cursor/mcp.json` or your global Cursor MCP settings:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "farelint": {
>       "url": "https://api.farelint.com/mcp",
>       "headers": {
>         "Authorization": "Bearer ${env:FARELINT_API_KEY}"
>       }
>     }
>   }
> }
> ```
>
> See [Cursor's MCP configuration guide](https://cursor.com/docs/mcp).

For local development, use `http://127.0.0.1:4188/mcp` and a key from the matching local database. The endpoint accepts MCP POST requests and returns JSON. It is stateless: no MCP session ID, persistent SSE connection or separate MCP service is required.

This integration supports clients that can supply a bearer API key. OAuth sign-in and app-directory listings are not implemented. Clients that require an OAuth connector cannot use an API key in its place.

## Available tools

| Tool | Purpose | Credits |
| - | - | - |
| `farelint_list_airlines` | Current airline capabilities, routes and operation costs | No search credits |
| `farelint_get_usage` | Balance, plan, concurrency and paginated credit ledger | No search credits |
| `farelint_search_flights` | Submit an exact-date, single-airline async search | Airline async search rate |
| `farelint_get_job` | Poll status and retrieve retained search or details results | No search credits |
| `farelint_list_requests` | Paginated workspace request history, shared with the dashboard | No search credits |
| `farelint_get_offer_details` | Submit an async details job for a returned offer reference | Airline details rate, when enabled |

The search and details tools require `idempotency_key` and `request.max_credits`. Choose a new idempotency key for each intended operation and reuse the same key and payload for retries. A retry retrieves the existing job; it does not reserve credits again. A different payload with the same key is rejected.

MCP uses the same plan requirements, capability validation, queues, concurrency and credit accounting as the HTTP API. Async tool calls have no synchronous surcharge. Technical partial and failed jobs release their reserved credits under the normal settlement rules.

## Search, then poll

First call `farelint_list_airlines` to confirm the requested capability and credit rate, and `farelint_get_usage` to check your balance. Ask the traveller for missing dates, passenger details or airport codes before submitting a search.

Example arguments for `farelint_search_flights`:

```json theme={null}
{
  "idempotency_key": "your-unique-trip-search-001",
  "request": {
    "airline": "ryanair",
    "origin": "OPO",
    "destination": "STN",
    "departure_date": "2027-04-06",
    "return_date": null,
    "passengers": {
      "adults": 1,
      "children": [],
      "infants": []
    },
    "cabin": "economy",
    "market": "PT",
    "language": "en",
    "currency": "EUR",
    "max_credits": 2
  }
}
```

The example ceiling must cover the current rate returned by `farelint_list_airlines`; it does not lock in pricing or establish route availability.

The response is a durable job. Pass its `id` as `job_id` to `farelint_get_job`; wait between polls rather than submitting another search. `farelint_list_requests` and `farelint_get_usage` accept the previous page's `next_cursor` as `cursor`.

`farelint_get_offer_details` accepts `offer_id`, an `idempotency_key` and a `request` containing `max_credits` plus an optional registered `webhook_endpoint_id`. Check that details are enabled for the source first. Search also supports the existing registered webhook endpoint field.

Tool failures return `isError: true` with a structured `error.code`, `message` and `retry_after_seconds`. For HTTP authentication failures, correct the configured API key; do not keep submitting the same rejected credential.

## Results and availability

Preserve original currencies, source timestamps, price basis, completeness and `checkout_verified` when presenting results. A queued job is not a fare quote; a partial result is not a completed search. Farelint observations do not book tickets or guarantee checkout availability.

Collection workers must be enabled and available to process queued jobs. Adding MCP does not enable a source or start workers. Existing collection and retention limits still apply.

Scheduled feeds, bulk exports, historical analytics, packaged agent skills and team invitations remain separate roadmap items. Completion webhooks are available through the existing HTTP API.

Contact [miguel@miguellabs.xyz](mailto:miguel@miguellabs.xyz) for commercial source onboarding. Permitted display, analysis, retention and redistribution must be confirmed before public enablement.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.