Skip to main content
Glama
Google Flights Policy Recommender (MCP)

Google Flights Policy Recommender (MCP)

by tarun101

Corp Travel MCP

A remote MCP server that searches Google Flights, labels every result in-policy or out-of-policy against a travel policy file, and ranks them by your travel preferences — nonstop, airline alliance, red-eye avoidance, cheapest/fastest/balanced. It never visits an airline or OTA site and never attempts to book anything: it hands you a ranked, labeled list and a Google Flights link to complete the booking yourself.

Built as a technology demonstration of policy-aware flight recommendations.

This repository is one of three independently deployed MCPs in the tarun-mcp-suite, alongside gsuite and simplefin.

There's also a local, browser-driven server in this repo that can drive a booking up to (but never through) payment — see local-server/README.md.

Connect it to claude.ai

The live deployment:

https://corp-travel-mcp-508362522869.us-central1.run.app/mcp
  1. In claude.ai, go to Settings → Connectors → Add custom connector.

  2. URL: paste the URL above.

  3. Auth: choose OAuth. Leave the Client ID / Client Secret fields blank — this server supports dynamic client registration, so claude.ai registers itself automatically; nothing to fill in by hand.

  4. Save. claude.ai will prompt you to connect — sign in with your @routespring.com (or @gallop.ai) Google account. Any other domain is rejected.

  5. Try asking it to find a flight (see docs/examples.md).

Running your own separate deployment instead? See docs/advanced-build.md for deploying it (Docker, Fly.io/Render/Cloud Run) and setting up your own Google OAuth client — or use the simpler username/password (Basic Auth) option claude.ai also offers, where the password is the deployment's MCP_BEARER_TOKEN.

Related MCP server: fli

Change the default policy & config

Two files drive every recommendation: policy (hard/soft rules — fare caps, cabin class, blocked airlines) and preferences (personal taste — nonstop, alliance, cheapest vs. fastest). Full schema for both: docs/advanced-usage.md.

  • Change the deployment's default — edit policy.json / user_preferences.json and redeploy, or set the POLICY_JSON / PREFERENCES_JSON env vars directly (no rebuild needed). This changes results for everyone using that deployment — see docs/advanced-build.md for exact commands.

  • Use your own policy without changing the shared default — keep a personal policy.json / user_preferences.json and just mention it ("use my policy for this"); the assistant reads it and passes it in for that call only. This is also how multiple colleagues share one deployment with different policies — see docs/advanced-usage.md.

More

Available Tools

5 tools
check_policyCheck a flight against a travel policyA

Evaluates a specific flight (by id from the last search_flights call) against a policy JSON file and returns compliance, violations, and whether it needs approval.

Inputs: flightId (required), policyPath.

close_browserClose the browser sessionA

Closes the Playwright browser opened by this server. Call when done with a booking session.

Inputs: no named parameters.

find_compliant_flightsSearch and filter by policy in one stepA

Searches Google Flights and evaluates every result against a policy file, returning only compliant options (plus a summary of how many were rejected and why), sorted by price.

Inputs: origin (required), departDate (required), destination (required), cabin, +3 more.

search_flightsSearch Google FlightsA

Searches Google Flights for a route and returns structured flight options (airline, times, stops, price). Does not check policy or book anything.

Inputs: origin (required), departDate (required), destination (required), cabin, +2 more.

start_bookingStart booking a flight (stops before payment)A

Re-validates the chosen flight against policy, then drives Google Flights through fare selection to the airline/OTA site and best-effort fills traveler details. ALWAYS stops before any payment field or purchase button — it never enters payment info or completes a purchase. Returns a report of what was filled, what wasn't, and the URL/screenshot where a human needs to take over. If the flight is out of policy, booking is refused unless acknowledgeOutOfPolicy is explicitly set to true.

Inputs: flightId (required), traveler (required), fareChoice, policyPath, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 5 tools

    Disambiguation4/5

    Tools have distinct purposes, but find_compliant_flights and search_flights overlap in functionality; descriptions clarify the difference.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case, e.g., check_policy, search_flights.

    Tool Count5/5

    5 tools cover the core workflow (search, filter, check, book, cleanup) without excess or deficiency.

    Completeness4/5

    The tool set covers the full booking initiation workflow, but lacks policy management tools (create/edit policy files) which could be added.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Integrates Google Flights data into AI workflows for natural language flight searches, price comparisons, flexible date searches, and multi-city itinerary planning with support for various cabin classes and passenger types.
      9
      8
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables flight search and fare calendar exploration by interacting with Google Flights' API, supporting detailed filters for origin, destination, dates, cabin class, airlines, and more.
      5,288 PyPI
      3,520
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Search Google Flights for one-way, round-trip and multi-city fares, with offline airport lookup and nearby-airport resolution.
      6
      1
      MIT