Labsco
random-robbie logo

Flight Search

โ˜… 2

from random-robbie

Search for flights using the SerpAPI Google Flights engine.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Flight Search MCP Server

A reliable Model Context Protocol (MCP) server for searching flights using the SerpAPI Google Flights engine. This server provides real-time flight search capabilities for both one-way and round-trip flights. Works well with claude ai desktop

โœˆ๏ธ Features

  • Real-time flight search using SerpAPI Google Flights
  • One-way and round-trip flight support
  • Multiple flight options with pricing, timing, and airline details
  • JSON-RPC 2.0 compliant MCP protocol implementation
  • Easy integration with Claude and other MCP clients
  • Robust error handling and logging

๐Ÿ”ง Development

Running Tests

Test the server directly:

# Set environment variable
export SERP_API_KEY="your_api_key"

# Run the server  
python3 flight_search_server.py --connection_type stdio

Protocol Testing

The server implements JSON-RPC 2.0 and supports these methods:

  • initialize - Initialize the MCP connection
  • tools/list - List available tools
  • tools/call - Execute a tool
  • ping - Health check
  • notifications/initialized - Initialization notification

Logging

The server logs to stderr for debugging:

# View logs while running
python3 flight_search_server.py --connection_type stdio 2>debug.log

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Development Setup

# Clone the repo
git clone https://github.com/yourusername/flight-search-mcp.git
cd flight-search-mcp

# Install dependencies
pip install requests

# Run tests
python3 test_mcp_protocol.py
python3 test_flight_search.py

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • SerpAPI for providing the Google Flights API
  • Anthropic for the MCP protocol specification
  • The open-source community for inspiration and feedback

๐Ÿ“ž Support


Made with โค๏ธ for the MCP community