Skip to main content
Glama

aa-mcp-server

An MCP server that gives Claude (or any MCP-compatible LLM) read-only access to your American Airlines AAdvantage account — mile balance, Loyalty Points progress, transaction history, upcoming trips, travel credits, and partner offers.

This is not a browser-automation wrapper. The server discovers and calls aa.com's underlying JSON APIs directly using session cookies extracted from a Chromium login. All HTTP traffic uses curl_cffi with Chrome TLS impersonation to satisfy aa.com's Akamai Bot Manager.

Tools

Tool

Endpoint

Returns

get_account_summary

/loyalty/api/member-information

Name, AAdvantage #, mile balance, status, cobranded card, business memberships

get_loyalty_points_progress

/loyalty/api/progress-qualification

LP YTD, last-year totals, tier thresholds, next-status delta

get_profile_details

/api/loyalty/.../profile

DOB, partners list, sales city, mile expiration, million-miler stats

get_mile_activity

/api/loyalty/.../memberActivity

Mile/LP transaction history (date range, paginated, searchable)

get_upcoming_trips

/loyalty/api/upcoming-trips

Reservations with record locators

get_reservation_by_locator

/manage-reservation/viewres/api/reservation

Full reservation: segments, passengers, tickets, costs, change/cancel eligibility (requires lead-passenger name)

search_change_flights

/manage-reservation/reshop/api/reshop/cheapest

Alternative flights for a reservation with a ±6-day price carousel, per-cabin pricing (netPrice = delta vs paid). Accepts origin/destination/date changes; pricing is total for all pax (no per-passenger split)

get_flight_credits

/api/loyalty/travelCredits/flightCredit/details

Single-passenger ticket credits

get_trip_credits

/api/loyalty/travelCredits/tripCredit/details

Multi-passenger / itinerary credits

get_partner_offers

/loyalty/api/partnerOffers

Dashboard partner promotions

get_notifications

/loyalty/api/notifications

Account notifications

check_auth_status

—

Saved-session info: AA #, token expiry, cookie count

save_session_from_browser

CDP

Pulls cookies from a logged-in Chromium and persists them

Related MCP server: Amadeus Agent

Setup

pip install aa-mcp-server

One-time auth

aa.com is fronted by Akamai Bot Manager — you can't log in via headless requests. The flow:

  1. Launch a real Chromium with a persistent profile and a remote-debugging port:

    aa-auth-browser              # default account
    aa-auth-browser personal     # named account
  2. Log into aa.com (and complete 2FA if prompted) in the window that opens.

  3. Copy the cookies into the MCP store:

    aa-mcp-server --extract-session default

    Or call the save_session_from_browser MCP tool from Claude.

The cookies live in ~/.aa-mcp/accounts/<account>/session.json. The chromium profile lives in ~/.aa-mcp/chrome-profiles/<account>/. To refresh after expiry, relaunch aa-auth-browser (the saved profile auto-refreshes the access_token cookie when you visit any aa.com page) and re-run --extract-session.

AA_MCP_CHROMIUM=<path-to-chrome.exe> overrides the auto-discovery if your Chromium is somewhere unusual.

Multi-account

Every tool takes an optional account parameter. Omit it to use the default account.

get_account_summary()                # default
get_account_summary(account="spouse")

Running

aa-mcp-server                        # stdio transport
aa-mcp-server --setup                # show account status & setup hints
aa-mcp-server --extract-session NAME # save cookies from running Chromium

Add to your MCP client config (e.g. Claude Desktop):

{
  "mcpServers": {
    "aa": {
      "command": "aa-mcp-server"
    }
  }
}

Limitations

  • Read-only. No booking, no award redemption, no profile edits.

  • Cookie expiry. The access_token JWT lives ~45 min; the refresh_token cookie typically ~30 days. Visiting any aa.com page in the saved Chromium profile silently refreshes both. After a long gap, re-extract.

  • GraphQL coverage. Only the GetCustomer persisted query is wired up. Expanding requires capturing additional sha256Hashes from the browser bundle — easy but a per-feature task.

  • One region tested. All testing has been on US-locale aa.com. International locales may require different referer paths.

License

MIT

mcp-name: io.github.thehesiod/aa

Available Tools

13 tools
check_auth_statusB

Check the saved AA session for an account — token expiry, AAdvantage #, cookie count.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_account_summaryB

Member info: name, AAdvantage #, mile balance, status, cobranded card, business memberships.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_flight_creditsC

Flight credits (single-passenger ticket credits from cancelled flights).

Args: locale: Locale code (default en_US). account: Account name (optional, uses default).

Inputs: locale, account. Returns: result

get_loyalty_points_progressC

Elite status progress — Loyalty Points YTD + last-year EQDs/EQMs/EQSs + tier thresholds.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_mile_activityA

AAdvantage mile / loyalty-point transaction history.

Returns activity cards with date, type (Flight/Bank/Promo/Misc), miles earned/used, loyalty points, partner code, and transaction description.

Args: from_date: YYYY-MM-DD inclusive (default: 180 days ago). to_date: YYYY-MM-DD inclusive (default: today). starting_index: 0-based offset for pagination. page_size: Max records (server caps ~50). search_string: Free-text filter on transaction description. sort_direction: "asc" or "desc" by activity_date. account: Account name (optional, uses default).

Inputs: from_date, to_date, starting_index, page_size, +3 more. Returns: result

get_notificationsC

Account notifications panel.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_partner_offersC

Partner offers / promotions on the dashboard.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_profile_detailsA

Detailed profile: DOB, partners, sales city, mile expiration, million-miler stats.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

get_reservation_by_locatorA

Full reservation details by record locator + lead passenger name.

Returns the complete viewres payload: passengers (with passengerID like "01.01"), itinerary slices and segments (flight numbers, times, fare codes, booking codes), tickets (one per passenger), cost summary, eligibilityFlags (cancel / change / partial-reshop), and eligibleProducts (deep links to change-flow URLs).

The underlying endpoint validates first+last name against the lead passenger on the PNR, so both are required even when authenticated.

Args: record_locator: 6-character PNR (e.g., "UHJHHT"). last_name: Lead passenger last name (e.g., "Mohr"). first_name: Lead passenger first name (e.g., "Alexander"). account: Account name (optional, uses default).

Inputs: record_locator (required), last_name (required), first_name (required), account. Returns: result

get_trip_creditsB

Trip credits (multi-passenger / itinerary-level credits).

Args: locale: Locale code (default en_US). account: Account name (optional, uses default).

Inputs: locale, account. Returns: result

get_upcoming_tripsC

Upcoming flight reservations with record locators.

Args: account: Account name (optional, uses default).

Inputs: account. Returns: result

save_session_from_browserA

Pull cookies from a logged-in Chromium (started by aa-auth-browser) and save them.

Workflow:

  1. Run aa-auth-browser <account> to launch Chromium with --remote-debugging-port.

  2. Log into aa.com in that browser.

  3. Call this tool — it connects to the debug port via CDP and saves all aa.com cookies.

Args: account: Account name to associate with the saved cookies. Default: "default". port: Chromium remote-debugging port as a string. Empty/omitted uses the default (9224, matches aa-auth-browser). Pass as string to avoid MCP type-coercion issues with some clients.

Inputs: account, port. Returns: result

search_change_flightsA

Search alternative flights for an existing reservation (the "change flight" flow).

Returns the full reshop payload: a ±6-day price carousel around departure_date, plus up to 40 flight options with per-cabin pricing (flightCells contain fare, netPrice = delta vs paid, cabinType, fareType, changeType, seatsLeft).

The endpoint allows changing origin city, destination city, and date in a single query — AA validates against the original fare rules and either returns SUCCESS or an error. Negative netPrice means you'd be issued a travel credit; positive means additional payment due. Change fees are usually $0 (waived on non-Basic- Economy fares).

PRICING SCOPE: All numbers are TOTAL for every passenger on the PNR. This endpoint does not support per-passenger pricing. To change only some passengers on a multi-pax booking, the PNR typically has to be split first via an agent (the divideEligible flag on the reservation indicates whether the self-serve split is allowed; partial reshop without a split usually requires a phone agent).

Args: record_locator: 6-character PNR (e.g., "UHJHHT"). last_name: Lead passenger last name. first_name: Lead passenger first name. departure_date: New departure date (YYYY-MM-DD). origin_airport: New origin airport (3-letter IATA — can differ from original). destination_airport: New destination airport (3-letter IATA — can differ from original). slice_index: Which slice of the reservation to change (0 = first; matters for round-trips). carousel_days: Include the ±6-day min-price grid in the response (default True). account: Account name (optional, uses default).

Inputs: record_locator (required), last_name (required), first_name (required), departure_date (required), +5 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 13 tools

    Disambiguation4/5

    Tools target distinct domains like auth, account summary, credits, loyalty, and reservations. Minor overlap between get_flight_credits and get_trip_credits, and get_account_summary vs get_profile_details, but descriptions clarify differences.

    Naming Consistency5/5

    Almost all tools follow a consistent verb_noun pattern (get_, check_, save_, search_). The naming is predictable and clear, with only minor deviation like 'search_change_flights'.

    Tool Count5/5

    13 tools is well-scoped for an airline account management server, covering account info, credits, loyalty, notifications, offers, profile, reservations, and session management without being excessive.

    Completeness3/5

    Covers account info, credits, loyalty, and reservation retrieval well, but lacks core operations like booking, canceling, or actually changing reservations (only search for changes). Notable gaps in flight lifecycle management.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers