Travel MCP Server

Travel MCP Server

Enables comprehensive travel planning by providing tools for flight and accommodation searches, real-time currency exchange, and weather forecasting. It also allows users to calculate estimated trip budgets based on destination, duration, and traveler preferences.

Category
Visit Server

README

Travel MCP Server

A Model Context Protocol (MCP) server for comprehensive travel planning, providing flight search, accommodation booking, currency exchange, weather forecasting, and trip budget calculation capabilities.

Features

  • šŸ›« Flight Search: Find and compare flights with various options
  • šŸØ Accommodation Search: Search for hotels, vacation rentals, and other accommodations
  • šŸ’± Currency Exchange: Get real-time exchange rates for travel budgeting
  • šŸŒ¤ļø Weather Forecast: Check weather conditions for your travel dates
  • šŸ’° Trip Budget Calculator: Calculate and plan your travel expenses

Installation

  1. Clone the repository:
git clone <repository-url>
cd travel-mcp-server
  1. Install dependencies:
npm install
  1. Set up environment variables:
    • Copy .env.example to .env
    • Fill in your API keys (see API Keys Setup)

API Keys Setup

You'll need to obtain API keys from the following services:

  1. Flight API: Amadeus, Skyscanner, or similar flight data provider
  2. Accommodation API: Booking.com, Airbnb, or similar accommodation service
  3. Currency Exchange API: Fixer.io, ExchangeRate-API, or similar service
  4. Weather API: OpenWeatherMap, WeatherAPI, or similar weather service
  5. Google Places API: For attractions and restaurant recommendations

Update your .env file with these keys:

FLIGHT_API_KEY=your_flight_api_key
BOOKING_API_KEY=your_booking_api_key
EXCHANGE_API_KEY=your_exchange_api_key
WEATHER_API_KEY=your_weather_api_key
GOOGLE_PLACES_API_KEY=your_google_places_api_key

Usage

Development

Run the server in development mode with hot reload:

npm run dev

Production

Build and start the server:

npm run build
npm start

Watch Mode

Run with automatic restart on file changes:

npm run watch

Available Tools

The MCP server provides the following tools:

1. Search Flights (search_flights)

Search for flights between destinations with customizable options.

Parameters:

  • origin: Departure airport/city
  • destination: Arrival airport/city
  • departureDate: Departure date
  • returnDate: Return date (optional for one-way)
  • passengers: Number of passengers
  • class: Flight class (economy, business, first)

2. Search Accommodation (search_accommodation)

Find hotels, vacation rentals, and other accommodation options.

Parameters:

  • destination: City or location
  • checkIn: Check-in date
  • checkOut: Check-out date
  • guests: Number of guests
  • rooms: Number of rooms
  • type: Accommodation type (hotel, apartment, etc.)

3. Get Exchange Rate (get_exchange_rate)

Get current exchange rates between currencies.

Parameters:

  • from: Source currency code (e.g., USD)
  • to: Target currency code (e.g., EUR)
  • amount: Amount to convert (optional)

4. Get Weather Forecast (get_weather_forecast)

Check weather conditions for your travel destination.

Parameters:

  • location: City or location
  • date: Date for forecast
  • days: Number of days to forecast (optional)

5. Calculate Trip Budget (calculate_trip_budget)

Calculate estimated trip costs including flights, accommodation, and daily expenses.

Parameters:

  • destination: Travel destination
  • duration: Trip duration in days
  • travelers: Number of travelers
  • category: Budget category (budget, mid-range, luxury)

Project Structure

travel-mcp-server/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # Main server entry point
│   └── services/
│       ā”œā”€ā”€ FlightService.ts       # Flight search functionality
│       ā”œā”€ā”€ AccommodationService.ts # Accommodation search
│       ā”œā”€ā”€ CurrencyService.ts     # Currency exchange
│       └── WeatherService.ts      # Weather forecasting
ā”œā”€ā”€ dist/                     # Compiled TypeScript output
ā”œā”€ā”€ package.json             # Project dependencies and scripts
ā”œā”€ā”€ tsconfig.json           # TypeScript configuration
ā”œā”€ā”€ .env                    # Environment variables (not in repo)
ā”œā”€ā”€ .gitignore             # Git ignore rules
└── README.md              # This file

Integration with MCP Clients

This server can be used with any MCP-compatible client such as:

  • Claude Desktop
  • Other AI assistants supporting MCP
  • Custom MCP client applications

Add the server to your MCP client configuration:

{
  "mcpServers": {
    "travel-planner": {
      "command": "npx",
      "args": ["travel-mcp-server"]
    }
  }
}

Development Guide

Tech Stack

  • TypeScript: Type-safe JavaScript development
  • Node.js: Runtime environment
  • MCP SDK: Model Context Protocol implementation
  • Axios: HTTP client for API requests
  • Zod: Schema validation
  • dotenv: Environment variable management

Adding New Services

  1. Create a new service class in src/services/
  2. Implement the required methods
  3. Register the service in src/index.ts
  4. Add corresponding tools and handlers

Running Tests

npm test

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Run tests: npm test
  5. Commit your changes: git commit -m 'Add feature'
  6. Push to the branch: git push origin feature-name
  7. Submit a pull request

License

This project is licensed under the ISC License - see the LICENSE file for details.

Support

If you encounter any issues or have questions:

  1. Check the Issues section
  2. Create a new issue with detailed information
  3. Provide logs and reproduction steps

Roadmap

  • [ ] Add more travel service integrations
  • [ ] Implement caching for API responses
  • [ ] Add travel itinerary planning
  • [ ] Support for group travel coordination
  • [ ] Integration with calendar services
  • [ ] Mobile app companion

Note: Remember to keep your API keys secure and never commit them to version control. Always use environment variables for sensitive configuration.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

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.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured