About serpapi-hotels
SerpAPI Hotels is an MCP server that searches Google Hotels through the SerpAPI service, returning prices, ratings, and reviews for a given area and date range. It suits users comparing hotel options or researching accommodation.
Key features
- 01Filter hotels by price, rating, star class, and amenities
- 02Hotel details with prices from multiple booking sources
- 03Guest reviews with sub-ratings and management responses
- 04Sorting by lowest price, highest rating, or review count
- 05Vacation rental search option
Use cases
- 01Comparing hotel prices in a city for specific dates
- 02Reading guest reviews and category scores for one hotel
- 03Filtering hotels that offer free cancellation
MCP support
This project is an MCP server that provides search_hotels, get_hotel_details, and get_hotel_reviews tools to MCP clients. It requires a SerpAPI API key.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y serpapi-hotels-mcp-serverSERPAPI_API_KEYSecretYour SerpAPI API key for hotel search access.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
3Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| gl | string | No | Country code for localization (e.g., "us") |
| hl | string | No | Language code (e.g., "en") |
| query | string | Yes | Hotel search query (e.g., "Hotels in New York", "Beach resorts in Cancun") |
| adults | number | No | Number of adult guests (default: 2) |
| rating | number | No | Minimum rating: 7 = 3.5+, 8 = 4.0+, 9 = 4.5+ |
| sort_by | number | No | Sort: 3 = lowest price, 8 = highest rating, 13 = most reviewed |
| children | number | No | Number of children (default: 0) |
| currency | string | No | Currency code (default: USD) |
| max_price | number | No | Maximum price per night |
| min_price | number | No | Minimum price per night |
| hotel_class | string | No | Star rating filter, comma-separated (e.g., "4,5") |
| check_in_date | string | Yes | Check-in date in YYYY-MM-DD format |
| children_ages | string | No | Comma-separated children ages, 1-17 (e.g., "5,8,12") |
| eco_certified | boolean | No | Filter for eco-certified hotels |
| check_out_date | string | Yes | Check-out date in YYYY-MM-DD format |
| special_offers | boolean | No | Filter for special offers |
| next_page_token | string | No | Pagination token for next page |
| vacation_rentals | boolean | No | Search for vacation rentals instead of hotels |
| free_cancellation | boolean | No | Filter for free cancellation |
Details
From the project READMESerpAPI Hotels MCP Server
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"
}
}
}
}
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_detailsreview 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.