Skip to main content
Glama
DanCastHub

awardmath-mcp

by DanCastHub

AwardMath MCP server

awardmath-mcp 通过模型上下文协议(Model Context Protocol)将 AI 助手连接到公开的 AwardMath API。

AwardMath 是一款旅行积分优化器。你提供积分余额和一个旅行目标,一个确定性求解器会在转分比例和奖励图表的版本化图谱中搜索,然后返回最多三个经过验证、可解释的预订方案。

其数学原理是对已发布图表进行枚举和评分。LLM 可以解析你的问题并解释结果,但它永远不会选择或优化方案。

本仓库包含这个 MCP 服务器,以及 data/ 下的一个免费数据快照。该服务器是只读的,不需要 API 密钥、登录或订阅,也不会抓取航空公司网站。

Tools

服务器提供三个工具。

Tool

功能

list_programs

列出受跟踪和可消费的积分项目

solve_award_trip

返回最多三个方案

parse_wallet

将钱包文本结构化

list_programs

list_programs 返回 AwardMath 所跟踪的每个积分项目,并标出当前一次求解中可以消费哪些 program ID。

可消费的积分项目包括有定价奖励图表的项目,以及可以转入这些积分项目的银行积分。这一区分可防止助手要求求解器消费一笔与任何定价奖励都没有转换路径的余额。

solve_award_trip

solve_award_trip 可搜索与你的钱包、始发地、目的地、舱位、旅行人数和现金上限等约束相符的方案。

成功的响应包含最多三个方案,其中包含:

  • 精确的转分步骤

  • 所需总积分

  • 定价后的费用

如果没有方案符合,响应中会包含 no_plan_reasons。它会明确指出失败的约束,而不是用一个猜测的路线或价格来填补缺口。

parse_wallet

parse_wallet 将自由文本转换为结构化的余额。

例如:

250k Amex, 80k Chase

明确的余额会变成积分项目 ID 和金额。模糊的表述会被提示出来要求澄清,而不是靠猜测归属到某个积分项目。

Related MCP server: mcp-travelcode

Setup

你可以直接从 GitHub 运行该服务器,也可以从本仓库的克隆中进行安装。

Claude Code

claude mcp add awardmath -- uvx --from git+https://github.com/DanCastHub/awardmath-mcp awardmath-mcp

Claude Desktop 或其他通过 JSON 配置的 MCP 客户端

{
  "mcpServers": {
    "awardmath": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/DanCastHub/awardmath-mcp", "awardmath-mcp"]
    }
  }
}

From a clone

pip install -e .
awardmath-mcp

不需要 API 密钥或 AwardMath 账户。

Example

你: 我有 60,000 点 Amex 积分。帮我找一张从 LAX 到 HNL 的经济舱机票。

助: 截至 2026-08-23,最佳一价位方案使用 16,000 Qatar Avios 购买该座位,通过 Amex 以 1:1 转分完成。结果包含精确的转分步骤、总积分和费用,但它并不确认奖励座位仍有余票。

这个结果有时效性,因为转分比例和奖励价格会变。请在转分前重新运行一次求解,确认奖励舱位,并重新核对转分条款。

The dataset

data/ 目录提供了一份标记日期的奖励图谱快照,以及求解器运行示例输出。

data/transfer-ratios-current.csv

该文件包含 2026-08-23 观测到的从八个来源货币到积分项目的 109 条银行到项目转分边。

每一行代表 AwardMath 根据某一积分项目页面验证,或由多个独立来源相互佐证所得到的最新观测值。未经核实的编辑内容未纳入其中。

其中列包括:

  • 转分比例

  • 费用

  • 转分时间(如观测到)

  • 验证状态

  • 观测日期

比例会变化。每一行仅以观测日期为准,转分前请重新核对积分项目。

data/sample-solved-plans.json

该文件包含 2026-08-23 运行实时求解器的五个场景。

四个场景返回了方案,包括:

  • LAX 到 HNL 的经济舱,需 60,000 Amex Points

  • SFO 到 HND 的商务舱,需 100,000 Amex Points,实际由 ANA 以 82,500 积分计价

最后一个场景是刻意清空的。YVR 到 DXB 的商务舱搜索展示了当图谱无法对某条航线定价时求解器的响应:它指明缺少的图谱覆盖,而不是虚构一个方案。

What is not included

该数据集只是快照,不是完整的 AwardMath 产品。

完整的版本历史仍放在 awardmath.com。该历史会随时间追踪比例和图表,并支持价格历史和 now-or-wait 查询。它不包含本存储库。

What this will not do

服务器不会检查实时的奖赏座位可用性吗?

方案是根据已公布的奖赏图表和转分关系定价的。一条路线在数学上可能是成立的,但在你的出行日期可能没有提供座位。

在转分之前:

  1. 通过 Seats.aero、PointsYeah 或航空公司,核实奖励空位。

  2. 查看换算的积分和所有现金费用。

  3. 核实转分比例和条款。

转分是不可逆的。不要因为求解器找了一条有价的路径就去转分。只在确认了可以预订的奖励座位后,再执行转分。

AwardMath 负责计算。你负责确认座位。

Licenses

TBD注明; the code is MIT licensed.

Hmm, I messed up.

Let me correct: "The code is licensed under the MIT License."

"代码以 MIT 许可证发布。"

"data/ 下的文件以 CC BY 4.0 授权。引用时请附上此链接:"

数据:AwardMath

来源:

Now I'll produce a clean, final answer. I'll ensure original and translation correspond precisely, preserving all English terms, code, links, blanks, bullet symbols, GXP tokens. Let me write final version# AwardMath MCP server

awardmath-mcp 通过模型上下文协议(Model Context Protocol)将 AI 助手连接到公开的 AwardMath API。

AwardMath 是一款旅行积分优化器。你提供积分余额和旅行目标,确定性求解器会在可转分比例和奖励图表的版本化图谱中搜索,然后返回最多三个经验证、可解释的预订方案。

它的计算方式是对已发布图表进行枚举和评分。LLM 可以解析你的问题并解释结果,但它永远不会选择或优化方案。

本仓库包含 MCP 服务器,以及 data/ 目录下的免费数据快照。该服务器是只读的,不需要 API 密钥、登录或订阅,也不会抓取航空公司网站。

工具

服务器提供三个工具。

Tool

功能说明

list_programs

列出受跟踪的和可用的积分项目

solve_award_trip

返回最多三个方案

parse_wallet

将钱包文本格式化为结构化数据

list_programs

list_programs 返回 AwardMath 当前追踪的所有积分项目,并标示出哪些 program ID 可用于本次求解。

可用消费的积分计划包括有定价图表的积分计划,以及可以转分至这些积分计划的银行积分的币种。这样可以防止助手通过求解器去花费一笔无法到达定价的奖励的余额。

solve_award_trip

solve_award_trip 搜索与你钱包中积分、出发地、目的地、舱位、出行人数和现金上限匹配的方案。

成功响应包含最多三个方案,其中列举了:

  • 确切的转分步骤

  • 所需总积分点数

  • 转分相关应付费用

如果没有找到适合的方案,响应会包含 no_plan_reasons,从而指出约束具体在在哪里失败,而不是用猜测路线或价格来弥补空白。

parse_wallet

parse_wallet 将自由文本转换成结构化积分余额。

示范如下:

250k Amex, 80k Chase

清晰的积分余额会被转换为 program IDs 和金额。而歧义表述也会被直接指出,不会做有猜新的归属,等待确认而不是猜测。

Setup

你可以直接从 GitHub 运行服务器,也可以通过克隆本仓库进行安装。

Claude Code

claude mcp add awardmath -- uvx --from git+https://github.com/DanCastHub/awardmath-mcp awardmath-mcp

Claude Desktop 或另一个通过 JSON 配置的 MCP 客户端

{
  "mcpServers": {
    "awardmath": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/DanCastHub/awardmath-mcp", "awardmath-mcp"]
    }
  }
}

从克隆仓库安装

pip install -e .
awardmath-mcp

不使用 API 密钥或 AwardMath Web 前端自购。

Example

你有没有已有积分余额,试着向助理要一个包括计划样例的计划。

用户: 我有 60,000 点 Amex Membership Rewards 积分。请帮我找一张从 LAX 到 HNL 的经济舱座位。

助手: 截至 2026-08-23,该行程最佳报价方案使用了 16,000 Qatar Avios 积分,支付比例为 Amex 转账 1:1 进行。结果包含精确的转账步骤、所需总积分和费用。不过,它并不能确认该座位是否有可用余票。

该报价结果有日期差异,因为转分比例和奖励价格可能变化。在转分前,请重新执行求解,确认是否需要该奖励座位,并重新查看转分条款。

The data

data/ 目录提供了近期时间点的、带日期标记的奖励数据和求解器输出结果的快照。

data/transfer-ratios-current.csv

该文件包含截至 2026-08-23 观测的 8 个来源币种到项目计划的 109 条转分边。

每行数据代表 AwardMath 对已验证的对应或其来源的独立依赖项、程序内部的、最新一条观测值。不符合来源参考但有申请目的时会被省略。

设备包含的字段:

  • 转分比例

  • 手续费

  • 转分所需耗时,部分有记录

  • 验证状态

  • 观测日期

转分比例会变动。将每一行依据其观测日期来判断有效性,然后在转分前务必重新查询对应积分计划进行确认。

data/sample-solved-plans.json

本文件包含五个在 2026-08-23 通过真实运行求解器得到的示例方案。

其中四个场景有方案,例如:

  • 使用 60,000 Amex Membership Rewards 积分 MFA 洛杉矶 M建行 HNL 的经济舱

  • 使用 100,000 Amex Membership Rewards 积分,以及经 ANA 以 82,500 积分兑换的 SFO 到 HND 的商务舱

另一个场景则故意无结果。如 YVR 到 Dublic 商务舱搜索段,演示了当图谱无法为一航线定价时求解器的反应:它会指出缺失的覆盖范围,而不是捏造给出一个方案。

What is not included

这只是数据集是一个快照,而并非 AwardMath 完整产品。

完整的版本化历史数据存在于 awardmath.com。历史追踪会记录比例与时间的图表,并提供价格历史、现在买还是等待推广建议等。但这些功能并没有收集在存储仓库中。

What this will not do

该服务器不实时验证奖励座位余票。

方案是根据已发布的奖励图价设定图表和转分关系计算得出的。因此某个绕航线在数学上可以成立,但在你要求的具体出行日期可能不存在可预订座位。

比如,任何评分之前的积分转移前:

  1. 通过 Seats.aero、PointsYeah 或媒体确认剩余数费用。

  2. 向入账相应的航空队程序确认继续本积分支付可用的兑换费用。

  3. 再次确认当前积分转分比例和条件合规。

积分转出不可逆。请不要因为求解器给出了价格路径就直接转分。转分之前,请最后确认目标座席是否真的可预订。

AwardMath 保证计算有效性,你负责确认想要属于您的座位。

Licenses

代码以 MIT 许可证发布。

所有 data/ 目录下的内容均采用 CC BY 4.0 授权方式。引用附件时请完整标注来源:

数据来源参考**: AwardMath

来源:

Available Tools

3 tools
list_programsA

List every rewards program AwardMath tracks.

Returns {"names": {program_id: display name}, "plannable": [program_id]}. "plannable" ids are the ones a solve can spend today: award programs with priced charts, plus bank currencies that transfer into one. Use these ids in solve_award_trip wallets.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It precisely outlines the return structure (an object with 'names' and 'plannable' fields) and elaborates on the meaning of 'plannable' (award programs with priced charts plus bank currencies that transfer into one). This gives the agent solid insight into what the tool returns and on what basis, well beyond a generic 'list' statement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences: the first states the purpose, the second defines the return shape, and the third explains the 'plannable' field and its intended use. Every sentence contributes meaningful information with no redundancy or padding, making it efficiently structured and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has no parameters and no output schema, the description is exceptionally complete. It fully defines the return object, explains the semantics of each field, and explicitly ties the output to the sibling tool solve_award_trip. There are no critical gaps that would prevent an agent from correctly invoking the tool and interpreting its results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the input schema is empty, so the description has no parameter semantics to add. Per the rubric, a tool with zero parameters gets a baseline of 4. The description appropriately focuses on output and usage rather than parameters, so the score reflects this baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'List every rewards program AwardMath tracks,' which is a clear verb and resource definition. It does not explicitly differentiate from sibling tools like parse_wallet or solve_award_trip, but the listing nature is unmistakable given the name and the different purposes of those siblings. Thus it is specific but lacks explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description goes beyond just stating what it does by explaining when to use the output: 'Use these ids in solve_award_trip wallets.' This directly connects the tool to a sibling and prescribes how the returned 'plannable' ids should be consumed. It also clarifies which programs qualify as 'plannable,' giving the agent a clear decision rule for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

parse_walletA

Turn free text about points balances into structured wallet entries.

Example input: "I have 250k Amex MR, 80k Chase, and my wife has 60k Alaska". Returns {"balances": [{owner, program, balance, expires}], "unrecognized": [...], "needs_clarification": [...]}. Anything ambiguous lands in the latter two lists instead of being guessed — show it to the user rather than dropping it. If you already know the balances in structured form, skip this and build the wallet directly.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers: it spells out the return shape (balances, unrecognized, needs_clarification), and crucially states the no-guessing policy — 'Anything ambiguous lands in the latter two lists instead of being guessed — show it to the user rather than dropping it.' This is a meaningful behavioral trait. It stops short of edge-case handling (e.g., empty text), keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose, followed by a compact example, the return schema, and the behavioral contract. Each sentence earns its place. It runs slightly long due to the dual example-and-schema-format block, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter parse tool with no output schema, the description is nearly complete: it states the input, enumerates the three output lists, and defines the ambiguity contract. The absence of an output schema means the description must explain return values, which it does. Minor omission: it doesn't state a reasonable fallback for degenerate input, but the tool's complexity doesn't demand it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required parameter, so the description must compensate. The example input ('I have 250k Amex MR, 80k Chase...') conveys the expected free-text format with program names and amounts, which is the main semantic need. However, the description never explicitly defines the parameter's contract beyond the example — it leaves the agent to infer that text is a raw user message about point balances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line 'Turn free text about points balances into structured wallet entries' uses a specific verb (turn/parse), a defined resource (free text about points balances), and a concrete outcome (structured wallet entries). It clearly differentiates from siblings list_programs and solve_award_trip, which serve materially different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit when-not-to-use condition: 'If you already know the balances in structured form, skip this and build the wallet directly.' This tells an agent precisely when the tool is unnecessary. It implies when to use it (when balances exist only as free text) via the example, though it doesn't formally exclude siblings — acceptable since the siblings are not genuine alternatives to a text-parsing operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

solve_award_tripA

Compute up to three verified award-booking plans for a trip.

wallet: [{"owner": "me", "program": "amex-mr", "balance": 250000}] — ids from list_programs; "expires" (ISO date) optional per entry. origins / destinations: IATA airport codes, e.g. ["LAX"] -> ["HNL"]. cabins: any of "economy", "premium", "business", "first" (default economy). max_cash_usd: cap on out-of-pocket cash (fees, points purchases). window_from / window_to: ISO dates, optional.

Returns plans with exact transfer steps, points math, and fees, plus no_plan_reasons when nothing works — an empty result explains itself. Plans price the award from published charts; they never assert live seat availability, so tell the user to confirm space before transferring anything irreversible.

ParametersJSON Schema
NameRequiredDescriptionDefault
cabinsNo
walletYes
originsYes
travelersNo
window_toNo
window_fromNo
destinationsYes
max_cash_usdNo

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full responsibility. It explicitly states plans are priced from published charts and never assert live seat availability, and that empty results include no_plan_reasons. This is a strong disclosure of key behavioral limitations and return expectations, though it doesn't cover every potential edge case.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, followed by a systematic per-parameter breakdown and behavioral caveats. The text is longer than average but every sentence adds value; there is no fluff or redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 8 parameters, no annotations, and no output schema, the description covers purpose, inputs, high-level output (plans with transfer steps, points math, fees, no_plan_reasons), and a critical limitation (no live availability). It does not describe the exact output structure, but the summary is sufficient for an agent to call and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains wallet with an example, origins/destinations with IATA codes, cabins with options and default, max_cash_usd as a cap, and window dates as ISO optional. It covers 7 of 8 parameters but omits 'travelers', leaving its meaning to inference—a minor but notable gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb-resource pair ('Compute up to three verified award-booking plans for a trip') and the context clearly distinguishes it from siblings list_programs and parse_wallet. The 'verified' and 'up to three' qualifiers add specificity without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: after obtaining wallet IDs from list_programs, and it instructs the agent to confirm live availability before irreversible transfers. It does not explicitly name alternatives or exclusions, but the sibling relationships are implicit, so this is adequate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedlist_programs
    • First observedparse_wallet
    • First observedsolve_award_trip

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: list_programs enumerates available programs, parse_wallet converts free text into structured wallet entries, and solve_award_trip computes booking plans. There is zero overlap between them, so an agent can easily select the right tool for each step of the workflow.

Naming Consistency5/5

All three tool names follow a consistent verb_noun pattern: list_programs, parse_wallet, solve_award_trip. The verbs are clear and the nouns match the domain, making the naming predictable and intuitive.

Tool Count5/5

Three tools is well-scoped for the server's purpose: listing programs, parsing input, and solving trips. Each tool is necessary and sufficient for the end-to-end workflow, with no redundancy or missing helper clutter.

Completeness4/5

The tools cover the full lifecycle: discovering what programs exist, structuring user input, and computing booking plans with transfer steps. A minor gap is the lack of a dedicated tool for fetching detailed program rules or live availability, but the solve tool's output includes sufficient details and reasons for failures, so most practical needs are met.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers