hasdata-google-flights

hasdata-google-flights is a cursor rule for Cursor from HasData/google-flights-mcp. It costs 17 tokens per session (582 once invoked), scanned A, original, MIT.

A set of instructions for retrieving Google Flights itineraries, fares, and carbon emissions through the HasData service. Google Flights is a flight-search service; airport codes such as JFK identify the airports used in a search.

In plain words
What is it for?
It is for searching one-way or round-trip flights by route and date, then reading itineraries, duration, connections, emissions, and fare information.
Why use it?
It prevents invalid requests caused by using city names, omitting a return date for a round trip, or combining conflicting airline filters. It also explains how to read empty results and fare details.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It is for searching one-way or round-trip flights by route and date, then reading itineraries, duration, connections, emissions, and fare information.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hasdata/google-flights-mcp/hasdata-google-flights
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/HasData/google-flights-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hasdata-google-flights

README.md
[![agentmods](https://agentmods.dev/badge/rules/hasdata/google-flights-mcp/hasdata-google-flights/github.svg)](https://agentmods.dev/rules/hasdata/google-flights-mcp/hasdata-google-flights)
Your own site
<a href="https://agentmods.dev/rules/hasdata/google-flights-mcp/hasdata-google-flights"><img src="https://agentmods.dev/badge/rules/hasdata/google-flights-mcp/hasdata-google-flights/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hasdata-google-flights

Your own site · 80×15
<a href="https://agentmods.dev/rules/hasdata/google-flights-mcp/hasdata-google-flights"><img src="https://agentmods.dev/badge/rules/hasdata/google-flights-mcp/hasdata-google-flights.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 582 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00582
Opus 5.5 $0.00007 $0.00233
Sonnet 5.5 $0.00003 $0.00116
Haiku 4.5 $0.00002 $0.00058

Measured 3d ago against content hash f9abae2a063c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hasdata-google-flights scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/hasdata-google-flights.mdc · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Flights through HasData

One tool, hasdata_google_travel_flights_getGoogleFlights. It needs departureId, arrivalId and outboundDate, and it returns the itineraries Google shows for that route and day.

Airports are IATA codes such as JFK or location kgmids, never city names. A city name comes back as a 400 with requestMetadata.status set to error. Several airports can share one field, comma-separated.

Two rules the validator enforces

type defaults to roundTrip, and a round trip without returnDate fails validation before it becomes a search. includeAirlines and excludeAirlines are one or the other, and sending both is rejected the same way.

Validation failures arrive as tool output with isError set to true, carrying a 422 and naming the offending field and the rule it broke, such as requiredWhen or mutuallyExclusive. The call itself succeeds, so nothing in the transport reports the problem.

Reading the payload

Itineraries split into bestFlights and otherFlights. A route with nothing flying that day returns both arrays empty and a status of ok, so test for itineraries before ranking them.

totalDuration is minutes. carbonEmissions.thisFlight is grams, so 433000 is 433 kg, and differencePercent compares it to typicalForThisRoute where a negative number means cleaner than average.

priceInsights sits beside the itineraries with lowestPrice, a typicalPriceRange, a priceLevel and a priceHistory of timestamp and price pairs. That is where the answer to "is this a good fare" lives, rather than in the fare itself.

Tokens

departureToken picks an outbound option and fetches its return leg, bookingToken fetches booking options for a chosen itinerary. Both come from a previous response, and each is another billed call, so a round trip priced end to end is at least two.

Fares move constantly. Quote the date you pulled them alongside the number.

Prompts and resources

The server also serves resources that spell out the accepted values of every parameter that takes a fixed list, each one at hasdata://google_travel_flights/<parameter>. Reading one spends no credits and makes no upstream request, which beats discovering the vocabulary from a rejected call. Listing them needs no API key either, so a client can read them before the user has connected an account.

Read the full file on GitHub · 37 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +6 lines f9abae2a063c
  2. 23d ago First seen · 31 lines · 17 tokens per session scan A 42c9201173d7

Subscribe to this mod's changes

hasdata-google-flights is a cursor rule published in the GitHub repository HasData/google-flights-mcp (6 stars, last pushed 4d ago), licensed MIT. It adds 17 tokens to every session and 582 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.