PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serverstravel-and-transportationMCP实时航班搜索
返回「travel-and-transportation」

MCP实时航班搜索

modelscope·@arjunprabhulal/mcp-flight-search

travel-and-transportation0下载LocalModelScope

简介

模型上下文协议服务器可以通过简单提示,实时搜索任意给定日期的航班详情,包括多家航空公司、价格、经停信息和飞行时长。

MCP Server 详情

来自 ModelScope 索引

MCP 航班搜索

<a href="https://glama.ai/mcp/servers/@arjunprabhulal/mcp-flight-search"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@arjunprabhulal/mcp-flight-search/badge" /> </a>

这是一个使用模型上下文协议(MCP)构建的航班搜索服务。该服务展示了如何实现MCP工具以提供航班搜索功能。

什么是模型上下文协议?

模型上下文协议 (MCP) 是由Anthropic开发的一个标准,它通过定义工具描述、调用和响应的结构化格式来使AI模型能够使用工具。这个项目实现了可以被Claude和其他兼容MCP的模型使用的MCP工具。

安装

# 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 Flights集成
  • 支持单程和往返航班
  • 丰富的日志记录,具有结构化输出
  • 模块化、易于维护的代码结构

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文件。

相关 MCP Servers(来自「travel-and-transportation」)

12306-MCP车票查询工具

基于Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。

@Joooook/12306-mcp

韩国旅游API

通过韩国旅游组织的官方API,使人工智能助手能够获取韩国旅游信息,提供对景点、活动、美食和住宿的全面搜索,并支持多语言。

@harimkang/mcp-korea-tourism-api

民宿搜索

搜索Airbnb房源并获取有关特定房产的详细信息。通过结构化数据轻松规划您的下一次旅行,无需API密钥,同时遵守Airbnb的准则。

@openbnb-org/mcp-server-airbnb

variflight

暂无描述。

@variflight/variflight-mcp

opspawn

暂无描述。

@opspawn/Google-Flights-MCP-Server

国家公园数据助手

便于使用国家公园管理局(NPS)API检索国家公园服务数据,允许用户按州列出国家公园并获取特定公园的详细信息。

@amysatterlee/nps_mcp

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/arjunprabhulal-mcp-flight-search/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

# Install from PyPI pip install mcp-flight-search # Or install from the project directory (development mode) pip install -e .

基本信息

分类
travel-and-transportation / search
运行方式
No
许可证
MIT License
详情文件
arjunprabhulal-mcp-flight-search.md