mcp-flight-search
MCPフライト検索
モデルコンテキストプロトコル(MCP)を使用して構築されたフライト検索サービス。このサービスは、フライト検索機能のためのMCPツールの実装方法を示しています。
モデルコンテキストプロトコルとは何ですか?
モデルコンテキストプロトコル(MCP)は、Anthropicが開発した標準規格であり、ツールの説明、呼び出し、応答のための構造化されたフォーマットを定義することで、AIモデルがツールを利用できるようにします。このプロジェクトは、Claudeやその他のMCP互換モデルで使用できるMCPツールを実装します。
Related MCP server: Google-Flights-MCP-Server
インストール
# Install from PyPI
pip install mcp-flight-search
# Or install from the project directory (development mode)
pip install -e .使用法
MCP サーバーを起動します。
# Using the command-line entry point
mcp-flight-search --connection_type http
# Or run directly
python main.py --connection_type httpカスタム ポートを指定することもできます。
python main.py --connection_type http --port 5000環境変数
SerpAPI キーを環境変数として設定します。
export SERP_API_KEY="your-api-key-here"特徴
フライト検索機能のためのMCP準拠ツール
SerpAPI Googleフライトとの統合
片道・往復便に対応
構造化された出力による豊富なログ記録
モジュール化された保守可能なコード構造
MCPツール
このパッケージは、次のモデル コンテキスト プロトコル ツールを提供します。
search_flights_tool: パラメータを使用して空港間のフライトを検索します。origin: 出発空港コード(例:ATL、JFK)destination: 到着空港コード(例:LAX、ORD)outbound_date: 出発日(YYYY-MM-DD)return_date: 往復旅行の戻り日(オプション)(YYYY-MM-DD)
server_status: MCPサーバーが実行中かどうかを確認します
プロジェクト構造
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著者
AI/ML と生成 AI に関するその他の記事については、Medium でフォローしてください: https://medium.com/@arjun-prabhulal
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
Available Tools
2 toolssearch_flights_toolSearch flightsARead-only
Search Google Flights for one-way or round-trip flights between two airports.
Inputs: origin (required), destination (required), outbound_date (required), return_date. Returns: result
server_statusServer statusARead-only
Check that the flight search server is running.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools serve entirely distinct purposes: one performs a flight search, the other reports server health. There is no plausible way to confuse them, and the descriptions make the boundary explicit.
Both names are snake_case, but the convention is inconsistent: 'search_flights_tool' uses a redundant '_tool' suffix and a verb_verb_noun shape, while 'server_status' is a plain noun phrase. Readable, but the pattern isn't predictable.
Two tools is thin for a flight search server; the health-check tool arguably doesn't earn a slot as a first-class tool. It's a borderline-surface rather than an extreme mismatch.
Flight search is covered, but obvious adjacent operations are absent: airport/location lookup, date-range or fare-calendar search, multi-city itineraries, and filtering/sorting of results. An agent can do the core task but will hit dead ends on common follow-ups.
Maintenance
Related MCP Connectors
Search and compare flight offers through a cache-aware Streamable HTTP MCP server for AI agents.
Flight search MCP server providing search, pagination, and itinerary details for AI assistants.
Geo-based flight search MCP server. Find more flights between any two places on earth
Live flight prices and working booking links for AI agents and travel apps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that connects to Amadeus API, enabling AI assistants to search flights, analyze prices, find best travel deals, and plan multi-city trips.18 npm6MIT
- AlicenseNot gradedqualityNot gradedmaintenanceThis MCP server allows an AI assistants to search for flight information online using Google Flights. It can find flights for specific dates or search through a range of dates to find all options or just the cheapest ones available.27-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables flight searching, booking, and payment processing. It also provides access to resources like user profiles, pricing rules, and company travel policies.MIT
- FlicenseNot gradedqualityDmaintenanceAn interactive travel planning server that integrates flight searching, weather forecasting, and route calculation through external APIs like Amadeus and OpenWeather. It uses the Model Context Protocol to enable AI assistants to autonomously manage travel logistics and discover local services.-