原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Rihla

作者:leojg版本 0.1.0i★ –i在你的电脑上运行
注册名称io.github.leojg/rihla

安装

概览

作者提供的说明(英文原文)

Flexible multi-leg, multi-airport flight search - cheapest valid combination across an itinerary.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆
  • 你需要填写:TRAVELPAYOUTS_TOKEN, SERPAPI_KEY

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: TRAVELPAYOUTS_TOKEN, SERPAPI_KEY, RIHLA_PROFILE

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "rihla": {
      "command": "uvx",
      "args": [
        "rihla-mcp"
      ],
      "env": {
        "TRAVELPAYOUTS_TOKEN": "your-value",
        "SERPAPI_KEY": "your-value",
        "RIHLA_PROFILE": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add rihla --env TRAVELPAYOUTS_TOKEN=your-value --env SERPAPI_KEY=your-value --env RIHLA_PROFILE=your-value -- uvx rihla-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "rihla": {
      "command": "uvx",
      "args": [
        "rihla-mcp"
      ],
      "env": {
        "TRAVELPAYOUTS_TOKEN": "your-value",
        "SERPAPI_KEY": "your-value",
        "RIHLA_PROFILE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "rihla": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "rihla-mcp"
      ],
      "env": {
        "TRAVELPAYOUTS_TOKEN": "your-value",
        "SERPAPI_KEY": "your-value",
        "RIHLA_PROFILE": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • TRAVELPAYOUTS_TOKEN 机密 env
    Travelpayouts Data API token (free) - the primary price source. Without any keys the server runs on offline mock data.
  • SERPAPI_KEY 机密 env
    SerpApi key (optional, 250 free searches/mo) - fills routes Travelpayouts misses with bookable Google Flights fares.
  • RIHLA_PROFILE env
    Source profile: 'local' (all configured sources), 'hosted' (redistribution-licensed only), or 'mock' (offline).

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 leojg 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 7286 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 7286 个服务器的 19% 更新
  • 基础检查结果等于或优于此分类中其他 7286 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Rihla 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:TRAVELPAYOUTS_TOKEN, SERPAPI_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.0)于4个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:Context7, Codebase Memory, Exa

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT昨天更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT21天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT上个月更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Rihla

Rihla (رحلة), *"the journey."* Named for Ibn Battuta's 14th-century travelogue —

the record of history's farthest-traveling explorer, who left Tangier for Mecca and

kept going for 29 years and 75,000 miles.

Flexible multi-leg, multi-airport flight search that finds the cheapest route across an entire itinerary — available as a CLI and as an MCP server for AI agents.

Consumer flight sites price one leg at a time. Rihla treats the whole trip as a single optimization problem:

*"Leave Montevideo — or Buenos Aires, it's a ferry ride away — around September 15

for Europe. Stay 20–30 days, then Japan for 15, then home. What's the cheapest

combination?"*

That query has three legs, flexible airports on both ends of each, a flexible departure window, and stay-duration constraints linking the legs. Rihla prices each leg's date×airport grid once, then finds the cheapest valid combinations in pure local compute — so even a 3–4 leg flexible query costs only a handful of API calls.

1. 1,297 USD   (44 days door-to-door)

MVD -> AMS 2026-09-08 $ 383 [mock, cached] AA AA127 FRA -> NRT 2026-10-07 $ 481 [mock, cached] KL KL411 HND -> EZE 2026-10-22 $ 433 [mock, cached] AZ AZ933

  1. 1,308 USD (44 days door-to-door) MVD -> AMS 2026-09-14 $ 446 [mock, cached] AA AA127 ...

Note the airport substitution at work: it enters Europe through Amsterdam, leaves from Frankfurt, and flies home into Buenos Aires — each leg independently picks the cheapest airport pair from its sets.

Quick start

Requires Python ≥ 3.10.

pip install rihla            # CLI

pip install "rihla[mcp]" # CLI + MCP server

Runs offline out of the box (no keys needed — a deterministic mock data source):

RIHLA_PROFILE=mock rihla                # the canonical demo trip above

rihla examples/queries/canonical.json # same trip, from a query file rihla -i # build a query interactively

For live prices, copy .env.example to .env and add at least a Travelpayouts token (free). See Data sources.

Writing a query

A query is a small JSON file: your origin airports, the ordered stops, a departure window for the first leg, and how long to stay at each stop. Downstream date windows are derived — you never hand-compute "if I leave Sep 15 and stay 20–30 days, when do I fly to Tokyo?"

{

"origins": ["MVD", "EZE", "AEP"], "stops": ["EUROPE", ["NRT", "HND"], "MVD_AREA"], "earliest": "2026-09-08", "latest": "2026-09-22", "stays": [[20, 30], [15, 15]], "date_step": 3, "top": 5 }

  • `origins` — IATA codes tried as one origin set; the cheapest wins per date.
  • `stops` — each stop is a region name or a list of IATA codes. Built-in regions: EUROPE (MAD, BCN, LIS, CDG, FCO, AMS, FRA), TOKYO (NRT, HND), MVD_AREA (MVD, EZE, AEP). Make the last stop your origin set to fly home.
  • `earliest` / `latest` — the departure window for the *first* leg only.
  • `stays` — [min, max] nights at each intermediate stop (len(stays) == len(stops) - 1).
  • `date_step` — sample every N days across date windows (coarser = fewer API calls).
  • `top` — how many ranked combinations to return.
  • `currency` — optional ISO 4217 code (default USD).

rihla -i walks you through these questions and prints the resulting JSON to save for reuse. Add --links to any run to show booking URLs.

Reading results

Rihla is honest about data quality rather than pretending everything is bookable:

  • Each flight is tagged with its source, and cached when the price is indicative (Travelpayouts data is aggregated search history, not a live fare) versus a real, bookable fare (SerpApi / Google Flights).
  • If some legs can't be priced (thin routes are real — cached sources have gaps), you get a partial result over the legs that were found, never a silently wrong total.
  • For unpriced legs, Rihla shows the nearest cached fares *outside* your departure window — a hint to shift or widen dates.

Ranking is price-only in v0.1. Open-jaw within a region is allowed by default (enter Europe at one city, leave from another); the cost of repositioning inside the region is not modeled.

Data sources & profiles

SourceRoleCostNotes
Travelpayouts / AviasalesPrimaryFreeCached, redistribution-licensed. A month of prices per call, so the call budget stays tiny. Prices indicative; coverage follows route popularity.
SerpApi (Google Flights)Fill250 free searches/mo (BYO key)Real bookable fares; fills routes Travelpayouts misses. Only spent on uncovered routes.
MockOffline—Deterministic fake prices for development and demos.

Configure via .env (see .env.example) or environment variables: TRAVELPAYOUTS_TOKEN, SERPAPI_KEY, and RIHLA_PROFILE:

  • local (default) — every source whose key is set, including SerpApi.
  • hosted — redistribution-licensed sources only (SerpApi disabled: it scrapes Google, so do not serve it from a public hosted instance).
  • mock — force the offline fetcher, no network.

With no keys set, Rihla falls back to the mock source and says so.

MCP server

Rihla ships an MCP server (stdio) so agents like Claude can run trip searches:

pip install "rihla[mcp]"

claude mcp add rihla -- rihla-mcp # Claude Code

or in any MCP client config:

{

"mcpServers": { "rihla": { "command": "rihla-mcp", "env": { "TRAVELPAYOUTS_TOKEN": "your-token", "SERPAPI_KEY": "your-key" } } } }

(The server also loads a .env from its working directory, so env is optional if you run it from a checkout.)

It exposes two read-only tools with an enforced etiquette:

  1. `resolve_airports` — the agent proposes IATA codes for the traveler's named places; Rihla validates and enriches them (nearby alternatives included). Cheap and quota-free.
  2. `search_trip` — the priced, quota-limited search. Tool descriptions instruct the agent to get the traveler's explicit confirmation of the airports *before* spending quota here.

mcp-name: io.github.leojg/rihla

How it works

Leg prices are independent — the MVD→Europe fare doesn't depend on the Tokyo dates. So Rihla fetches each leg's date×airport grid once, then enumerates valid date combinations (respecting the stay constraints) entirely in memory. The combinatorial explosion lives in local compute, not in API calls.

core.py            data model + the pure optimizer (no I/O)

fetchers/ PriceFetcher protocol: Mock / Travelpayouts / SerpApi + merge places.py airport sets / regions api.py search_trip: serializable query in, result dict out cli.py thin CLI over search_trip mcp_server.py thin MCP wrapper over the same seam

Adding a data source (Duffel, Kiwi, …) is one more class implementing a one-method protocol: quote(origin, dest, day) -> Quote.

Scope (v0.1): flight search only — no lodging, no booking or payments, single adult, one cabin. Search returns booking links, never handles the transaction.

Development

git clone https://github.com/leojg/rihla && cd rihla

pip install -e ".[dev,mcp]" pytest # offline, no keys needed ruff check .

License

Licensed under the Apache License 2.0 — see LICENSE.

问 PopNx