Google Flights MCP server

Leverages the fast-flights API to enable advanced flight search and travel planning capabilities, providing tools for searching one-way and round-trip flights, retrieving airport information, and generating travel recommendations.
Back to servers
Provider
salamentic
Release date
Mar 06, 2025
Language
Python
Stats
1 star

This MCP server creates travel agent-level flight plans using the fast-flights API, offering capabilities like searching for flights, creating comprehensive travel plans, and retrieving airport code information.

Installation

Make sure you have the following prerequisites before installing:

  • Python 3.10 or higher
  • pip package manager

Install the required packages:

pip install mcp fast-flights

Running the Server

Start the flight planner server with a simple command:

python flight_planner_server.py

Integration with Claude Desktop

Setup Steps

  1. Download and install Claude Desktop

  2. Locate or create the Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the flight-planner server configuration to the file:

{
  "mcpServers": {
    "flight-planner": {
      "command": "python",
      "args": [
        "/PATH/TO/flight_planner_server.py"
      ],
      "env": {
        "PYTHONPATH": "/PATH/TO/PROJECT"
      }
    }
  }
}
  1. Replace /PATH/TO/ with the actual path to your server file
  2. Restart Claude Desktop to apply the changes

Testing with MCP Inspector

For testing purposes, you can use the MCP Inspector tool:

# Install the inspector
npm install -g @modelcontextprotocol/inspector

# Run the inspector with your server
npx @modelcontextprotocol/inspector python flight_planner_server.py

Available Functionality

Tools

  • search_one_way_flights: Find one-way flights between airports
  • search_round_trip_flights: Find round-trip flights between airports
  • create_travel_plan: Generate a comprehensive travel plan based on parameters

Resources

  • airport_codes://{query}: Look up airport code information based on a search query

Prompt Templates

  • flight_search_prompt: Template for searching flights
  • travel_plan_prompt: Template for creating comprehensive travel plans

Example Queries

After integration with Claude Desktop, you can ask questions like:

  • "What flights are available from NYC to SFO on 2025-04-15?"
  • "Can you create a travel plan for my business trip from LAX to TPE from 2025-05-01 to 2025-05-08?"
  • "Help me find airport codes for Tokyo."
  • "What's the best time to book flights from Boston to London for a summer vacation?"

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later