Google 航班MCP服务器

Google 航班MCP服务器

为Google Flights提供数据访问接口的MCP服务器,支持查询航班信息、筛选时间和价格。

快速入门

环境准备

  1. 安装最新版Claude桌面端或Cursor。
  2. 克隆本仓库并安装uv工具:
    • MacOS: curl -LsSf https://astral.sh/uv/install.sh | sh
    • Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

配置MCP服务器

  1. 编辑配置文件(Claude Desktop路径:~/Library/Application Support/Claude/claude_desktop_config.json;Cursor路径:~/.cursor/mcp.json)。

  2. 添加以下内容并替换实际路径:

    { "mcpServers": { "flights": { "command": "/ABSOLUTE/PATH/.local/bin/uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER", "run", "flights.py" ] } } }

  3. 重启应用以加载配置。

测试功能

  • 查询示例:从亚特兰大到上海的航班选项(2026年1月1日)。
  • 筛选航班时间:显示洛杉矶今天晚上8点后的航班。

更多说明请参考官方文档