Skip to content

Add Google Flights MCP#155

Open
vibegui wants to merge 1 commit intomainfrom
feat/google-flights-mcp
Open

Add Google Flights MCP#155
vibegui wants to merge 1 commit intomainfrom
feat/google-flights-mcp

Conversation

@vibegui
Copy link
Contributor

@vibegui vibegui commented Jan 22, 2026

New MCP for searching flights via SerpAPI's Google Flights integration.

Features:

  • Search one-way, round-trip, and multi-city flights
  • Filter by airlines, stops, duration, price
  • Support for flexible dates and nearby airports
  • Returns detailed flight info including prices, airlines, layovers

Summary by cubic

Add a Google Flights MCP that lets users search flights, find airport codes, and get travel date suggestions. It returns structured results and a Google Flights URL to view real prices.

  • New Features

    • MCP tools: SEARCH_FLIGHTS, SEARCH_AIRPORTS, GET_TRAVEL_DATES, UPDATE_AIRPORTS_DATABASE.
    • Airports CSV ingestion (10k+), 24h cache, airport lookup and validation.
    • Google Flights URL builder plus date and passenger validation (zod schemas).
  • Dependencies

    • New workspace: google-flights (@decocms/google-flights).
    • Adds @decocms/runtime, @decocms/bindings, zod, @modelcontextprotocol/sdk, deco-cli, typescript.

Written for commit cab13cc. Summary will update on new commits.

New MCP for searching flights via SerpAPI's Google Flights integration.

Features:
- Search one-way, round-trip, and multi-city flights
- Filter by airlines, stops, duration, price
- Support for flexible dates and nearby airports
- Returns detailed flight info including prices, airlines, layovers
@github-actions
Copy link

🚀 Preview Deployments Ready!

Your changes have been deployed to preview environments:

📦 google-flights

🔗 View Preview

These previews will be automatically updated with new commits to this PR.


Deployed from commit: e22c3c0

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 14 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="google-flights/server/tools/flights.ts">

<violation number="1" location="google-flights/server/tools/flights.ts:236">
P2: Formatting with `toISOString()` can shift dates by a day in non-UTC time zones. Format using local date parts so the calculated day matches the intended local travel date.</violation>
</file>

<file name="google-flights/server/main.ts">

<violation number="1" location="google-flights/server/main.ts:38">
P1: Guard the pbcopy call to macOS (and/or handle spawn errors) to avoid crashing the server on non-macOS deployments.</violation>
</file>

<file name="google-flights/server/lib/flights-client.ts">

<violation number="1" location="google-flights/server/lib/flights-client.ts:129">
P2: Date-only strings are parsed as UTC, but you're comparing against a local midnight date. This can incorrectly reject same-day departures or accept past dates depending on timezone. Parse dates in local time (or compare date-only values) to avoid the UTC/local mismatch.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


// Copy MCP URL to clipboard on macOS
import { spawn } from "node:child_process";
const pbcopy = spawn("pbcopy");
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Guard the pbcopy call to macOS (and/or handle spawn errors) to avoid crashing the server on non-macOS deployments.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At google-flights/server/main.ts, line 38:

<comment>Guard the pbcopy call to macOS (and/or handle spawn errors) to avoid crashing the server on non-macOS deployments.</comment>

<file context>
@@ -0,0 +1,41 @@
+
+// Copy MCP URL to clipboard on macOS
+import { spawn } from "node:child_process";
+const pbcopy = spawn("pbcopy");
+pbcopy.stdin.write(mcpUrl);
+pbcopy.stdin.end();
</file context>
Fix with Cubic

returnDate.setDate(departureDate.getDate() + tripLength);

const formatDate = (date: Date) => {
return date.toISOString().split("T")[0] ?? "";
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Formatting with toISOString() can shift dates by a day in non-UTC time zones. Format using local date parts so the calculated day matches the intended local travel date.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At google-flights/server/tools/flights.ts, line 236:

<comment>Formatting with `toISOString()` can shift dates by a day in non-UTC time zones. Format using local date parts so the calculated day matches the intended local travel date.</comment>

<file context>
@@ -0,0 +1,276 @@
+      returnDate.setDate(departureDate.getDate() + tripLength);
+
+      const formatDate = (date: Date) => {
+        return date.toISOString().split("T")[0] ?? "";
+      };
+
</file context>
Fix with Cubic

departureDate: string,
returnDate?: string,
): { valid: boolean; error?: string } {
const departure = new Date(departureDate);
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Date-only strings are parsed as UTC, but you're comparing against a local midnight date. This can incorrectly reject same-day departures or accept past dates depending on timezone. Parse dates in local time (or compare date-only values) to avoid the UTC/local mismatch.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At google-flights/server/lib/flights-client.ts, line 129:

<comment>Date-only strings are parsed as UTC, but you're comparing against a local midnight date. This can incorrectly reject same-day departures or accept past dates depending on timezone. Parse dates in local time (or compare date-only values) to avoid the UTC/local mismatch.</comment>

<file context>
@@ -0,0 +1,155 @@
+  departureDate: string,
+  returnDate?: string,
+): { valid: boolean; error?: string } {
+  const departure = new Date(departureDate);
+  const today = new Date();
+  today.setHours(0, 0, 0, 0);
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant