flight
flight
一个基于 SerpApi 的 MCP 服务器,提供航班搜索和 Google Flights 路线查询工具。
工具
search_flights (flight.py)
通过 Google Flights 搜索航班。
参数 | 类型 | 说明 |
| str | 3 字母出发机场代码(例如 |
| str | 3 字母到达机场代码(例如 |
| str | 出发日期, |
| str | None | 返回日期, |
| str | 货币代码,默认为 |
get_directions (map.py)
通过 Google Maps 获取两个地点之间的路线和路径信息。
参数 | 类型 | 说明 |
| str | 起始地址或地点名称 |
| str | 目的地地址或地点名称 |
| str | 以下之一: |
Related MCP server: Google Flights MCP Server
设置
需要 Python 3.13+ 和 SerpApi API 密钥。
uv sync将你的 API 密钥添加到 .env:
SERPAPI_API_KEY="your-key-here"运行
每个工具都是独立的 MCP 服务器,通过 stdio 运行:
uv run flight.py
uv run map.py将兼容 MCP 的客户端(例如 Claude Desktop)指向这些脚本,即可使用这些工具。
Available Tools
1 toolsearch_flightsA
Search for flights using Google Flights via SerpApi.
Args: departure_id: 3-letter departure airport code (e.g. AUS) arrival_id: 3-letter arrival airport code (e.g. JFK) outbound_date: departure date in YYYY-MM-DD format return_date: return date in YYYY-MM-DD format (omit for one-way) currency: currency code, defaults to USD
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | USD | |
| arrival_id | Yes | ||
| return_date | No | ||
| departure_id | Yes | ||
| outbound_date | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description is the sole source of behavioral context. It conveys that the tool uses Google Flights via SerpApi, implying a remote read-only search operation. However, it doesn't disclose potential rate limits, result format expectations, or edge cases such as airport code validation, so some behavior is left implied.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the core intent, followed by a precise argument list. No filler or redundancy; each line contributes necessary semantic value. The structure makes it easy for an agent to quickly parse and use.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter flight search tool, the description is highly complete: all parameter constraints and defaults are covered, and an output schema is present to cover return values. It misses only minor non-critical details such as potential downstream API limitations, but not enough to significantly confuse an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully clarify parameters. It does so well: lists each argument with format examples and defaults, clarifies that return_date being omitted means one-way, and explains currency defaults to USD. This is far more helpful than the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Search for flights') and names the resource (Google Flights via SerpApi). Although there are no sibling tools to differentiate, the verb+resource+integration context makes the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: whenever flight search is needed. It provides clear context through operational details like omit return_date for one-way trips, but does not explicitly mention alternatives or exclusions. With no siblings, this is acceptable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
search_flights
TDQS
Scored across 1 tool
With only a single tool, there is no ambiguity whatsoever. The tool's purpose is clearly distinct by virtue of being the only one.
The single tool name 'search_flights' follows a clear verb_noun convention, and consistency is trivially satisfied with just one name.
Having only one tool for a flight-related server is too few. While the search functionality is useful, a typical flight service would expect additional operations like booking, cancellation, or flight status, making this feel extremely minimal for the apparent domain.
The tool surface is severely incomplete for the flight domain—it only covers searching. There are no tools for selecting, booking, modifying, or canceling flights, which are obvious core operations, leading to significant gaps that would cause agent failures in real workflows.
Maintenance
Related MCP Connectors
Give AI assistants access to real-time data. Search the web, compare flights, find hotels, and more.
Search award flights and cash fares, optimize points, and predict fares inside ChatGPT and Claude.
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Google SERP, Maps, Shopping, News and AI-answer data for AI agents, from the Searlo search API.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables searching across multiple search engines (Google, Bing, YouTube, DuckDuckGo, etc.) and retrieving parsed search results via SerpApi integration.-
- AlicenseAqualityFmaintenanceConnects AI agents to Google Flights data, enabling retrieval of flight information, cheapest options, time-filtered flights, and best recommendations.430MIT
- FlicenseNot gradedqualityDmaintenanceEnables flight search and date parsing using Amadeus API and Google Gemini, with natural language understanding.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search for real-time flights between airports using the SearchAPI.io Google Flights API, returning prices, schedules, airlines, and carbon emissions.-