# Mcp Flight Search

> MCP Server implementation for the Model Context Protocol (MCP) enabling AI tool usage - Realtime Flight Search

- **Type:** MCP server
- **Install:** `agentstack add mcp-arjunprabhulal-mcp-flight-search`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [arjunprabhulal](https://agentstack.voostack.com/s/arjunprabhulal)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [arjunprabhulal](https://github.com/arjunprabhulal)
- **Source:** https://github.com/arjunprabhulal/mcp-flight-search
- **Website:** https://pypi.org/project/mcp-flight-search/

## Install

```sh
agentstack add mcp-arjunprabhulal-mcp-flight-search
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Flight Search

  

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

## What is Model Context Protocol?

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. This project implements MCP tools that can be used by Claude and other MCP-compatible models.

## Installation

```bash
# Install from PyPI
pip install mcp-flight-search

# Or install from the project directory (development mode)
pip install -e .
```

## Usage

Start the MCP server:

```bash
# Using the command-line entry point
mcp-flight-search --connection_type http

# Or run directly
python main.py --connection_type http
```

You can also specify a custom port:
```bash
python main.py --connection_type http --port 5000
```

## Environment Variables

Set the SerpAPI key as an environment variable:
```bash
export SERP_API_KEY="your-api-key-here"
```

## Features

- MCP-compliant tools for flight search functionality
- Integration with SerpAPI Google Flights
- Support for one-way and round-trip flights
- Rich logging with structured output
- Modular, maintainable code structure

## MCP Tools

This package provides the following Model Context Protocol tools:

- `search_flights_tool`: Search for flights between airports with parameters:
  - `origin`: Departure airport code (e.g., ATL, JFK)
  - `destination`: Arrival airport code (e.g., LAX, ORD)
  - `outbound_date`: Departure date (YYYY-MM-DD)
  - `return_date`: Optional return date for round trips (YYYY-MM-DD)

- `server_status`: Check if the MCP server is running

## Project Structure

```
mcp-flight-search/
├── mcp_flight_search/
│   ├── __init__.py              # Package initialization and exports
│   ├── config.py                # Configuration variables (API keys)
│   ├── models/
│   │   ├── __init__.py          # Models package init
│   │   └── schemas.py           # Pydantic models (FlightInfo)
│   ├── services/
│   │   ├── __init__.py          # Services package init
│   │   ├── search_service.py    # Main flight search logic
│   │   └── serpapi_client.py    # SerpAPI client wrapper
│   ├── utils/
│   │   ├── __init__.py          # Utils package init
│   │   └── logging.py           # Logging configuration
│   └── server.py                # MCP server setup and tool registration
├── main.py                      # Main entry point
├── pyproject.toml               # Python packaging configuration
├── LICENSE                      # MIT License
└── README.md                    # Project documentation
```

## Author

For more articles on AI/ML and Generative AI, follow me on Medium: https://medium.com/@arjun-prabhulal

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [arjunprabhulal](https://github.com/arjunprabhulal)
- **Source:** [arjunprabhulal/mcp-flight-search](https://github.com/arjunprabhulal/mcp-flight-search)
- **License:** MIT
- **Homepage:** https://pypi.org/project/mcp-flight-search/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-arjunprabhulal-mcp-flight-search
- Seller: https://agentstack.voostack.com/s/arjunprabhulal
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
