Travel MCP Server

Travel MCP Server

A comprehensive travel aggregation server that enables AI assistants to search for flights and hotels, track flight statuses in real-time, and retrieve airport information. It integrates with Amadeus and AviationStack APIs to provide data on pricing, schedules, and travel routes through natural language.

Category
访问服务器

README

Travel MCP Server

A comprehensive Model Context Protocol (MCP) server for travel aggregation, providing AI assistants with access to flight search, hotel booking, airport information, and real-time flight tracking.

Python 3.10+ License: MIT MCP

Quick Links

Features

Flight Search & Booking

  • Search Flights: Find flight offers between airports with prices, airlines, and schedules
  • Find Cheapest Dates: Discover the most affordable travel dates for flexible planning
  • Flight Tracking: Real-time flight status, location, altitude, and ETA

Hotel Search

  • Search Hotels: Find hotels with availability, pricing, amenities, and location
  • Multi-city Support: Search hotels in any city worldwide

Airport Information

  • Airport Search: Find airports by city name or location
  • Airport Details: Get comprehensive airport information including timezone and facilities
  • Route Information: View all flights between two airports

APIs Used

Primary: Amadeus Self-Service API

  • Flight Offers Search
  • Hotel Search
  • Airport & City Search
  • Cheapest Date Search

Get your Amadeus API keys (Free tier available with monthly quota)

Secondary: AviationStack API

  • Real-time Flight Tracking
  • Flight Status Updates
  • Route Information

Get your AviationStack API key (100 free requests/month)

Installation

Prerequisites

  • Python 3.10 or higher
  • pip package manager

Setup Steps

  1. Clone the repository
cd travel-mcp-server
  1. Create a virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -e .
  1. Set up environment variables
cp .env.example .env

Edit the .env file with your API credentials:

# Amadeus API Credentials (Required)
AMADEUS_CLIENT_ID=your_amadeus_api_key_here
AMADEUS_CLIENT_SECRET=your_amadeus_api_secret_here
AMADEUS_ENV=test  # Use 'production' when ready

# AviationStack API Key (Optional - for flight tracking)
AVIATIONSTACK_API_KEY=your_aviationstack_key_here

Getting API Keys

Amadeus API

  1. Go to Amadeus for Developers
  2. Click "Register" to create an account
  3. Go to "My Self-Service Workspace"
  4. Click "Create New App"
  5. Copy your API Key and API Secret

AviationStack (Optional)

  1. Go to AviationStack
  2. Sign up for a free account
  3. Copy your API key from the dashboard

Usage with Claude Desktop

Configuration

Add this to your Claude Desktop config file:

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

{
  "mcpServers": {
    "travel": {
      "command": "/path/to/travel-mcp-server/venv/bin/python",
      "args": [
        "-m",
        "travel_mcp.server"
      ],
      "env": {
        "AMADEUS_CLIENT_ID": "your_amadeus_api_key",
        "AMADEUS_CLIENT_SECRET": "your_amadeus_api_secret",
        "AMADEUS_ENV": "test",
        "AVIATIONSTACK_API_KEY": "your_aviationstack_key"
      }
    }
  }
}

Restart Claude Desktop

After adding the configuration, restart Claude Desktop to load the MCP server.

Available Tools

1. search_flights

Search for flight offers between two airports.

Parameters:

  • origin (required): Origin airport IATA code (e.g., 'JFK')
  • destination (required): Destination airport IATA code (e.g., 'LAX')
  • departure_date (required): Departure date (YYYY-MM-DD)
  • return_date (optional): Return date (YYYY-MM-DD)
  • adults (optional): Number of passengers (default: 1)
  • max_results (optional): Max results to return (default: 10)

Example:

Find me flights from New York (JFK) to London (LHR) on December 25, 2025, returning January 5, 2026

2. search_hotels

Search for hotels in a city with availability and pricing.

Parameters:

  • city_code (required): City IATA code (e.g., 'NYC', 'PAR')
  • check_in_date (required): Check-in date (YYYY-MM-DD)
  • check_out_date (required): Check-out date (YYYY-MM-DD)
  • adults (optional): Number of guests (default: 1)

Example:

Find hotels in Paris for December 20-25, 2025 for 2 adults

3. search_airports

Search for airports by city name.

Parameters:

  • city_name (required): Name of the city

Example:

What airports are in Tokyo?

4. find_cheapest_dates

Find the cheapest dates to fly between two airports.

Parameters:

  • origin (required): Origin airport IATA code
  • destination (required): Destination airport IATA code

Example:

When is the cheapest time to fly from San Francisco to Sydney?

5. track_flight

Track a flight in real-time (requires AviationStack API key).

Parameters:

  • flight_iata or flight_icao (one required): Flight code

Example:

Track flight AA100

6. get_flights_by_route

Get all flights on a specific route.

Parameters:

  • dep_iata (optional): Departure airport IATA code
  • arr_iata (optional): Arrival airport IATA code

Example:

What flights go from LAX to JFK?

7. get_airport_info

Get detailed information about an airport.

Parameters:

  • iata_code (required): Airport IATA code

Example:

Tell me about Heathrow airport (LHR)

Common Airport Codes

  • JFK - New York John F. Kennedy
  • LAX - Los Angeles International
  • LHR - London Heathrow
  • CDG - Paris Charles de Gaulle
  • NRT - Tokyo Narita
  • DXB - Dubai International
  • SYD - Sydney Airport
  • SFO - San Francisco International

Development

Running Tests

pytest tests/

Code Formatting

black src/
isort src/

Type Checking

mypy src/

API Rate Limits

Amadeus Free Tier

  • Test Environment: Fixed monthly quota
  • Production: Free monthly quota + pay-as-you-go

AviationStack Free Tier

  • 100 API calls per month
  • 30-60 second data delay

Troubleshooting

"AMADEUS_CLIENT_ID and AMADEUS_CLIENT_SECRET must be set"

  • Ensure you've created a .env file with your credentials
  • Or set them in your Claude Desktop config

"Unknown tool" error

  • Check that your API keys are valid
  • Ensure clients are initialized (check server logs)

API Rate Limit Exceeded

  • Amadeus: Wait for monthly quota reset or upgrade plan
  • AviationStack: Wait for monthly reset or upgrade plan

Contributing

Contributions welcome! Please feel free to submit a Pull Request.

License

MIT License - feel free to use this in your projects!

Support

For issues and questions:

Roadmap

  • [ ] Add price alerts and monitoring
  • [ ] Add car rental search
  • [ ] Add train/rail search (Eurail, Amtrak)
  • [ ] Add activity/tour booking
  • [ ] Add travel insurance options
  • [ ] Add visa requirement checker
  • [ ] Add currency converter
  • [ ] Add weather forecasts for destinations
  • [ ] Add caching for repeated queries
  • [ ] Add more travel APIs (Booking.com, Expedia)

Acknowledgments

Built with:


Happy Traveling! ✈️ 🏨 🌍

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选