MCP Flight Search logo

MCP Flight Search

by arjunprabhulal

A flight search service built with Model Context Protocol (MCP). This service demonstrates how to implement MCP tools for flight search capabilities.

View on GitHub

Last updated: N/A

What is MCP Flight Search?

MCP Flight Search is a flight search service built using the Model Context Protocol (MCP). It provides MCP-compliant tools that AI models like Claude can use to search for flights.

How to use MCP Flight Search?

First, install the package using pip: pip install mcp-flight-search. Then, start the MCP server using the command-line entry point: mcp-flight-search --connection_type http or directly with python main.py --connection_type http. Remember to set the SerpAPI key as an environment variable: export SERP_API_KEY="your-api-key-here".

Key features of MCP Flight Search

  • MCP-compliant tools

  • Integration with SerpAPI Google Flights

  • Support for one-way and round-trip flights

  • Rich logging with structured output

Use cases of MCP Flight Search

  • Integrating flight search into AI assistants

  • Building travel planning applications

  • Automated flight booking systems

  • Providing flight information to AI models via MCP

FAQ from MCP Flight Search

What is MCP?

The Model Context Protocol (MCP) is a standard developed by Anthropic that enables AI models to use tools by defining a structured format for tool descriptions, calls, and responses.

What is SerpAPI used for?

SerpAPI is used to access Google Flights data for flight search functionality.

What are the required parameters for the search_flights_tool?

The required parameters are origin, destination, and outbound_date. return_date is optional for round trips.

How do I set the SerpAPI key?

You need to set the SerpAPI key as an environment variable: export SERP_API_KEY="your-api-key-here".

What kind of license does this project use?

This project is licensed under the MIT License.