Gemini Function Calling + MCP Flight Search logo

Gemini Function Calling + MCP Flight Search

by arjunprabhulal

This project demonstrates how to use Google's Gemini 2.5 Pro with function calling capabilities to interact with the `mcp-flight-search` tool via Model Context Protocol (MCP). It allows users to search for flights using natural language prompts.

View on GitHub

Last updated: N/A

What is Gemini Function Calling + MCP Flight Search?

This project is a client implementation that integrates Google's Gemini 2.5 Pro with the mcp-flight-search tool using Model Context Protocol (MCP). It enables natural language flight searches by leveraging Gemini's function calling capabilities to extract parameters and execute searches via the MCP tool.

How to use Gemini Function Calling + MCP Flight Search?

To use this project, clone the repository, install the dependencies (including mcp-flight-search), set the environment variables for your Gemini and SerpAPI keys, and then run the client.py script. The script will start the MCP flight search server, send your query to Gemini, extract search parameters, execute the search, and display the formatted results.

Key features of Gemini Function Calling + MCP Flight Search

  • Natural language flight search using Gemini 2.5 Pro

  • Automatic parameter extraction via function calling

  • Integration with mcp-flight-search tool via stdio

  • Formatted JSON output of flight results

Use cases of Gemini Function Calling + MCP Flight Search

  • Building conversational flight booking applications

  • Integrating natural language search into travel platforms

  • Automating flight search workflows using AI

  • Demonstrating the capabilities of Gemini's function calling with MCP

FAQ from Gemini Function Calling + MCP Flight Search

What is Gemini 2.5 Pro?

Gemini 2.5 Pro is Google's advanced AI model with function calling capabilities.

What is Model Context Protocol (MCP)?

MCP is a protocol for communication between AI models and external tools.

What is mcp-flight-search?

mcp-flight-search is a flight search service built with MCP that uses SerpAPI to fetch flight data.

What API keys do I need?

You need a Google AI Studio API key for Gemini and a SerpAPI key.

Where can I find the mcp-flight-search tool?

The mcp-flight-search tool is available on GitHub at arjunprabhulal/mcp-flight-search and on PyPI at mcp-flight-search