Airline Flight Delays MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/chatwithsrini/AirlinesMCP
cd AirlinesMCP
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "OPENAI_API_KEY=${OPENAI_API_KEY}" -e "DATABASE_URL=${DATABASE_URL}" airline-flight-delays -- python "<FULL_PATH_TO_AIRLINESMCP>/dist/index.js"

Replace <FULL_PATH_TO_AIRLINESMCP>/dist/index.js with the actual folder you prepared in step 1.

Required:OPENAI_API_KEYDATABASE_URL
README.md

AI-Powered Customer Service Automation for Weather-Related Flight Disruptions

Airline Flight Delays MCP Server

AI-Powered Customer Service Automation for Weather-Related Flight Disruptions

πŸ“‹ Overview

This project presents a Model Context Protocol (MCP) server-based system designed to reduce customer support costs for Indigo airline during weather-related flight delays. The airline operates a major hub in Mumbai with over 5,000 daily flights and faces peak support demand, long wait times, customer dissatisfaction, and high operational costs during delays.

Key Innovations

  • Mood-Aware Communication: Adapts tone based on passenger sentiment (frustrated, concerned, calm, excited)
  • Proactive Engagement: Entertainment activities scaled to delay duration (30min to 3+ hours)
  • Personalized Service: Prioritizes frequent flyer members and provides customized recommendations
  • Seamless Human Handoff: Full conversation context preservation for specialist escalation
  • Real-Time Intelligence: Live flight status, rebooking options, and destination insights

Expected Results

  • 60-70% reduction in routine customer service inquiries through automation
  • Instant response times for common queries
  • Intelligent routing of complex cases to human specialists
  • Enhanced customer satisfaction through personalized, empathetic service

πŸ—οΈ Architecture

The solution uses a microservices architecture with six specialized MCP servers coordinated by a main orchestrator:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Main MCP Orchestrator                      β”‚
β”‚                  (FastMCP Server - Python)                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                     β”‚                     β”‚
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Authenticationβ”‚    β”‚   Flight     β”‚    β”‚    Mood      β”‚
β”‚   Server     β”‚    β”‚ Information  β”‚    β”‚  Analysis    β”‚
β”‚              β”‚    β”‚   Server     β”‚    β”‚   Server     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                     β”‚                     β”‚
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Engagement/  β”‚    β”‚ Itinerary/   β”‚    β”‚    Human     β”‚
β”‚   Games      β”‚    β”‚    Food      β”‚    β”‚    Agent     β”‚
β”‚   Server     β”‚    β”‚   Server     β”‚    β”‚   Transfer   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1. **Authentication Server**

  • Secure passenger login and session management
  • PNR/email/frequent flyer number authentication
  • JWT token generation
  • Passenger profile retrieval

2. **Flight Information Server**

  • Real-time flight status and delay information
  • Gate details and terminal navigation
  • Alternative flight options for rebooking
  • Connection impact analysis
  • Weather delay notifications

3. **Mood Analysis Server**

  • Sentiment detection using VADER and TextBlob
  • LLM-powered emotional intelligence analysis
  • Communication tone recommendations
  • Escalation trigger detection
  • Sentiment trend tracking

4. **Engagement/Games Server**

  • Delay-appropriate entertainment activities
  • Interactive games, trivia, and quizzes
  • Destination virtual tours
  • Relaxation and mindfulness exercises
  • Airport exploration suggestions

5. **Itinerary/Food Server**

  • Airport restaurant recommendations
  • Destination dining guides
  • Attraction and activity planning
  • Personalized itinerary generation
  • Dietary restriction handling

6. **Human Agent Transfer Server**

  • Context-aware escalation to specialists
  • Complete conversation history preservation
  • Priority queue management
  • Passenger profile and sentiment handoff
  • Intelligent routing based on issue complexity

πŸš€ Quick Start

Prerequisites

  • Python: 3.9 or higher
  • PostgreSQL: 12+ with pgvector extension
  • Redis: 6+ (optional, for caching)
  • LLM API: OpenAI, Azure OpenAI, or Anthropic API key

Installation

  1. Clone the Repository
cd /path/to/your/workspace
git clone <repository-url>
cd airline-delays-mcp-server
  1. Create Virtual Environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Setup Database
-- Connect to PostgreSQL
psql -U postgres

-- Create database
CREATE DATABASE airline_delays_db;

-- Connect to database
\c airline_delays_db

-- Enable pgvector extension (if using vector operations)
CREATE EXTENSION IF N

Tools (6)

authenticate_passengerSecure passenger login and session management using PNR or frequent flyer details.
get_flight_statusRetrieve real-time flight status, gate details, and delay information.
analyze_sentimentDetect passenger sentiment to recommend appropriate communication tones.
get_engagement_activitiesProvide delay-appropriate entertainment activities based on duration.
get_itinerary_recommendationsGenerate personalized airport restaurant and destination activity recommendations.
transfer_to_humanEscalate complex issues to human specialists with full conversation context.

Environment Variables

OPENAI_API_KEYrequiredAPI key for LLM-powered emotional intelligence and analysis
DATABASE_URLrequiredConnection string for the PostgreSQL database

Configuration

claude_desktop_config.json
{"mcpServers": {"airline-delays": {"command": "python", "args": ["/path/to/airline-delays-mcp-server/main.py"], "env": {"OPENAI_API_KEY": "your-key-here"}}}}

Try it

β†’My flight is delayed by 3 hours, what entertainment activities can you suggest?
β†’Check the status of flight AI-501 and see if there are any rebooking options.
β†’I am very frustrated with this delay, please help me find a quiet place to eat at the airport.
β†’Escalate my current issue to a human agent as I need to reach my destination for an urgent meeting.

Frequently Asked Questions

What are the key features of Airline Flight Delays?

Mood-aware communication that adapts tone based on passenger sentiment. Proactive engagement activities scaled to the duration of the flight delay. Real-time flight status, gate information, and rebooking intelligence. Seamless human agent handoff with full conversation context preservation. Personalized airport dining and destination activity recommendations.

What can I use Airline Flight Delays for?

Automating routine customer service inquiries during weather-related flight disruptions. Providing personalized entertainment to passengers during long airport waits. Intelligently routing complex passenger complaints to human specialists. Managing passenger rebooking and connection impact analysis in real-time.

How do I install Airline Flight Delays?

Install Airline Flight Delays by running: git clone https://github.com/chatwithsrini/AirlinesMCP && cd AirlinesMCP && pip install -r requirements.txt

What MCP clients work with Airline Flight Delays?

Airline Flight Delays works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Airline Flight Delays docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare