mcpField
M
MCP Flight Search

MCP Flight Search

Local
pypi.orgSearch44Updated 2w ago

About MCP Flight Search

MCP server for Claude, Cursor, and other MCP clients to search Google Flights through SerpApi. It returns structured details for one-way and round-trip flights.

Key features

  1. 01Search flights by IATA airport code
  2. 02One-way and round-trip searches
  3. 03Return prices, durations, stops, and times
  4. 04Check server status and version

Use cases

  1. 01Compare flight options between two airports
  2. 02Check fares and journey details for travel dates

MCP support

Exposes flight search and server status tools to MCP clients. Runs over stdio by default or Streamable HTTP.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"flight-search": {
"command": "uvx",
"args": [
"mcp-flight-search"
],
"env": {
"SERP_API_KEY": "<SERP_API_KEY>"
}
}
}
}
Run commanduvx mcp-flight-search
Environment variables to set
SERP_API_KEYSecretYour SerpApi key (serpapi.com)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-flight-search0.3.0

Tools

2

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
originstringYesIATA airport code, such as JFK or LAX
destinationstringYesIATA airport code, such as JFK or LAX
return_dateanyNoReturn date for a round trip, YYYY-MM-DD
outbound_datestringYesDeparture date, YYYY-MM-DD

Details

From the project README

MCP Flight Search

An MCP server that searches Google Flights through SerpApi, for Claude, Cursor and other MCP clients. One-way and round-trip searches by IATA airport code, with prices, durations, stops and times.

CI PyPI

Requirements

  • Python 3.10 or later (or uv)
  • A SerpApi key in SERP_API_KEY (serpapi.com has a free tier)

Use it from an MCP client

Add it to your client's MCP configuration (Claude Desktop, Claude Code, Cursor, ...):

{
  "mcpServers": {
    "flight-search": {
      "command": "uvx",
      "args": ["mcp-flight-search"],
      "env": { "SERP_API_KEY": "your-serpapi-key" }
    }
  }
}

Or install it with pip install mcp-flight-search and use "command": "mcp-flight-search".

Run it yourself

export SERP_API_KEY="your-serpapi-key"
mcp-flight-search                                    # stdio (default)
mcp-flight-search --connection_type http --port 3001 # Streamable HTTP at http://127.0.0.1:3001/mcp

LOG_LEVEL=DEBUG shows more detail on stderr. The API key is never logged.

With Docker:

docker build -t mcp-flight-search .
docker run -i --rm -e SERP_API_KEY=your-serpapi-key mcp-flight-search

Tools

ToolWhat it does
search_flights_toolFlights between two airports. origin, destination: IATA codes such as ATL, LAX. outbound_date: YYYY-MM-DD. return_date (optional): YYYY-MM-DD for a round trip. Returns structured results: airline, price (USD), duration, stops, departure, arrival, cabin class.
server_statusChecks the server is running and reports its version.

Development

uv sync
uv run pytest
uv run ruff check .

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.