thepushkarp
MCP Serverthepushkarppublic

flight agent

基于FastAPI的航班预订系统,集成Amadeus API实现搜索、定价、预订和管理功能。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

基于FastAPI的航班预订系统,集成Amadeus API实现搜索、定价、预订和管理功能。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Flight Booking API

A FastAPI-based flight booking API that integrates with the Amadeus Travel API to provide flight searching, pricing, booking, and management capabilities.

Setup

  1. Create a virtual environment:
uv venv .venv --python 3.12
  1. Activate the virtual environment:
source .venv/bin/activate
  1. Install dependencies:
uv pip sync requirements.txt
  1. Set up Amadeus API credentials (required):

    • Create an account at Amadeus for Developers
    • Get API Key and API Secret
    • Set environment variables:
      export AMADEUS_CLIENT_ID=your_api_key
      export AMADEUS_CLIENT_SECRET=your_api_secret
      
  2. Run the server:

uvicorn app.main:app --reload

The server will start at http://localhost:8000

MCP Server

This project also includes a Model Context Protocol (MCP) server, allowing interaction with the flight services through MCP clients.

  1. Ensure Amadeus credentials are set as environment variables (see Setup step 4).
  2. Run the MCP server via sse:
python app/mcp_server.py

This will start the MCP server. You can then use the MCP client to interact with the server via sse.

API Endpoints

Flight Management

  • GET /flights/locations/search - Search for airports and cities
  • GET /flights/destinations - Get direct flight destinations from an origin
  • GET /flights/search - Search for available flights
  • POST /flights/offer-price - Get final price for a flight offer

Booking Management

  • POST /flights/bookings - Create a new flight booking
  • GET /flights/bookings/{booking_id} - Get booking details
  • DELETE /flights/bookings/{booking_id} - Cancel a booking

API Documentation

Once the server is running, you can access:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc
  • Detailed API documentation: See API_DOCUMENTATION.md

Technology Stack

  • FastAPI: Web framework
  • Amadeus Travel API: Flight data and booking management
  • UVicorn: ASGI server
  • Python 3.12+

Quick Start

1

Clone the repository

git clone https://github.com/thepushkarp/flight-agent
2

Install dependencies

cd flight-agent
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerthepushkarp
Repoflight-agent
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation