Claude Flight Search MCP Server
Click on "Install 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., "@Claude Flight Search MCP ServerFind flights from LAX to JFK on Dec 15"
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.
Claude Flight Search MCP Server
A Model Context Protocol (MCP) server that provides flight search capabilities for integration with Claude Desktop.
Features
✈️ Flight search between airports
🏢 Airport information lookup
📊 Price comparison across multiple dates
🔄 Mock data for development (easily replaceable with real APIs)
🛡️ Environment variable management for API keys
Related MCP server: Travel Assistant MCP
Quick Start
1. Clone and Setup
git clone <your-repo-url>
cd claude-flight-search-mcp
# Create and activate conda environment
conda env create -f environment.yml
conda activate claude-flight-mcp
# Alternative: Create environment manually
# conda create -n claude-flight-mcp python=3.11 -y
# conda activate claude-flight-mcp
# pip install -r requirements.txt2. Environment Configuration
Create a .env file in the project root:
# Optional: For real Amadeus API integration
AMADEUS_CLIENT_ID=your_amadeus_client_id
AMADEUS_CLIENT_SECRET=your_amadeus_client_secret3. Test the Server
# Test the server directly
python src/flight_search_server.py4. Configure Claude Desktop
Edit your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"flight-search": {
"command": "python",
"args": ["/full/path/to/claude-flight-search-mcp/src/flight_search_server.py"],
"cwd": "/full/path/to/claude-flight-search-mcp",
"env": {
"PYTHONPATH": "/full/path/to/claude-flight-search-mcp/src"
}
}
}
}Important: Replace /full/path/to/claude-flight-search-mcp with the actual absolute path to your project directory.
5. Restart Claude Desktop
Restart Claude Desktop to load the new MCP server.
Usage Examples
Once configured, you can ask Claude:
"Search for flights from LAX to JFK on December 15th"
"Find flights from London to Tokyo next week for 2 passengers"
"What's the airport information for SFO?"
"Compare flight prices from LAX to JFK over the next 7 days"
Available Tools
search_flights
Search for flights between airports with detailed results.
Parameters:
origin(required): Origin airport code (3-letter IATA code)destination(required): Destination airport code (3-letter IATA code)departure_date(required): Departure date in YYYY-MM-DD formatreturn_date(optional): Return date for round-trip flightspassengers(optional): Number of passengers (default: 1)
get_airport_info
Get detailed information about an airport.
Parameters:
airport_code(required): 3-letter IATA airport code
compare_flight_prices
Compare flight prices across multiple dates.
Parameters:
origin(required): Origin airport codedestination(required): Destination airport codestart_date(required): Start date for comparisondays_range(optional): Number of days to compare (default: 7)
Current Airport Database
The server currently includes information for:
LAX (Los Angeles International Airport)
JFK (John F. Kennedy International Airport)
LHR (London Heathrow Airport)
NRT (Narita International Airport)
Development
Adding Real Flight API Integration
Sign up for Amadeus for Developers
Get your API credentials
Add them to your
.envfileUncomment the Amadeus dependency in
requirements.txtReplace the mock data calls with real API calls
Adding More Airports
Edit the AIRPORT_DATABASE dictionary in src/flight_search_server.py to add more airports.
Running Tests
pytest tests/Code Formatting
black src/
flake8 src/Project Structure
claude-flight-search-mcp/
├── src/
│ └── flight_search_server.py # Main MCP server
├── tests/ # Test files
├── docs/ # Documentation
├── examples/ # Example configurations
├── requirements.txt # Python dependencies
├── .env.example # Environment variable template
├── .gitignore # Git ignore rules
└── README.md # This fileTroubleshooting
Server Not Connecting
Check that the path in your Claude Desktop config is correct
Ensure Python virtual environment is properly set up
Verify all dependencies are installed
Check Claude Desktop logs for error messages
Mock Data vs Real Data
The server currently uses mock flight data for development. To use real flight data, you'll need to:
Set up API credentials with a flight data provider
Implement the real API calls
Handle rate limiting and error responses
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
License
MIT License - see LICENSE file for details.
As-Built Documentation: Claude Flight Search MCP Server
Project: Flight Search Integration with Claude Desktop via Model Context Protocol (MCP)
Implementation Date: September 2-3, 2025
Version: 1.0.0
Status: Deployed with Partial Functionality
Executive Summary
Successfully implemented a Model Context Protocol (MCP) server that integrates flight search capabilities with Claude Desktop. The system includes Amadeus API integration, SQLite caching, price tracking, and intelligent fallback mechanisms. While API authentication is functional, flight search requests currently fall back to mock data, indicating parameter or endpoint configuration issues that require further investigation.
System Architecture
Overview
Claude Desktop ↔ MCP Protocol ↔ Flight Search Server ↔ Amadeus API
↓
SQLite Cache DatabaseComponents Implemented
1. MCP Server Framework
Language: Python 3.11
Framework: Anthropic MCP Server SDK
Communication: Standard I/O protocol
Deployment: Local conda environment
2. Flight Search Service
Primary API: Amadeus for Developers (Test Environment)
Fallback: Mock data generation
Cache: SQLite database with 1-hour TTL
Rate Limiting: Built-in via API quotas
3. Database Layer
Engine: SQLite (flight_cache.db)
Tables: flight_searches, price_tracking
Purpose: API response caching and price history
Technical Implementation
Core Technologies
Python: 3.11.13
MCP Framework: 1.13.1
HTTP Client: httpx 0.28.1
Environment Management: python-dotenv 1.1.1
Database: SQLite (built-in)
Deployment: Conda environment management
API Integration
Provider: Amadeus for Developers
Environment: Test (test.api.amadeus.com)
Authentication: OAuth2 Client Credentials
Rate Limit: 2,000 requests/month (free tier)
Token Management: Automatic refresh with 60-second safety margin
Supported Operations
search_flights: Individual flight searches with real-time pricing
find_best_price: Date range optimization across multiple days
get_airport_info: Airport details and metadata
compare_flight_prices: Price trends across date ranges
get_price_history: Historical pricing analysis (planned)
Configuration
Environment Variables
# API Credentials
AMADEUS_CLIENT_ID=WWVc2tHiHUvcsYq1eTiShAGqgTxpxolG
AMADEUS_CLIENT_SECRET=[REDACTED]
# Operational Settings
USE_REAL_API=true
API_FALLBACK_TO_MOCK=true
DEBUG=true
LOG_LEVEL=INFO
# Server Configuration
SERVER_NAME=flight-search
SERVER_VERSION=1.0.0Claude Desktop Integration
{
"mcpServers": {
"flight-search": {
"command": "D:\\ai\\conda\\envs\\claude-flight-mcp-3.11\\python.exe",
"args": ["D:\\AI\\Gits\\claude-flight-search-mcp\\src\\flight_search_server.py"],
"cwd": "D:\\AI\\Gits\\claude-flight-search-mcp",
"env": {
"PYTHONPATH": "D:\\AI\\Gits\\claude-flight-search-mcp\\src"
}
}
}
}Airport Database
Supported Airports (12 locations)
North America: LAX, JFK, SFO, IND, ATL, ORD, DEN, MIA
Europe: LHR, CDG, FRA
Africa: LOS
Asia: NRT, DXB
Airport Data Structure
{
"name": "Airport Name",
"city": "City",
"state": "State (if applicable)",
"country": "Country",
"timezone": "IANA timezone",
"iata": "3-letter code",
"icao": "4-letter code"
}Current Status
Functional Components ✅
MCP server initialization and protocol handling
Amadeus API authentication (OAuth2 token acquisition)
SQLite database creation and management
Airport database validation
Mock data generation and formatting
Claude Desktop integration via MCP protocol
Environment variable management
Error handling and logging
Diagnostics and health checking
Authentication Status ✅
Token Endpoint: Successfully authenticating with test.api.amadeus.com
Credentials: Valid 32-character Client ID and 16-character Secret
Token Lifecycle: Automatic refresh with 1799-second expiration
Headers: Proper Content-Type and Authorization formatting
Known Issues ❌
Flight Search API: Requests falling back to mock data despite successful authentication
Root Cause: Likely parameter formatting or endpoint configuration issues
Impact: All flight searches return $1,285 mock pricing instead of real market data
Routes Affected: Both domestic (LAX-JFK) and international (IND-LOS) routes
Data Quality
Mock Data: Realistic airline codes, routing via appropriate hubs
Price Simulation: Static $1,285 across all dates and routes
Expected Real Data: $700-900 range for IND-LOS based on market research
File Structure
claude-flight-search-mcp/
├── src/
│ ├── flight_search_server.py # Main MCP server (28,737 bytes)
│ └── flight_search_server_clean.py # Clean backup version
├── diagnostics.py # Comprehensive system diagnostics
├── .env # Environment configuration
├── .env.example # Template for environment setup
├── environment.yml # Conda environment specification
├── requirements.txt # Python dependencies
├── flight_cache.db # SQLite cache (auto-generated)
├── README.md # Project documentation
└── .gitignore # Git exclusionsAPI Endpoints Used
Authentication
URL:
https://test.api.amadeus.com/v1/security/oauth2/tokenMethod: POST
Headers:
Content-Type: application/x-www-form-urlencodedStatus: ✅ Working
Flight Search
URL:
https://test.api.amadeus.com/v2/shopping/flight-offersMethod: GET
Headers:
Authorization: Bearer {token},Content-Type: application/jsonStatus: ❌ Parameter or configuration issue
Parameters Sent
{
"originLocationCode": "IND",
"destinationLocationCode": "LOS",
"departureDate": "2024-09-26",
"adults": 1,
"max": 10,
"currencyCode": "USD"
}Performance Characteristics
Response Times
Authentication: ~500ms (cached for 30 minutes)
Mock Data Generation: ~100ms
Database Queries: <10ms
End-to-End Search: ~600ms (mock mode)
Resource Usage
Memory: ~50MB baseline
Storage: 50KB (cache database grows with usage)
API Quota: 0-3 calls per search (depending on date range)
Caching Strategy
Duration: 1 hour per search combination
Key Format:
{origin}_{destination}_{date}_{passengers}Invalidation: Time-based expiration only
Diagnostics and Monitoring
Health Check Results
Environment Check: ✅ All systems operational
Dependencies: ✅ All packages installed correctly
Configuration: ✅ Environment variables properly set
Server File: ✅ All components present and valid
API Authentication: ✅ Successfully obtaining tokens
Server Startup: ✅ All imports and initialization successful
Claude Integration: ✅ MCP protocol properly configuredLogging Implementation
Startup: Service initialization with configuration status
API Calls: Token requests and flight search attempts
Errors: Detailed error messages with context
Fallbacks: Clear indication when using mock data
Security Implementation
Credential Management
Environment variable isolation
No hardcoded secrets in source code
.gitignore protection for sensitive files
Test environment credentials only
Data Protection
Local SQLite database (no external data exposure)
No persistent storage of API responses beyond cache TTL
No personal data collection or retention
Testing and Validation
Test Coverage
Unit Tests: Basic functionality validation
Integration Tests: MCP protocol communication
API Tests: Authentication flow verification
End-to-End Tests: Claude Desktop interaction
Validation Methods
Manual flight searches via Claude interface
Diagnostics script comprehensive checking
Direct API credential testing via curl
Mock data fallback verification
Future Development Requirements
Immediate Priorities
Debug Flight Search API: Investigate parameter formatting and endpoint configuration
Error Handling: Implement specific error codes and user-friendly messages
Date Validation: Ensure proper date format and future date handling
Route Coverage: Verify test API route availability
Enhancement Opportunities
Real-time Price Alerts: Database-driven price monitoring
Multi-airline Aggregation: Additional API provider integration
Advanced Filtering: Cabin class, airline preferences, layover duration
Historical Analytics: Price trend analysis and prediction
Production Migration: Upgrade to production Amadeus API
Scalability Considerations
API Quota Management: Intelligent request batching and prioritization
Database Optimization: Indexing and query optimization
Caching Strategy: Redis migration for distributed caching
Load Balancing: Multiple API provider failover
Lessons Learned
Successful Patterns
MCP Integration: Standard I/O protocol handles Claude communication efficiently
Fallback Architecture: Mock data ensures service availability during API issues
Environment Management: Conda provides consistent dependency resolution
Diagnostics: Comprehensive health checking significantly reduced debugging time
Challenges Encountered
API Documentation: Amadeus test vs production endpoint differences
Date Handling: Timezone and format considerations for international routes
Error Context: Distinguishing between authentication and search failures
Development vs Production: Test environment limitations on route coverage
Technical Debt
Hard-coded Airport Database: Should migrate to external data source
Static Mock Data: Should reflect realistic price variations
Limited Error Handling: Needs more granular error classification
Manual Configuration: Claude Desktop config requires manual path updates
Conclusion
The Claude Flight Search MCP Server represents a functional proof-of-concept with strong architectural foundations. While the Amadeus API authentication is working correctly, the flight search functionality requires parameter debugging to transition from mock data to real pricing. The system demonstrates successful MCP protocol implementation and provides a solid foundation for a year-long development and testing initiative.
The implementation successfully proves the viability of integrating external APIs with Claude Desktop through the MCP protocol, establishing patterns for future API integrations and demonstrating the value of intelligent fallback mechanisms in maintaining service reliability.
Document Version: 1.0
Last Updated: September 3, 2025
Next Review: Upon resolution of flight search API issues
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/adeyholar/claude-flight-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server