mcp-flight-search
by arjunprabhulal·★ 42·综合分 36
Python MCP 服务器,使用 SerpAPI 提供航班搜索工具,支持单程和往返航班查询。
ai-llmtravelsearch
21
Forks
0
活跃 Issue
14 个月前
最近提交
2 天前
收录于
概述
MCP Flight Search 是一个使用 Model Context Protocol 构建的 Python 实现,通过 SerpAPI 提供实时航班搜索功能。该服务器提供两个主要工具:'search_flights_tool' 用于搜索机场之间的航班,支持出发地、目的地和日期参数;'server_status' 用于检查服务器运行状态。代码结构模块化,包含模型、服务和工具等清晰的分层设计。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
你:需要实时航班信息的旅行助手
你:与预订系统集成的 AI 聊天机器人
你:需要在 Claude Desktop 中使用航班搜索功能的用户
你:航班搜索使用哪个 API?
你:可以自定义服务器端口吗?
什么时候选它
如果您需要将实时航班搜索功能集成到使用模型上下文协议的 AI 应用程序中,请选择此 MCP 服务器。
什么时候不要选它
如果您需要航班预订功能(仅搜索)、对 SerpAPI 有 API 配额限制,或需要离线功能,请不要选择它。
此 server 暴露的工具
从 README 抽取出 2 个工具search_flights_toolorigin: str, destination: str, outbound_date: str, return_date: str | None = NoneSearch for flights between airports with optional return date
server_statusCheck if the MCP server is running
可对比工具
mcp-travel-toolsserpapi-mcpamadeus-mcpskyscanner-api-mcp
安装
安装软件包:
pip install mcp-flight-search启动 MCP 服务器:
mcp-flight-search --connection_type http对于 Claude Desktop 集成,添加到您的 Claude Desktop 配置中:
{
"mcpServers": {
"flight-search": {
"command": "mcp-flight-search",
"args": ["--connection_type", "http"],
"env": {
"SERP_API_KEY": "your-api-key-here"
}
}
}
}设置 SerpAPI 密钥作为环境变量:
export SERP_API_KEY="your-api-key-here"FAQ
- 航班搜索使用哪个 API?
- 服务器使用 SerpAPI Google Flights 提供实时航班搜索功能。
- 可以自定义服务器端口吗?
- 是的,可以使用 --port 参数自定义端口:'python main.py --connection_type http --port 5000'
mcp-flight-search 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。