npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@taskingagency/mcp-google-travels

v1.0.0

Published

MCP Server for searching flights, hotels, and vacation rentals

Readme

MCP Google Travels

A Model Context Protocol (MCP) server that provides tools for searching flights, hotels, and vacation rentals using Google's travel data via SerpAPI. This server enables AI assistants to help users browse real travel options without making actual bookings.

Features

This MCP server provides the following tools:

Flight Search Tools

  • search_flights - One-way or round-trip flight search with real pricing from Google Flights
  • search_multi_city - Multi-city flight search for trips with multiple destinations

Hotel Search Tools

  • search_hotels - Search hotels with filters for location, dates, guests, and amenities
  • get_hotel_details - Get detailed hotel information including reviews and room options

Vacation Rental Tools

  • search_vacation_rentals - Search for vacation rentals (homes, apartments, villas) with various filters

Resources

  • mcp://airports - Static list of major airports with IATA codes

Data Source

This server uses SerpAPI to fetch real-time data from Google Flights and Google Hotels. SerpAPI provides:

  • Live flight prices and availability
  • Hotel search results with reviews and ratings
  • Price insights and trends
  • Comprehensive travel information

Installation

Option 1: From npm (Recommended)

npm install -g @taskingagency/mcp-google-travels

Option 2: From GitHub

Clone the repository and install dependencies:

git clone https://github.com/modellers/mcp-google-travels.git
cd mcp-google-travels
npm install
npm run build

Set Up SerpAPI

You'll need a SerpAPI API key to use this server:

  1. Sign up at serpapi.com
  2. Get your API key from the dashboard
  3. Set it as an environment variable in your Claude Desktop configuration (see below)

Usage

As an MCP Server

This server uses the stdio transport protocol. You can integrate it with any MCP-compatible client.

Configuration for Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

Using npm package (Recommended):

{
  "mcpServers": {
    "google-travels": {
      "command": "npx",
      "args": [
        "-y",
        "@taskingagency/mcp-google-travels"
      ],
      "env": {
        "SERPAPI_API_KEY": "your_serpapi_key_here"
      }
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "google-travels": {
      "command": "mcp-google-travels",
      "env": {
        "SERPAPI_API_KEY": "your_serpapi_key_here"
      }
    }
  }
}

Using the GitHub repository:

{
  "mcpServers": {
    "google-travels": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-google-travels/dist/index.js"],
      "env": {
        "SERPAPI_API_KEY": "your_serpapi_key_here"
      }
    }
  }
}

Replace /absolute/path/to/mcp-google-travels with the actual path where you cloned the repository.

If installed globally via npm:

{
  "mcpServers": {
    "google-travels": {
      "command": "mcp-google-travels",
      "env": {
        "SERPAPI_API_KEY": "your_serpapi_key_here"
      }
    }
  }
}

Important: Replace your_serpapi_key_here with your actual SerpAPI key.

Direct Usage

You can also run the server directly:

node dist/index.js

The server will start and listen for JSON-RPC requests on stdin/stdout.

Development

Building

npm run build

Watching for Changes

npm run watch

Testing

Run the test script to verify all tools are working:

node dist/test.js

Using MCP Inspector

The MCP Inspector is a debugging tool that allows you to interactively test your MCP server. To use it:

  1. Install the MCP Inspector (if not already installed):

    npx @modelcontextprotocol/inspector
  2. Build your server:

    npm run build
  3. Start the Inspector:

    npx @modelcontextprotocol/inspector node dist/index.js
  4. Open the Inspector UI in your browser at the URL shown in the terminal (typically http://localhost:5173)

  5. Test the tools interactively:

    • View all available tools in the left panel
    • Click on any tool to see its schema and parameters
    • Fill in the parameters and execute the tool
    • See the results in real-time

This is particularly useful for:

  • Testing individual tools during development
  • Debugging tool responses
  • Validating parameter schemas
  • Understanding the tool capabilities before integration

Tool Examples

Search Flights

Search for round-trip flights with real pricing from Google Flights:

{
  "name": "search_flights",
  "arguments": {
    "origin": "SFO",
    "destination": "LAX",
    "departureDate": "2025-03-15",
    "returnDate": "2025-03-20",
    "passengers": 2,
    "cabinClass": "economy"
  }
}

Response includes:

  • Best and alternative flight options
  • Real-time pricing in USD
  • Flight duration and layover information
  • Airline and aircraft details
  • Carbon emissions data
  • Price insights and trends

Search Multi-City

Search for multi-leg trips (3+ destinations):

{
  "name": "search_multi_city",
  "arguments": {
    "flights": [
      {
        "origin": "SFO",
        "destination": "NYC",
        "departureDate": "2025-03-15"
      },
      {
        "origin": "NYC",
        "destination": "LON",
        "departureDate": "2025-03-20"
      },
      {
        "origin": "LON",
        "destination": "SFO",
        "departureDate": "2025-03-25"
      }
    ],
    "passengers": 1,
    "cabinClass": "business"
  }
}

Response includes:

  • Combined itinerary pricing
  • Individual leg details
  • Total travel time
  • Layover information

Get Flight Details

Get comprehensive details about a specific flight:

{
  "name": "get_flight_details",
  "arguments": {
    "flightId": "FL-SFO-LAX-001"
  }
}

Response includes:

  • Complete schedule and timing
  • Aircraft type and configuration
  • In-flight amenities (WiFi, entertainment, meals)
  • Baggage allowances
  • Seat availability
  • Refund and change policies

Search Hotels

Search for hotels with extensive filters:

{
  "name": "search_hotels",
  "arguments": {
    "location": "San Francisco",
    "checkIn": "2025-03-15",
    "checkOut": "2025-03-17",
    "guests": 2,
    "rooms": 1,
    "minPrice": 100,
    "maxPrice": 300,
    "starRating": 4,
    "amenities": ["wifi", "pool", "gym"]
  }
}

Response includes:

  • Hotel properties with real-time availability
  • Nightly rates and total pricing
  • Guest ratings and review counts
  • Property photos
  • Location and distance information
  • Available amenities

Get Hotel Details

Get full property information:

{
  "name": "get_hotel_details",
  "arguments": {
    "hotelId": "HTL-San-Francisco-001"
  }
}

Response includes:

  • Detailed property description
  • Room types and configurations
  • Full amenity list
  • Guest reviews and ratings
  • Nearby attractions
  • Cancellation policies

Search Vacation Rentals

Search for vacation homes and apartments:

{
  "name": "search_vacation_rentals",
  "arguments": {
    "location": "Miami Beach",
    "checkIn": "2025-03-15",
    "checkOut": "2025-03-22",
    "guests": 4,
    "bedrooms": 2,
    "bathrooms": 2,
    "propertyType": "house",
    "amenities": ["wifi", "kitchen", "pool", "parking"]
  }
}

Response includes:

  • Available vacation rentals
  • Nightly and total pricing
  • Property photos and descriptions
  • Host information
  • Guest reviews
  • House rules and check-in details

API Integration Details

SerpAPI Parameters

The server translates MCP tool calls into SerpAPI requests:

Flight Search:

  • Engine: google_flights
  • Parameters: departure_id, arrival_id, outbound_date, return_date, adults, travel_class, type
  • Travel class mapping: economy→1, premium_economy→2, business→3, first→4
  • Type codes: 1=round-trip, 2=one-way, 3=multi-city

Hotel Search:

  • Engine: google_hotels
  • Parameters: q, check_in_date, check_out_date, adults, currency, min_price, max_price, hotel_class

Multi-City:

  • Uses multi_city_json parameter with array of legs
  • Each leg: {departure_id, arrival_id, date}

Response Structure

All responses return structured JSON data from Google with:

  • best_flights / properties - Top recommended results
  • other_flights / other_options - Alternative choices
  • price_insights - Historical pricing and predictions
  • search_metadata - Search parameters and timing
  • search_parameters - Echo of request parameters

Note on Data

This server provides real-time travel data from Google Flights and Google Hotels via SerpAPI. All searches return:

  • Live pricing and availability
  • Actual flight schedules and hotel properties
  • Real guest reviews and ratings
  • Current travel restrictions and policies

Important: This is a browse-only service - no bookings are made. Users should complete their bookings directly with airlines, hotels, or booking platforms.

Development

Running Tests

The project includes comprehensive tests with mock data from real SerpAPI responses:

# Run all tests
npm test

# Generate fresh mock data from SerpAPI
npm run generate-mocks

See TESTING.md for detailed testing documentation.

Building

npm run build

Watching for Changes

npm run watch

License

MIT