Token导航 LogoToken导航TokenDH.com
MCP Flight Search logo
搜索检索stdio官方级别未说明来源级核验

MCP Flight Search

MCP Server

Flight search service using Model Context Protocol (MCP) tools

工具数

2

提示词数

0

GitHub Stars

42

资源数

0
PythonClaude搜索Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

arjunprabhulal

提供方

arjunprabhulal

最后核验

2026/5/18 02:16

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install mcp-flight-search

详细介绍

MCP航班搜索

使用模型上下文协议(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谷歌航班集成
  • 支持单程和往返航班
  • 具有结构化输出的丰富日志记录
  • 模块化、可维护的代码结构

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/@帕布哈拉尔

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。

目录标签

目录标签

PythonClaude搜索research-and-dataaimcpserpapigenaimodel-context-protocolmcp-servermcp-tools航班搜索混合部署MCP工具AI集成旅行技术

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP