# HasData Google Flights

Queries flight routes, ticket prices, emissions, and fare history from Google Flights. Returns clean JSON directly to your AI agent without a Google login.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: HasData
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/HasData/google-flights-mcp
- Updated: 2026-10-12
- HTML: https://affpapa.org/en/nevibecode/mcp/hasdata-google-flights

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcp.hasdata.com/mcp?apis=google_travel_flights`
- Environment variables: `HASDATA_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI**
```bash
claude mcp add google-flights -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcp
```
Replace <…> with your own values

2. **Platform CLI: remote server**
```bash
claude mcp add --transport http hasdata-google-flights 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'
```

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add hasdata-google-flights --url 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'
```

2. **Platform CLI**
```bash
codex mcp add hasdata-google-flights --env HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/google-flights-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "hasdata-google-flights": {
            "url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "hasdata-google-flights": {
            "command": "npx",
            "args": [
                "-y",
                "@hasdata/google-flights-mcp"
            ],
            "env": {
                "HASDATA_API_KEY": "<HASDATA_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "hasdata-google-flights": {
            "type": "http",
            "url": "https://mcp.hasdata.com/mcp?apis=google_travel_flights"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http hasdata-google-flights 'https://mcp.hasdata.com/mcp?apis=google_travel_flights'
```

2. **Platform CLI**
```bash
gemini mcp add -e HASDATA_API_KEY=<HASDATA_API_KEY> hasdata-google-flights npx -y @hasdata/google-flights-mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27844
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49863

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
