← 返回 Skills 市场
punitarani

Google Flights CLI and MCP

作者 Punit Arani · GitHub ↗ · v0.8.0 · MIT-0
cross-platform ✓ 安全检测通过
115
总下载
2
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fli
功能描述
Guidance for installing and using Fli correctly as a CLI and MCP server. Use when: setting up Fli with pipx, running `fli` flight searches, configuring Claud...
使用说明 (SKILL.md)

Fli install and usage skill

Use this skill when the goal is to install Fli and use its CLI or MCP server correctly.

The primary path is:

  1. install with pipx install flights
  2. use fli for terminal searches
  3. use fli-mcp for Claude Desktop or other STDIO MCP clients
  4. use fli-mcp-http only when an HTTP MCP endpoint is specifically needed

Do not default to cloning the repository or using a source checkout. Only mention cloning the repo when the user explicitly wants to contribute to Fli itself.

What Fli is

Fli is a Python package for accessing Google Flights data through direct API interaction.

It has three public surfaces:

  • CLI via fli
  • Python library via the fli package
  • MCP server via fli-mcp and fli-mcp-http

For this skill, focus on the CLI and MCP server first.

Core install rule

If the user wants to use Fli as a tool, recommend pipx install flights.

Why:

  • it is the documented recommended install path for CLI and MCP usage
  • it keeps the install isolated from other Python projects
  • it exposes fli, fli-mcp, and fli-mcp-http on the user's PATH

Only fall back to pip install flights or uvx when:

  • pipx is unavailable
  • the user wants library-only usage
  • the user explicitly prefers another Python package manager

Standard installation flow

Preferred install

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install flights

If pipx is already installed, skip directly to:

pipx install flights

Verify installation

Run these checks after install:

fli --help
fli-mcp --help
which fli-mcp

If the commands are not found after pipx install flights, have the user run:

python3 -m pipx ensurepath

Then restart the terminal session.

What the install provides

After pipx install flights, these commands should be available:

  • fli - main CLI for flight searches
  • fli-mcp - MCP server over STDIO
  • fli-mcp-http - MCP server over HTTP, defaulting to http://127.0.0.1:8000/mcp/

Important naming detail:

  • the package to install is flights
  • the commands to run are fli, fli-mcp, and fli-mcp-http

Do not tell users to run pipx install fli.

CLI usage

Basic flight search

Use:

fli flights JFK LAX 2026-10-25

Cheapest-date search

Use:

fli dates JFK LAX --from 2026-01-01 --to 2026-01-31

Common filters

Use filters like these when the user asks for them:

fli flights JFK LHR 2026-10-25 \
  --time 6-20 \
  --airlines BA KL \
  --class BUSINESS \
  --stops NON_STOP \
  --sort DURATION

Supported language to map correctly:

  • cabin classes: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST
  • stop filters: ANY, NON_STOP, ONE_STOP, TWO_PLUS_STOPS
  • sort options: CHEAPEST, DURATION, DEPARTURE_TIME, ARRIVAL_TIME

CLI shorthand

Fli supports a convenience shorthand where a non-command invocation is treated as a flights search.

Example:

fli JFK LAX 2026-05-15

This behaves like:

fli flights JFK LAX 2026-05-15

Use the explicit flights subcommand in examples unless the user asks for shortcuts.

MCP usage

Default MCP mode

Use fli-mcp for Claude Desktop and other STDIO-based MCP clients.

fli-mcp

This is the default recommendation for local assistant integration.

HTTP MCP mode

Use fli-mcp-http only when the user needs an HTTP endpoint.

fli-mcp-http

By default, it serves at:

  • http://127.0.0.1:8000/mcp/

For HTTP integrations, the client should send:

  • Accept: application/json, text/event-stream

Claude Desktop setup

When the user wants Claude Desktop integration, recommend this config first:

{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": []
    }
  }
}

Suggested config paths:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

After editing the config:

  1. fully quit Claude Desktop
  2. relaunch it
  3. start a new conversation
  4. ask for a flight search

Good validation prompt:

Can you search for flights from JFK to LHR on 2026-03-15?

Optional MCP environment variables

If the user wants defaults, these environment variables are relevant:

  • FLI_MCP_DEFAULT_PASSENGERS
  • FLI_MCP_DEFAULT_CURRENCY
  • FLI_MCP_DEFAULT_CABIN_CLASS
  • FLI_MCP_DEFAULT_SORT_BY
  • FLI_MCP_DEFAULT_DEPARTURE_WINDOW
  • FLI_MCP_MAX_RESULTS

Example:

{
  "mcpServers": {
    "fli": {
      "command": "fli-mcp",
      "args": [],
      "env": {
        "FLI_MCP_DEFAULT_CURRENCY": "EUR",
        "FLI_MCP_DEFAULT_CABIN_CLASS": "BUSINESS",
        "FLI_MCP_MAX_RESULTS": "10"
      }
    }
  }
}

How to guide users well

If the user asks to install Fli

Give them the pipx install flights path first.

If the user asks how to use the command line tool

Show fli flights ... and fli dates ... examples first.

If the user asks how to connect Claude or another assistant

Show fli-mcp and the Claude Desktop config first.

If the user asks for a web endpoint

Then show fli-mcp-http and mention the /mcp/ path and Accept header.

If the user asks how to contribute or hack on the codebase

That is outside the primary scope of this skill. Only then discuss cloning the repository and using development commands.

Common mistakes to prevent

  • telling users to clone the repository when they only want the tool
  • telling users to install fli instead of flights
  • focusing on the Python API when the user asked for CLI or MCP setup
  • giving HTTP MCP instructions when STDIO MCP is enough
  • forgetting to tell Claude Desktop users to fully restart the app
  • omitting the PATH fix when pipx installs successfully but commands are not found

Troubleshooting

fli or fli-mcp not found

Try:

python3 -m pipx ensurepath

Then restart the terminal.

Python version problems

Fli requires Python 3.10 or newer.

Check with:

python3 --version

Claude Desktop does not show the tools

Check these in order:

  1. fli-mcp --help works in a terminal
  2. the Claude Desktop config file path is correct
  3. the JSON is valid
  4. Claude Desktop was fully quit and reopened

Rate limiting or temporary failures

Fli includes automatic rate limiting and retries, but live Google Flights requests can still fail temporarily.

If a query fails:

  • retry after a short delay
  • reduce repeated back-to-back searches
  • do not assume the CLI or MCP setup is broken just because one upstream request failed

Public docs

Use these docs for product-facing guidance:

  • introduction: https://punitarani-fli.mintlify.app/introduction
  • installation: https://punitarani-fli.mintlify.app/installation
  • MCP setup: https://punitarani-fli.mintlify.app/mcp/setup
  • docs index: https://punitarani-fli.mintlify.app/llms.txt

Use product docs for examples and onboarding. Use the actual installed command names when writing instructions.

Summary

The default recommendation is pipx install flights. After that, use fli for terminal searches, fli-mcp for Claude Desktop and other STDIO MCP clients, and fli-mcp-http only when an HTTP MCP endpoint is specifically needed.

安全使用建议
This skill is a coherent how-to for installing and running the 'flights' package (use `pipx install flights`) and integrating its MCP server with Claude Desktop. Before proceeding: (1) verify you want a local service that can run a CLI and optionally serve HTTP on localhost; avoid changing the default bind address unless you understand exposure risks; (2) back up and carefully edit the Claude Desktop config file paths shown; (3) confirm the PyPI package 'flights' is the intended upstream project (the SKILL.md warns not to install a package named 'fli'); and (4) if you have concerns about data source or authentication (Google Flights access), review the upstream project documentation — this skill does not request or provide any Google credentials.
能力评估
Purpose & Capability
The name/description (Fli CLI and MCP) align with the SKILL.md: it instructs installing the 'flights' package, running the `fli` CLI and `fli-mcp`/`fli-mcp-http` servers, and configuring Claude Desktop. It does not request unrelated credentials, binaries, or config paths beyond what's needed for integrating the tool.
Instruction Scope
Instructions focus on installation (pipx) and using the CLI/MCP. They advise editing Claude Desktop config files (standard user config paths) and optionally setting FLI_MCP_* environment variables — expected for integration. As a note, the doc suggests running a local HTTP MCP server (default 127.0.0.1:8000); the guide does not warn about exposing the endpoint if users change the bind address or firewall settings.
Install Mechanism
This is an instruction-only skill with no install spec or bundled code. It recommends using pipx to install the package from PyPI, which is proportionate and low-risk for documentation-only content.
Credentials
No required environment variables or credentials are declared. The SKILL.md lists optional FLI_MCP_* env vars for defaults — these are reasonable and related to the tool's runtime behavior. There are no unrelated secret requests.
Persistence & Privilege
The skill does not request persistent or elevated platform privileges; always is false and there is no install. It instructs the user to edit their own assistant config to add an MCP server, which is expected behavior for integrating a local tool.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.8.0
- Major improvement: detailed guidance for installing and using Fli as a CLI and MCP server. - Now recommends `pipx install flights` as the primary installation path for command-line and MCP use. - Clear separation between CLI usage (`fli`), STDIO MCP (`fli-mcp`), and HTTP MCP (`fli-mcp-http`), with scenarios for each. - Step‑by‑step instructions for Claude Desktop integration and troubleshooting tips. - Highlights common user mistakes and provides targeted prevention and resolution steps. - Adds links to official product documentation for further guidance.
元数据
Slug fli
版本 0.8.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Google Flights CLI and MCP 是什么?

Guidance for installing and using Fli correctly as a CLI and MCP server. Use when: setting up Fli with pipx, running `fli` flight searches, configuring Claud... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。

如何安装 Google Flights CLI and MCP?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fli」即可一键安装,无需额外配置。

Google Flights CLI and MCP 是免费的吗?

是的,Google Flights CLI and MCP 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Google Flights CLI and MCP 支持哪些平台?

Google Flights CLI and MCP 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Google Flights CLI and MCP?

由 Punit Arani(@punitarani)开发并维护,当前版本 v0.8.0。

💬 留言讨论