mcp-gemini-search
Model Context Protocol (MCP) with Gemini 2.5 Pro. Convert conversational queries into flight searches using Gemini's function calling capabilities and MCP's flight search tools
claude mcp add --transport stdio arjunprabhulal-mcp-gemini-search python -m mcp_flight_search.server \ --env SERP_API_KEY="YOUR_SERPAPI_KEY" \ --env GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
How to use
This MCP server demonstrates how to use Gemini 2.5 Pro with function calling to drive the mcp-flight-search tool via the Model Context Protocol (MCP). The client launches the MCP server process for flight searching, communicates over stdio, and lets Gemini automatically extract the required function parameters from natural language queries. You can ask it to find flights between two cities on a given date, and the server will call the appropriate MCP tool, fetch results from SerpAPI, and return a formatted JSON payload of flight options. This setup is designed to show end-to-end integration: Gemini handles natural language understanding and function calling, the MCP server executes the flight search, and the results are presented in a structured, easy-to-consume format.
How to install
Prerequisites:
- Python 3.7+
- pip (Python package installer)
- Access to Gemini API (Gemini API key) and a SerpAPI key
Install steps:
-
Clone the repository: git clone https://github.com/arjunprabhulal/mcp-gemini-search.git cd mcp-gemini-search
-
(Optional) Create a virtual environment: python -m venv venv
On Windows: venv\Scripts\activate
On macOS/Linux: source venv/bin/activate
-
Install Python dependencies: pip install -r requirements.txt
-
Install the MCP flight search tool (already referenced in the project): pip install mcp-flight-search
-
Ensure environment variables are set (will be read by the server): export GEMINI_API_KEY="YOUR_GEMINI_API_KEY" export SERP_API_KEY="YOUR_SERPAPI_API_KEY"
-
Run the MCP flight search server (this starts the MCP server process that the client will connect to): python -m mcp_flight_search.server
-
In another terminal, run the client to interact with Gemini and the MCP server as described in the README.
Additional notes
Notes and tips:
- Ensure GEMINI_API_KEY and SERP_API_KEY are valid and have the required permissions for Gemini function calling and SerpAPI access.
- The server process communicates via stdio; make sure no other process binds to the same stdio channel.
- If you encounter tool registration or function calling errors, double-check that the mcp-flight-search tool is properly installed and exposes the expected functions to MCP.
- You can customize the environment by adding any additional API keys or config options required by your deployment environment, and pass them in the env block of mcp_config.
- If you run into network or API rate limit issues, consider scheduling queries or caching frequent flight search results where appropriate.
Related MCP Servers
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
git
An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management, and more, via the MCP standard. STDIO & HTTP.
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
openapi
OpenAPI definitions, converters and LLM function calling schema composer.
HydraMCP
Connect agents to agents. MCP server for querying any LLM through your existing subscriptions: compare, vote, and synthesize across GPT, Gemini, Claude, and local models from one terminal.
local-history
MCP server for accessing VS Code/Cursor's Local History