flight-mcp
With this MCP server, you can search, inspect, book, retrieve, and cancel purely simulated flights in a local SQLite demo database—not real airline bookings.
Search fictional flights by origin, destination, and date, with optional filters for airline, max price, and preferred time.
Get complete details for a specific demo flight by flight ID.
Check current seat availability for a demo flight.
Create a simulated booking after explicit user confirmation, using passenger name, email, phone, and optional seat number.
Retrieve a simulated booking by its reference code (e.g., FLM-XXXXXX).
Cancel a simulated booking and restore its seat inventory.
Provides flight search, flight details, seat availability, and simulated booking management through a local SQLite database.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flight-mcp Find me flights from London to Tokyo on 2026-08-01 and check the seat availability."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
✈️ Flight MCP Server — SQLite Demo
A fully functional Model Context Protocol (MCP) demonstration server providing simulated flight search and booking capabilities.
SIMULATION ONLY: All flights, inventory, and bookings in this system are purely simulated using fictional/sample data. This project DOES NOT integrate with any real airline APIs and DOES NOT book real flights.
What is the Project?
This project is a clean, modular Python application designed to teach the fundamentals of the Model Context Protocol (MCP). It acts as a local backend server that seamlessly connects to Claude Desktop, granting the AI safe, controlled access to a local SQLite database for exploring and booking demo flights.
Related MCP server: SQLite MCP Server
What is MCP?
The Model Context Protocol (MCP) is an open standard that allows AI models (like Claude) to securely connect to local or remote data sources, tools, and services. Instead of the LLM guessing or hallucinating data, MCP allows it to query a deterministic backend system.
Architecture
The system architecture follows a clean, layered approach:
Claude Desktop (Client)
↓ (stdio JSON-RPC)
Python Flight MCP Server
↓
Services Layer (Business Logic)
↓
SQLite Database (Data Store)Technology Stack
Language: Python 3.11+
Package Manager:
uvFramework: Official MCP Python SDK (
mcp)Database: SQLite (local file)
Client: Claude Desktop
Six Available Tools
The server exposes exactly six robust MCP tools to the AI:
search_flights: Find available flights by origin, destination, and date.get_flight: Retrieve full details and metadata for a specific flight.check_seats: Query live seat availability for a flight.book_flight: Create a new simulated booking (requires user confirmation).get_booking: Retrieve details of an existing booking via a PNR reference.cancel_booking: Cancel a booking and restore seat inventory.
SQLite Demo Database
The system uses a local SQLite database (data/flightmcp.db) to store flight inventory and booking states.
Note: The actual .db file is excluded from version control to prevent stale state issues.
To initialize the database with fresh demo data, run:
uv run python scripts/seed_database.pyInstallation & Setup
Ensure you have uv installed, then sync the dependencies:
uv syncRunning the Tests
The project includes a robust pytest suite for backend verification.
uv run pytestRunning the MCP Server
To manually verify the server starts correctly (it will block and wait for stdio communication):
uv run flight-mcp(Application logs are strictly routed to stderr to maintain clean MCP protocol output on stdout.)
Configuring Claude Desktop
To connect this MCP server to Claude Desktop, edit your Claude Desktop configuration file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS).
Claude Desktop Configuration Example:
{
"mcpServers": {
"flight-mcp": {
"command": "/opt/homebrew/bin/uv",
"args": [
"run",
"--directory",
"/Users/baratharjun/Desktop/medai",
"flight-mcp"
],
"cwd": "/Users/baratharjun/Desktop/medai"
}
}
}Note: Adjust the absolute paths to match your local project directory and uv installation path.
Example Tool Usage
Once connected in Claude Desktop, you can interact naturally:
User: "Find me a flight from Chennai to Delhi on 2026-09-05."
Claude calls search_flights and reads the SQLite database.
User: "How many seats are left on flight 1?"
Claude calls check_seats.
User: "I want to book flight 1. My name is Test User, email is test@example.com, phone 9999999999." Claude summarizes the request and explicitly asks for confirmation.
User: "Confirmed."
Claude calls book_flight and returns the fictional booking reference (e.g., FLM-XXXXXX).
Available Tools
6 toolsbook_flightA
Create a simulated flight booking in the local SQLite database. This does NOT purchase a real airline ticket or process payment. Use this ONLY after receiving explicit user confirmation to book.
Inputs: flight_id (required), passenger_name (required), passenger_email (required), passenger_phone (required), +1 more.
cancel_bookingB
Cancel a simulated booking and restore the seat availability.
Inputs: booking_reference (required).
check_seatsB
Check currently available seats for a demo flight.
Inputs: flight_id (required).
get_bookingA
Retrieve a simulated booking by its reference code (e.g. FLM-XXXXXX).
Inputs: booking_reference (required).
get_flightA
Retrieve complete information for one fictional flight by its ID.
Inputs: flight_id (required).
search_flightsB
Search the local sample flight inventory. This tool returns fictional/demo flight options and is not connected to live airline availability.
Inputs: date (required), origin (required), destination (required), airline, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool addresses a distinct resource and action: flight search, flight detail, seat availability, booking creation, booking retrieval, and booking cancellation. There is no ambiguity between tool purposes.
All tool names follow a consistent snake_case verb_noun pattern (search_flights, get_flight, check_seats, book_flight, get_booking, cancel_booking). Naming is uniform and predictable.
With 6 tools covering search, inspection, seat checking, booking, retrieval, and cancellation, the count is well-scoped for a demo flight booking server. Each tool earns its place without excess.
The core booking lifecycle is covered (search, read, book, retrieve, cancel). Minor gaps exist, such as no update booking or list bookings, but these are not critical for the demo scope and agents can work around them.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides Claude Desktop with secure access to multiple database connections, allowing users to query MySQL, PostgreSQL, SQLite, and SQL Server databases directly through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language interaction with local SQLite databases through Claude Desktop, translating plain English queries into SQL for data analysis and exploration.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of SAP flight data (airlines, flights, bookings) using Claude Code, with 19 tools for model introspection, SQL queries, and analytics.1-
- FlicenseNot gradedqualityDmaintenanceEnables querying and managing a CRM database through natural language conversations with Claude Desktop.-