
一个模型上下文协议服务器,利用快速航班API创建旅行社级航班计划。
概览
一个模型上下文协议服务器,利用快速航班API创建旅行社级航班计划。 - 搜索单程和往返航班 - 基于行程参数创建全面的旅行计划 - 获取机场代码信息 - 使用常见旅行查询模板 1. 确保你安装的是 Python 3.10 或更高版本 2.安装所需的软件包: 1. 安装 Claude Desktop 2.创建或编辑您的 Claude Desktop 配置文件: - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\Claude\claude_desktop_config.json 3. 添加航班规划服务器配置: 4. 将 /PATH/TO/ 替换为服务器文件的实际路径 5.重启 Claude Desktop 在测试和开发方面,您可以使用MCP检查器: - search_one_way_flights:搜索机场间单程航班 - search_round_trip_flights:搜索机场间往返航班 - create_travel_plan:生成全面的旅行计划
概述(AI 翻译)
一个模型上下文协议服务器,利用快速航班API创建旅行社级航班计划。
特色
- 搜索单程和往返航班
- 基于行程参数制定全面的旅行计划
- 获取机场代码信息
- 使用模板处理常见的旅行查询
安装
- 确保你安装的是Python 3.10或更高版本
- 安装所需的软件包:
用途
运行服务器
你可以直接运行服务器:
与Claude桌面集成
- 安装Claude桌面
- 创建或编辑您的Claude Desktop配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗口:
%APPDATA%\Claude\claude_desktop_config.json
-
添加航班规划服务器配置:
-
将
/PATH/TO/替换为服务器文件的实际路径 -
重启Claude桌面
使用MCP检查员
在测试和开发方面,您可以使用MCP检查器:
可用工具
search_one_way_flights:搜索机场间的单程航班search_round_trip_flights:搜索机场间往返航班create_travel_plan:生成全面的旅行计划
本页由 AI 翻译,技术细节请以原文为准。
README
Flight Planner MCP Server
A Model Context Protocol server that creates travel agent-level flight plans using the fast-flights API.
Features
- Search for one-way and round-trip flights
- Create comprehensive travel plans based on trip parameters
- Get airport code information
- Use templates for common travel queries
Installation
- Make sure you have Python 3.10 or higher installed
- Install the required packages:
pip install mcp fast-flights
Usage
Running the Server
You can run the server directly:
python flight_planner_server.py
Integrating with Claude Desktop
-
Install Claude Desktop
-
Create or edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the flight-planner server configuration:
{
"mcpServers": {
"flight-planner": {
"command": "python",
"args": [
"/PATH/TO/flight_planner_server.py"
],
"env": {
"PYTHONPATH": "/PATH/TO/PROJECT"
}
}
}
}
- Replace
/PATH/TO/with the actual path to your server file - Restart Claude Desktop
Using the MCP Inspector
For testing and development, you can use the MCP Inspector:
# Install the inspector
npm install -g @modelcontextprotocol/inspector
# Run the inspector with your server
npx @modelcontextprotocol/inspector python flight_planner_server.py
Available Tools
search_one_way_flights: Search for one-way flights between airportssearch_round_trip_flights: Search for round-trip flights between airportscreate_travel_plan: Generate a comprehensive travel plan
Available Resources
airport_codes://{query}: Get airport code information based on a search query
Available Prompts
flight_search_prompt: Template for searching flightstravel_plan_prompt: Template for creating a comprehensive travel plan
Example Queries for Claude
Once integrated with Claude Desktop, you can ask things like:
- “What flights are available from NYC to SFO on 2025-04-15?”
- “Can you create a travel plan for my business trip from LAX to TPE from 2025-05-01 to 2025-05-08?”
- “Help me find airport codes for Tokyo.”
- “What’s the best time to book flights from Boston to London for a summer vacation?”
License
MIT
安装
npx @modelcontextprotocol/inspector python flight_planner_server.py配置
{
"mcpServers": {
"flight-planner": {
"command": "python",
"args": [
"/PATH/TO/flight_planner_server.py"
],
"env": {
"PYTHONPATH": "/PATH/TO/PROJECT"
}
}
}
}