HasData Google Flights — Claude Code MCP server: setup
Queries flight routes, ticket prices, emissions, and fare history from Google Flights. Returns clean JSON directly to your AI agent without a Google login.
claude mcp add google-flights -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcpWhat HasData Google Flights does
The server functions over remote HTTP or through local launchers on npm and PyPI. It exposes a single tool for inspecting one-way, round-trip, and multi-city flight routes. The response packages ticket costs, airlines, plane models, transit stops, durations, and historical pricing bands into structured JSON.
An active HasData API key is required, while Google credentials are unneeded. Free accounts receive 1000 monthly credits with no payment card attached. Because one successful query consumes 15 credits, that tier provides roughly 66 searches per month.
Round-trip lookups take two calls instead of one. The initial query returns outbound flights with a departureToken, which feeds into the second call to retrieve return legs. That doubles the cost to 30 credits per return itinerary.
What it helps with
- fetch real-time ticket prices and schedules for specific routes
- evaluate historical price trends to spot fair ticket deals
- filter flights by cabin class and nonstop options
- compare carbon emissions across different airlines and aircraft
Example prompts for the agent
- Search for the cheapest one-way flight from JFK to LHR on September 15, showing the airline and carbon emissions.
- Check whether 295 dollars is a typical price for a flight between New York and London based on price history.
- Find non-stop business class tickets from Paris to Tokyo with the lowest CO2 footprint.
How to install HasData Google Flights
1Platform CLI
claude mcp add google-flights -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcpReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http hasdata-google-flights 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'1Platform CLI: remote server
codex mcp add hasdata-google-flights --url 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'2Platform CLI
codex mcp add hasdata-google-flights --env HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"hasdata-google-flights": {
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights"
}
}
}{
"mcpServers": {
"hasdata-google-flights": {
"command": "npx",
"args": [
"-y",
"@hasdata/google-flights-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"hasdata-google-flights": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights"
}
}
}{
"servers": {
"hasdata-google-flights": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@hasdata/google-flights-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http hasdata-google-flights 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'2Platform CLI
gemini mcp add -e HASDATA_API_KEY=<HASDATA_API_KEY> hasdata-google-flights npx -y @hasdata/google-flights-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about HasData Google Flights
How do you install HasData Google Flights in Claude Code?
Run the stdio installer command: claude mcp add google-flights -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcp.
What data does HasData Google Flights provide?
It returns structured JSON covering airfares, flight numbers, aircraft types, stops, durations, carbon output, and price evaluation indicators.
Does the free tier require a credit card?
No credit card is needed to start. Free accounts receive 1000 credits monthly, which covers roughly 66 single flight lookups at 15 credits each.