Travel Planner MCP Server
Minimal TypeScript MCP server providing real flight and hotel search via SerpApi for a personal travel-planning agent.
README
Travel Planner MCP Server
Minimal TypeScript MCP server for a personal travel-planning agent.
Agent-visible tools:
search_flights— real flight options from Google Flights (via SerpApi)search_hotels— real hotel/rental options from Google Hotels (via SerpApi)
Web search is intentionally excluded so it can be handled by your LLM provider's built-in web/search tool. The intended flow:
User
-> LLM travel agent
-> built-in web search for destination facts
-> travel-planner.search_flights for real flight options
-> travel-planner.search_hotels for real hotel options
-> LLM compares tradeoffs and produces the recommendation
Design
Adapter (src/providers) = talks to SerpApi
Normalizer (src/normalizers) = translates SerpApi response into our product shape
LLM = reasons over our product shape
A single SerpApi key powers both engines. The server is a thin wrapper: no booking, payments, itineraries, ranking, or post-booking support — the LLM composes the plan from the structured results.
Install
npm install
Run in mock mode (no API key needed)
npm run mock # TRAVEL_MCP_MOCK=1, returns realistic mock data
Develop / build (live)
cp .env.example .env # set SERPAPI_API_KEY
npm run dev # tsx, live
npm run build && npm start
Test
npm test # input validation, normalizers, provider errors, tool shapes
MCP client config example
{
"mcpServers": {
"travel-planner": {
"command": "node",
"args": ["/absolute/path/to/travel-planner-mcp/build/index.js"],
"env": {
"SERPAPI_API_KEY": "your_serpapi_key",
"DEFAULT_CURRENCY": "BRL",
"DEFAULT_MARKET": "BR",
"DEFAULT_LOCALE": "pt-BR"
}
}
}
}
Set TRAVEL_MCP_MOCK=1 in env to run the client against mock data.
Environment variables
| Variable | Required | Notes |
|---|---|---|
SERPAPI_API_KEY |
live mode | SerpApi key for both engines |
SERPAPI_BASE_URL |
no | defaults to https://serpapi.com/search.json |
DEFAULT_CURRENCY |
no | e.g. BRL, USD |
DEFAULT_MARKET |
no | Google gl country code, e.g. BR |
DEFAULT_LOCALE |
no | Google hl language code, e.g. pt-BR |
REQUEST_TIMEOUT_MS |
no | supplier call timeout, default 15000 |
TRAVEL_MCP_MOCK |
no | 1 to use mock data instead of SerpApi |
Notes
Supplier-specific request building is isolated in src/providers/*
(serpapi.ts is the shared client), and SerpApi → product-shape mapping lives in
src/normalizers/*. Flight/hotel result shapes are FlightOption / HotelOption.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.