EgyptAir MCP Server

EgyptAir MCP Server

Enables safe interaction with EgyptAir's operational data for managing flights, bookings, and compensation requests.

Category
Visit Server

README

EgyptAir MCP Server

Overview

This project was developed as part of the Autonomous Agents – MCP Server Lab.

Our goal is to build a secure Model Context Protocol (MCP) server that allows an AI assistant to safely interact with EgyptAir's internal operational data without giving the language model direct access to the production database.

Instead of exposing SQL queries or shell commands, the server provides carefully designed business tools that perform validated and authorized operations.

The MCP server acts as a secure layer between the AI assistant and the database.

Architecture: LLM | ▼ MCP Client | ▼ EgyptAir MCP Server | ▼ SQLite Database

Company

EgyptAir is Egypt's national airline.

The company handles thousands of passenger bookings every day. Flight delays and cancellations often lead to customer compensation requests that must be reviewed by customer service employees and supervisors.

The objective of this project is to build an AI assistant that helps employees manage these operations safely through MCP.


Problem Statement

Without MCP, an LLM could generate arbitrary SQL queries directly against the production database, creating several risks:

  • Invalid SQL queries
  • Unauthorized data modification
  • Prompt injection attacks
  • Poor auditing
  • Difficult monitoring

Instead of giving the LLM direct database access, this project exposes controlled business operations through an MCP Server.

The server handles:

  • Authentication
  • Authorization
  • Validation
  • Business rules
  • Database operations

Project Structure

EgyptAir-MCP-Server/

│ ├── db/ │ ├── schema.sql │ ├── seed.sql │ ├── create_db.py │ ├── database.db │ ├── erd.mmd │ └── erd.png │ ├── mcp_server/ │ ├── app.py │ ├── server.py │ ├── database.py │ ├── config.py │ ├── authorization.py │ ├── validation.py │ ├── notifications.py │ └── tools/ │ ├── agent/ │ └── README.md


Database

SQLite was selected as the database engine because it is lightweight, portable, and easy to demonstrate during development.

The database contains the following entities:

  • Employees
  • Flights
  • Passengers
  • Bookings
  • CompensationRequests
  • Policies
  • Reports

The complete Entity Relationship Diagram is available inside:

db/erd.png


Current MCP Tools

Tool Type Purpose
get_flight_status Read Retrieve flight status
get_booking_details Read Retrieve booking information
get_compensation_policy Read Read compensation policy
submit_compensation_request Write Create a new compensation request
approve_compensation Write Approve or reject compensation
generate_disruption_report Read Generate disruption report
draft_passenger_email Read Draft passenger email

Tool Classification

Read Tools

Read tools only retrieve information and do not modify database state.

Examples:

  • get_flight_status
  • get_booking_details
  • get_compensation_policy
  • generate_disruption_report
  • draft_passenger_email

Write Tools

Write tools modify database information and require additional protection.

Examples:

  • submit_compensation_request
  • approve_compensation

Defensive Tool Design

Write tools are designed using secure business operations instead of exposing SQL queries to the LLM.

Security measures include:

  • Parameterized SQL queries
  • Server-side validation
  • Authorization checks
  • Business rule validation
  • Structured responses

The LLM only interacts with predefined MCP tools and never executes raw SQL commands.


Validation

Validation is performed independently from MCP input schemas.

Examples:

  • Verify booking exists
  • Verify flight is eligible for compensation
  • Verify requested amount is valid
  • Verify compensation request exists
  • Verify request is still pending before approval

Authorization

Only authorized employees can execute sensitive write operations.

Example:

  • Customer Service → Submit compensation requests
  • Supervisor / Manager → Approve compensation requests

Authorization is performed inside the MCP tool handler before any database modification.


Implemented Issue: Secure Compensation Approval Workflow

Issue

The approve_compensation tool was a high-risk write operation because it directly modified compensation requests.

The missing requirements were:

  • Human confirmation before approval
  • MCP notification after state changes
  • Protection against accidental database updates

Solution 1: MCP Elicitation

Problem

Before implementation, the approval process updated the database immediately after authorization checks.

This could allow accidental approval of compensation requests.


Implementation

MCP Elicitation was added before the database update.

The workflow became:

Manager | approve_compensation() | Authorization Check | Request Validation | MCP Elicitation | User Confirmation | Database Update

The server asks the user for confirmation:

Example:

Are you sure you want to approve this compensation request?

Request ID: 8

Amount: $350

If the user confirms:

  • Status becomes Approved
  • approved_by is stored

If the user rejects:

  • The operation is cancelled
  • No database modification occurs

This ensures sensitive operations require explicit human approval.


Solution 2: MCP tools/list_changed Notification

Problem

After changing compensation status, connected clients needed a way to know that the server state had changed.


Implementation

After successful compensation processing, the server sends:

notifications/tools/list_changed

This allows MCP clients to refresh their available information and stay synchronized with server changes.


Implemented Issue: MCP Progress Tracking

Problem

The generate_disruption_report tool performs multiple database operations and may take time.

Previously, the client had no information about the current execution state.


Solution

MCP progress notifications were added.

The report generation now provides updates:

10% Starting report generation

30% Counting delayed flights

60% Counting cancelled flights

90% Calculating statistics

100% Report completed

After reaching 100%, the server returns the final report:

Contains:

  • Delayed flights
  • Cancelled flights
  • Average delay
  • Affected passengers

This improves user experience during long-running operations.


Current Progress

The following components have been completed:

  • Project planning
  • Company selection
  • Problem definition
  • Database schema
  • Seed data
  • SQLite database
  • ERD
  • MCP Server initialization
  • Database connection layer
  • Configuration module
  • Validation module
  • Authorization module
  • Initial MCP tools
  • Secure compensation approval workflow
  • MCP Elicitation
  • MCP tools/list_changed notification
  • MCP Progress Tracking

Remaining Work

The following protocol features are still under development:

  • Capability Negotiation
  • Resources
  • Prompts
  • Sampling
  • Streamable HTTP Transport
  • Agent Integration
  • Final Demonstration

Technologies

  • Python
  • SQLite
  • FastMCP
  • Model Context Protocol (MCP)
  • LangChain (planned)
  • JSON Schema

Team

  • Marwan Ahmed
  • Ahmed Ashraf
  • Youssef Hatem

Note: This README represents the current development stage. Additional protocol features will be added as

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
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