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

serpapi-hotels-mcp-server

v0.0.1

Published

MCP server for searching Google Hotels via SerpAPI — hotel search, pricing, ratings, and reviews

Readme

SerpAPI Hotels MCP Server

Note: This package is part of the MCP Servers monorepo. For the latest updates and full source code, visit the SerpAPI Hotels MCP Server directory.

An MCP server for searching Google Hotels via the SerpAPI API. Search for hotels in any area with date ranges, and get back prices, ratings, reviews, and booking information.

Tools

| Tool | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------- | | search_hotels | Search for hotels with filters for price, rating, star class, amenities, and more | | get_hotel_details | Get detailed info for a specific hotel including review breakdowns and booking prices from multiple sources | | get_hotel_reviews | Get individual guest reviews with full text, ratings, sub-ratings, and hotel management responses |

Quick Start

Claude Desktop

Add this to your Claude Desktop config file:

{
  "mcpServers": {
    "serpapi-hotels": {
      "command": "npx",
      "args": ["-y", "serpapi-hotels-mcp-server"],
      "env": {
        "SERPAPI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Configuration

Environment Variables

| Variable | Required | Description | | ----------------- | -------- | -------------------- | | SERPAPI_API_KEY | Yes | Your SerpAPI API key |

Manual Setup

# Clone and install
cd experimental/serpapi-hotels
npm run install-all

# Set your API key
export SERPAPI_API_KEY=your_api_key_here

# Build and run
npm run build
cd local && npm start

Configuration

| Variable | Required | Description | | ----------------- | -------- | ------------------------------------------------------------------------- | | SERPAPI_API_KEY | Yes | Your SerpAPI API key (get one here) |

Example Usage

Search for hotels

Search for hotels in New York for March 1-5, 2026, sorted by lowest price

The search_hotels tool will be called with:

  • query: "Hotels in New York"
  • check_in_date: "2026-03-01"
  • check_out_date: "2026-03-05"
  • sort_by: 3

Get hotel details

After finding a hotel, use get_hotel_details with its property_token to get:

  • Prices from multiple booking sources (Booking.com, Hotels.com, Expedia, etc.)
  • Review breakdown by category (cleanliness, location, service)
  • Full amenity list
  • Check-in/out times
  • Nearby places with travel times

Read hotel reviews

After finding a hotel, use get_hotel_reviews with its property_token to get:

  • Full review text from Google and third-party sources (TripAdvisor, etc.)
  • Reviewer ratings with sub-ratings (rooms, service, location)
  • Hotel management responses
  • Sorting by most helpful, most recent, highest/lowest score
  • Category filtering (from get_hotel_details review breakdown)

Available Filters

| Filter | Values | | ------------------------- | -------------------------------------------------------- | | sort_by | 3 = lowest price, 8 = highest rating, 13 = most reviewed | | rating | 7 = 3.5+, 8 = 4.0+, 9 = 4.5+ | | hotel_class | "2", "3", "4", "5" (star rating, comma-separated) | | min_price / max_price | Price range per night | | free_cancellation | true/false | | special_offers | true/false | | eco_certified | true/false | | vacation_rentals | true = search vacation rentals instead |

Development

npm run install-all    # Install all dependencies
npm run build          # Build the project
npm run dev            # Development mode
npm test               # Run functional tests
npm run test:integration  # Run integration tests
npm run test:manual    # Run manual tests (requires API key)

Project Structure

serpapi-hotels/
├── local/              # Stdio transport entry point
│   └── src/
│       ├── index.ts                      # Main entry point
│       └── index.integration-with-mock.ts # Mock entry for integration tests
├── shared/             # Core business logic
│   └── src/
│       ├── server.ts         # MCP server factory
│       ├── tools.ts          # Tool registration
│       ├── resources.ts      # Resource handlers
│       ├── types.ts          # TypeScript types
│       ├── logging.ts        # Logging utilities
│       ├── tools/            # Individual tool implementations
│       │   ├── search-hotels.ts
│       │   ├── get-hotel-details.ts
│       │   └── get-hotel-reviews.ts
│       └── serpapi-client/   # SerpAPI client
│           ├── serpapi-client.integration-mock.ts
│           └── lib/
│               ├── parse-property.ts
│               ├── search-hotels.ts
│               ├── get-hotel-details.ts
│               └── get-hotel-reviews.ts
└── tests/
    ├── functional/       # Unit tests with mocks
    ├── integration/      # Full MCP protocol tests
    ├── manual/           # Real API tests
    └── mocks/            # Mock implementations