earnrate

io.github.cwasley由 GitHub 帳號 cwasley 發布v0.2.18更新於 Nov 7, 2026

Which credit card earns the most at a merchant, from your cards or every card, and why.

已驗證Streamable HTTP可網頁執行效率與工作流金融

概覽

AI 產生的概覽

告訴助理在某家商店刷哪張信用卡回饋最高,可依你儲存的卡片或它已知的所有卡片判斷,並說明理由。

可以做什麼
  • 依商店或消費類型排序卡片,可指定金額、國家、付款方式和點數估值
  • 儲存卡片錢包,追蹤額度上限、季度類別選擇、啟用狀態和會員資格
  • 追蹤開卡禮、首年回饋率、消費獎勵和帳單折抵
  • 列出已儲存卡片本季需要處理的事項,可匯出日曆檔案提醒
  • 比較所有卡片及雙卡組合一年的回饋,並為尚未持有的卡片排名
  • 匯入 Amex 或 Chase 消費 CSV,查看每筆消費用最佳卡片能賺多少
適用情境
適合在商店決定刷哪張卡、評估新卡或年費卡是否值得、以及追蹤啟用、折抵和獎勵截止日期時使用。目前僅涵蓋美國發行的卡片和美國商店。
執行需求
可使用 mcp.earnrate.dev 的託管連接器並以 OAuth 登入,或以 npx 執行 npm 套件,需要 Node 22 以上版本。本機使用不需帳號。選用的 Claude 商店辨識需設定 EARNRATE_LLM=on 並提供自己的 ANTHROPIC_API_KEY。可用 EARNRATE_WALLET 變更錢包路徑。
安裝前請注意
託管連接器會收到每次提問,並儲存含卡片 ID、類別選擇、會員資格和點數估值的錢包,以復原碼加密,閒置 13 個月後刪除。開啟選用辨識會用你的 ANTHROPIC_API_KEY 把未辨識的商店名稱傳給 Anthropic。未辨識的商店名稱預設記錄在本機,可用 EARNRATE_MISSED_MERCHANTS=off 關閉。它從不索取卡號,但會寫入你的錢包檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 earnrate,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cwasley%2Fearnrate/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "earnrate": {
      "type": "http",
      "url": "https://mcp.earnrate.dev/"
    }
  }
}

README

earnrate

[CI] [npm] [Code: MIT] [Data: CC BY-NC 4.0]

I wanted a ghost card: one card that always charges the best of my cards. The card networks won't allow one, so I built the next best thing.

earnrate is the best-card decision layer for people and AI agents. Give it a merchant, and it tells you which credit card earns the most there, from your own cards or from every card it knows, and why. Save your cards and it tracks your caps and chosen categories. It's valuation-aware and transparent about its assumptions. It never sees a card number.

  • Runs on your machine, in your browser at earnrate.dev (which you can add to your phone's Home Screen and use offline), or in Claude as a connector at https://mcp.earnrate.dev, with nothing to install. earnrate.dev and Claude can share one wallet. No account and no affiliate links; the hosted server counts requests by tool name, nothing about what you ask. See the privacy page.
  • U.S. cards and U.S. merchants, for now.

Status: early, and it works: the engine, CLI, optional Claude merchant lookup, MCP server and the hosted Claude connector. See the benchmark (run 2026-11-03) for how it compares to an existing card-picking MCP server.

Try it

Needs Node 22 or later (the published package is compiled JavaScript).

sh
npm install -g earnrateearnrate restaurants               # the best cards earnrate knows, no setupearnrate trader joes --cards amex-gold,chase-prime-visa   # just these cardsearnrate whole foods 80            # add an amount to see the dollars back

You never have to enter your cards: with none, every answer covers every card earnrate knows. To have earnrate remember yours, track caps and welcome bonuses, and give a cheat sheet for your own wallet, save them:

sh
earnrate cards sapphire            # find your cards' IDsearnrate add chase-sapphire-preferredearnrate add amex-goldearnrate whole foods 80

Adding a card tells you anything else it needs to earn correctly, such as the categories you picked on Cash+, Amazon Prime for Prime Visa's 5%, or which rotating categories you've activated. earnrate update and earnrate memberships set those. Memberships and point values (earnrate values) can be saved without any cards, and every answer uses them. Using an AI assistant instead? Add earnrate to it and ask; name your cards or save them there.

With the example wallet, it prints:

Whole Foods Market · $80
Use Blue Cash Preferred: 6% back, about $4.80. High confidence.
  1. Blue Cash Preferred  6%  $4.80     6% cash back on supermarkets. ...  2. Prime Visa           5%  $4.00     5% cash back on Whole Foods Market, with Amazon Prime. ...  3. Amex Gold            4%  $3.20     4x Amex Membership Rewards on supermarkets. ...     Valued at 1¢ per point: 4% back.  + 6 more cards (--all lists them)
Amex Gold beats Blue Cash Preferred here if Amex Membership Rewards (MR) points are worth more than 1.5¢ (you value them at 1¢).
Assumes Whole Foods Market codes as supermarkets (MCC 5411).Point values: Amex Membership Rewards (MR) at 1¢, SoFi Member Rewards at 1¢ and Chase Ultimate Rewards (UR) at 1¢.

Options: --online or --in-store, --paying card|apple-pay|google-pay|paypal, --valuation flat|points-heavy, --cards, --member, --category, --all, --json, --date, --country. Run earnrate --help for details. To keep the wallet somewhere else, set EARNRATE_WALLET to its path.

earnrate cheatsheet prints the card to use for each everyday kind of purchase this quarter (groceries, dining, gas, Amazon, Costco, travel, streaming, drugstores, everything else), with your caps, picks and activations as they are now. --cards uses cards you name instead, and --every-card picks from every card to show what's worth getting. It's also in the My wallet tab on earnrate.dev.

earnrate todo lists what your saved cards need this quarter, soonest first: bonuses to activate (with Chase's deadline), categories to pick, caps running low, welcome bonuses to finish, spend bonuses you're close to, statement credits to enroll in or use, first-year rates ending, and a renewal check for each fee card in the month before its anniversary. --ics earnrate.ics also writes the dates as a calendar file with reminders. My wallet on earnrate.dev shows the same list as "To do now", with an "Add the dates to your calendar" button.

The renewal check weighs your wallet with the card against your wallet without it, where your other cards pick up its spending: "Amex Gold renews around Nov 20 ($325 fee). At typical spending, it earns about $30 a year more than your other cards would, plus $184 in credits you use: about $111 a year short of the fee." A card that's well ahead gets one short line. It uses your My spending amounts on earnrate.dev and typical amounts elsewhere, and needs the card's anniversary (earnrate update amex-gold --anniversary 11-20) or its opening date. It gives the math, not a downgrade recommendation: issuers don't publish downgrade paths or retention offers.

earnrate missed lists the stores earnrate didn't recognize when you asked here, most asked about first. They're kept only on your computer; open an issue to suggest one for the data.

Your wallet

The wallet is a YAML file (~/.earnrate/wallet.yaml) listing your cards by ID, which is each card's file name in data/cards/. earnrate add, update, remove, memberships and values write it for you and keep your comments, or you can edit it by hand. Only the cards are required:

yaml
version: 1 # the file's format; earnrate writes itvaluations:  UR: 1.5 # cents per point; leave out to use earnrate's defaultsmemberships: [amazon-prime] # unlocks Prime Visa's 5%cards:  - id: chase-sapphire-preferred  - id: chase-prime-visa  - id: chase-freedom-flex    activated: [q4-2026-grocery] # rotating 5% categories you've activated  - id: usbank-cash-plus    chosen: # categories you picked for the quarter      period: 2026-Q4      picks:        five-percent: [tv-internet-streaming, movie-theaters]        two-percent: [gas-ev-charging]

Rule IDs for activated and the choice slots for chosen are in each card's file; membership IDs (such as bofa-rewards-premier for a BofA Rewards tier) are in data/memberships.yaml, and earnrate memberships lists them. earnrate values UR=1.5 saves what a program's points are worth to you; every answer uses it. Add costco if you have a Costco membership: Costco Anywhere needs one, and spending answers count its $65 a year unless you have it, hold the card or spend at Costco. Currencies and their default values are in data/currencies.yaml. Spending caps fill up as you record purchases from an AI assistant or import a statement with --apply, and reset with each period.

Merchants earnrate doesn't know

earnrate ships with a curated list of merchants. For anything else it falls back to each card's base rate and says so. Pass --llm (or set EARNRATE_LLM=on) to have Claude guess the category instead:

  • It uses your own ANTHROPIC_API_KEY and sends only the merchant text you typed. Amounts, cards and wallet contents never leave your machine.
  • Each answer is saved in ~/.earnrate/merchant-cache.json, so a merchant is only looked up once.
  • The answer is labeled as Claude's guess, shows its reasoning, and is never higher than medium confidence.
  • Curated merchants never reach Claude.

Welcome bonuses

When you're working toward a card's sign-up bonus, tell earnrate when the account opened:

sh
earnrate update chase-sapphire-preferred --bonus-opened 2026-10-01 --bonus-spent 400

Or tell your AI assistant ("I opened my Sapphire Preferred on October 1"), or check "I'm working on this card's welcome bonus" in My wallet on earnrate.dev. --no-bonus stops tracking it. In the wallet file it looks like this:

yaml
- id: chase-sapphire-preferred  bonus: { opened: 2026-10-01, spend: 5000, by: 2026-12-31, points: 75000 }

While the bonus is open and you're behind an even pace to the deadline, that card wins wherever it's accepted, and the answer says how much is left, the weekly pace to finish on time, what the bonus is worth at your point values, and what using it costs compared with your best earner. On pace, it's the pick only where it earns as much as your best card, and it's mentioned where it comes within a point; otherwise your best card wins. Spend counts up as you record purchases from an AI assistant or import a statement with --apply; refunds count down. Once it's met or the deadline passes, the card goes back to the normal ranking. With two open bonuses, one behind pace comes first, then the one needing more spend per day.

spend, by and the reward (points, or dollars for cash back) default to the card's published offer once earnrate has one; set them when your offer was different.

First-year rates

Some cards earn more for a stretch after the account opens: Discover it Cash Back's Cashback Match doubles every rate for the first 365 days, and BofA Customized Cash pays 6% in its choice category for the first year. earnrate uses them only for purchases inside that window, so it needs the opening date:

sh
earnrate update discover-it-cash-back --opened 2026-03-04

In the wallet file that's opened: 2026-03-04 on the card; a tracked welcome bonus's opened counts too. Without a date, earnrate never assumes the card is new: it ranks it at its standard rates and says when a first-year rate would change the answer. The to-do list says when a first-year rate ends this quarter.

Paying abroad

Many cards charge a foreign transaction fee, often 3%, on every purchase outside the U.S., which can wipe out what they earn. Give the country with --country (two letters, like FR) and earnrate ranks each card after its fee, says what a card with a fee nets, and points out cards that earn extra abroad:

sh
earnrate restaurants --country GBearnrate best groceries --country JP   # every card earnrate knows

Each card's fee comes from its issuer's rates-and-fees table, and earnrate cards shows it. The cheat sheet has an "Abroad" line, on earnrate.dev a "Paying outside the U.S." box does the same, and in Claude, mention where you're paying.

Spend bonuses

Some cards pay a bonus once a year after you spend a set amount on them, like the IHG One Rewards cards' "10,000 bonus points after you spend $15,000 on purchases each calendar year". earnrate cards ihg lists each card's, with what it pays besides points (status, Elite Night Credits, free nights). Only the points are valued.

Every purchase on the card counts. Once earnrate knows how much you've spent on the card this year, an answer adds the bonus points to the purchase that reaches the total and says so, and earnrate todo lists a bonus once you're at least 75% of the way there. Without that tracking, a spend bonus never changes an answer: earnrate doesn't guess at spending it wasn't told about. Spending counts up as you record purchases from an AI assistant or import a statement with --apply. You can also set it in the card's settings on earnrate.dev, or in the wallet file:

yaml
- id: chase-ihg-one-rewards-premier  milestone_usage:    spend-15k: { period: '2026', spent: 11200 } # spend-40k counts the same purchases

earnrate simulate adds a bonus's points to a card's yearly rewards when the year's spending on it reaches the total.

Statement credits

Some cards give dollars back for spending at a named store, up to a limit each period: Amex Platinum's $75 a quarter at lululemon, Amex Gold's $7 a month at Dunkin', Blue Cash Preferred's $10 a month on Disney+, Hulu or ESPN subscriptions. The purchase still earns the card's rate; the credit comes on top. Asking about the store with no cards saved lists the cards with a credit there first, "With a statement credit", in dollars ("$75 back each quarter, then 1x Amex Membership Rewards"), then the usual ranking by rate. A search for a kind of purchase ("clothing") doesn't.

With a saved wallet, a credit that needs enrolling with the issuer counts only once you mark it enrolled, one that doesn't (like Amex Gold's Uber Cash) counts right away, and either only while some is left this period. Given an amount, its dollars count toward that card's return and can make it the pick; without one, the answer shows what's left. Recording a purchase from an AI assistant uses it up, and earnrate todo reminds you to enroll and to use what's left before the period ends:

sh
earnrate update amex-platinum --enrolled lululemon --credit-used lululemon=40

In the wallet file that's enrolled: [lululemon] and credit_usage: { lululemon: { period: 2026-Q4, used: 40 } } on the card. On earnrate.dev it's in the card's settings, where each credit is "Enrolled", "Not yet" or "I don't use this" (or "Using it" for one that needs no enrolling).

A credit you don't use can be marked so: earnrate update amex-gold --skipped-credits dunkin, skipped_credits: [dunkin] in the file. It then counts nowhere: not toward a pick, not against the fee, and not on the to-do list. For cards named with --cards, --enrolled amex-platinum=lululemon and --skipped-credits amex-gold=dunkin do the same for one answer.

Some credits pay only on a purchase of a certain size (Citi Strata Premier's $100 off a Citi Travel hotel stay of $500 or more), and some end on a date the issuer sets (Sapphire Reserve's Lyft credit, through Sep 30, 2027). Card listings say so; a purchase too small earns no credit, and after the end date the credit counts nowhere. Rules work the same way: Amex Business Platinum's 2x on a purchase of $5,000 or more applies only when the amount is given, and an answer without one says what it would earn.

Annual-fee math counts the credits you use on cards you hold, a full period's worth each period: simulating spending with your own cards says "Amex Gold's fee counts $204 a year of credits you use: Dunkin' and Uber." For a card you don't hold, the ranking leaves its credits out, since they're worth it only if you'd spend at those places anyway, and shows what it would net if you used them all beside it: in simulate, offers, the annual-fee math on each card's page and the site's spending tab. The cheat sheet picks by rate alone and leaves credits out.

Which new card?

These compare every card earnrate knows that's open to new applicants:

sh
earnrate best groceries                               # every card, ranked for one purchaseearnrate simulate groceries=600 dining=300 other=1000 # best cards and pairs for a yearearnrate simulate groceries=600 other=1000 --wallet   # what a new card would add to yours

best ranks every card earnrate knows for a merchant or a category, each set up at its best (the right category pick, activated, cap unused), with its annual fee and what earning the rate takes. Rates that need a membership like Amazon Prime are listed separately unless you've saved it (earnrate memberships amazon-prime) or pass --member amazon-prime, and a card that needs a membership to get (Costco Anywhere) says so. simulate spends your monthly amounts for a year, applying caps as they fill and reset, and ranks single cards and two-card pairs by rewards minus annual fees, counting the cost of a membership a card needs (Costco's, for Costco Anywhere) unless you have it or spend at Costco. Both take --no-fee, --cash or --points, --issuer, --business and --valuation. Welcome bonuses are left out of both; for those:

sh
earnrate offers --cash

Ranks the cards you don't have by their first two years together, to answer "which card next?": what each adds to your cards at typical spending (it takes the purchases where it earns more than they do), plus its welcome bonus at your point values in year one if the minimum spend fits in the window with all your spending on it, less each year's annual fee and any membership it needs. Each card shows year one, year two, how many weeks of spending the minimum takes, and the bonus alone. Year one counts the card at its standard rates.

If you can't or won't get cards from an issuer (Chase, over its 5/24 rule), earnrate skip-issuers chase saves that, and next-card answers here, in "would another card help?" and in Claude leave its cards out; --skip-issuer chase does it for one answer, and --none clears the list. earnrate never assumes an issuer's application rules, since they aren't published as terms it can quote.

An offer the issuer rules out because of a card in your wallet (or one you name with --cards) is marked "likely not eligible" and listed last. --points, --no-fee and --business narrow it down. Each offer is the public one on the issuer's page, checked weekly like the earning rules, with the issuer's eligibility rules in its note. Offers can differ by person and by how you apply, and it covers only the cards earnrate knows. There are no affiliate or apply links.

Import a statement

See what your purchases would have earned on earnrate's picks, using your cards' activity downloads:

sh
earnrate import activity.csv --card amex-goldearnrate import gold.csv:amex-gold sapphire.csv:chase-sapphire-preferred

It totals what each card earned against the best card in your wallet for each purchase, lists the merchants where another card would have earned the most, and flags merchants your issuer codes differently than earnrate assumes. Name several statements, each with its card, to get one report across them. It reads Amex and Chase activity CSVs. Download the CSV rather than a PDF statement: Chase's PDFs print the full card number in the payment coupon, and earnrate never handles card numbers.

  • It's a dry run unless you pass --apply, which records cap usage for the current period and spending toward an open welcome bonus in your wallet. Refunds lower both.
  • Only the date, description, amount, category and (for Chase) transaction type columns are read. The statements themselves are never stored: --apply writes cap, welcome-bonus and spend-bonus totals to your wallet, and a hash of each recorded purchase to imported.json beside it, so importing the same file twice never counts twice.
  • For a merchant earnrate doesn't know, it uses the statement's category and marks the row, since another issuer may code it differently.
  • --valuation points-heavy values Amex and Chase points at transfer rates instead of your wallet's values, which can change which card wins.

Supported cards

101 cards, each modeled from the issuer's own terms and checked weekly against them:

  • American Express: Gold, Platinum, Blue Cash Preferred, Blue Cash Everyday, Business Gold, Business Platinum, Blue Business Plus
  • American Express airline and hotel: Delta SkyMiles Blue, Gold, Platinum, Reserve; Hilton Honors, Surpass, Aspire, Business; Marriott Bonvoy Brilliant, Bevy, Business
  • Chase: Sapphire Preferred, Sapphire Reserve, Freedom Unlimited, Freedom Flex, Freedom Rise, Ink Business Cash, Ink Business Unlimited, Ink Business Preferred, Prime Visa
  • Chase airline and hotel: United Gateway, Explorer, Quest, Club, Business, Club Business; Southwest Plus, Premier, Priority, Premier Business, Performance Business; Aeroplan; IHG One Rewards, Premier, Premier Select, Business; Marriott Bonvoy Boundless, Bold
  • Citi: Strata Elite, Strata Premier, Strata, Double Cash, Custom Cash, My Best Buy Visa, Costco Anywhere Visa (personal and business); AAdvantage MileUp, Platinum Select, Globe, Executive, Business
  • Capital One: Venture X, Venture, Savor, Quicksilver, Venture X Business, Spark Cash Plus, Kohl's Card, Kohl's Rewards Visa, REI Co-op Mastercard
  • Wells Fargo: Active Cash, Autograph, Autograph Journey
  • Bank of America: Customized Cash Rewards, Unlimited Cash Rewards, Travel Rewards, Premium Rewards; Atmos Rewards Ascent, Summit, Business
  • TD Bank: Target Circle Card, Nordstrom card, Nordstrom Visa
  • U.S. Bank: Cash+, Altitude Go, Altitude Connect, Smartly Visa Signature
  • Bilt: Blue, Obsidian, Palladium
  • Credit unions: Navy Federal cashRewards, cashRewards Plus, More Rewards American Express; PenFed Power Cash Rewards; Caltech EFCU Platinum Mastercard
  • Others: Apple Card (Goldman Sachs), Discover it Cash Back, SoFi Unlimited 2%, JetBlue Plus (Barclays), PayPal Cashback Mastercard, Sam's Club Mastercard, Venmo Credit Card and Verizon Visa Card (Synchrony), Fidelity Rewards Visa Signature (Elan)

Store cards (Target, Kohl's, Nordstrom) only come up at their own stores. Airline and hotel cards count only what the card itself earns, not the points a program gives members however they pay, and their perks (bags, free nights, lounges) aren't counted.

Something the format can't express yet (Bilt's rent earning, Citi Nights) is listed as a todo: in that card's file rather than guessed.

Spotted a wrong rate, or want a card added? Open an issue with a link to the issuer's own page.

Use it in an AI assistant (MCP)

In Claude, nothing to install: add a custom connector (Settings → Connectors) with the address https://mcp.earnrate.dev. It works in Claude on the web, desktop and phone. When you add it, an earnrate page opens once, where you start an anonymous wallet: no email, just a recovery code you keep. Then ask anything: with no cards saved it answers from every card. Name your cards for answers about yours, and save them to track caps and welcome bonuses across your Claude apps. From the chat you can export the wallet for the command line, switch to another one, or delete it. To use the same wallet on earnrate.dev, choose "Use the same wallet as Claude" in My wallet there. In Claude Code:

sh
claude mcp add --transport http earnrate https://mcp.earnrate.dev

Or install it as a Claude Code plugin, which connects Claude Code and Cowork to the same server: /plugin marketplace add cwasley/earnrate, then /plugin install earnrate@earnrate.

Use the connector (or plugin) or the local extension, not both: each keeps its own wallet, and with both connected Claude may answer from either. Each one says which wallet it used.

Or run it on your computer: earnrate mcp runs earnrate as a local MCP server over stdio, with 14 tools (the connector has the same ones, plus export_wallet, import_wallet, delete_wallet and switch_wallet for its saved wallets):

  • best_card_for_purchase: which card to use, with reasons
  • best_cards_for and simulate_spending: compare every card earnrate knows, for one purchase or a year of spending, with no wallet needed
  • resolve_merchant: how a merchant was identified
  • list_wallet: a to-do list for your cards right now, then your cards, caps left this period, chosen categories, statement credits left, welcome-bonus and spend-bonus progress and the point values you've set
  • cheat_sheet: the card to use for each everyday kind of purchase this quarter
  • compare_welcome_offers: the best public sign-up offers on cards you don't have
  • record_purchase: books a purchase against its cap, any open welcome bonus, the card's yearly spend bonuses and an enrolled statement credit in your wallet file, keeping your comments
  • search_cards, add_card, update_card, remove_card, set_memberships and set_point_values: set up the wallet in conversation, including what your points are worth (memberships and point values need no cards)

Both servers also offer four prompts, ready-made questions you can pick in Claude instead of typing one. None needs your cards:

  • which-card: which credit card to use at a store or for a kind of purchase, with an optional amount, country and way of paying
  • cheat-sheet: the card for each everyday kind of purchase
  • this-quarter: what to do with your saved cards now (activations, picks, caps, welcome bonuses)
  • set-up: save your cards by name, with their picks and memberships

Saving cards is optional: name them in the conversation for one answer, or ask the assistant to save them, and it finds them, adds them, and asks about anything a card needs, like this quarter's Cash+ picks.

For a merchant earnrate doesn't know, the calling model can pass a category (e.g. grocery.supermarket). It's used only for unknown merchants and is labeled in the answer. The command line takes the same thing as --category.

Claude Desktop, running locally: download earnrate.mcpb and open it; Claude Desktop installs it (Settings → Extensions). No terminal or Node install needed. Its one setting is where your wallet file lives, by default ~/.earnrate/wallet.yaml, the same file the command line uses.

To run it locally in Claude Code:

sh
claude mcp add --scope user earnrate -- npx -y earnrate mcp

Other MCP clients take the same command in their config:

json
{  "mcpServers": {    "earnrate": { "command": "npx", "args": ["-y", "earnrate", "mcp"] }  }}

It reads the same wallet as the command line (~/.earnrate/wallet.yaml, or EARNRATE_WALLET set in the server's env).

How it works

merchant text  → resolve    category, channel, and the assumption behind them  → evaluate   every rule on every card: network, dates, caps, picks, activations  → value      your cents per point, with pooling  → rank       winner, runner-ups, flip points, warnings, confidence
  • Card terms are data, not code. Each card is a YAML file of rules (category, rate, cap, channel, dates, activation, required membership), validated with Zod. Every rule carries a short quote from the issuer's own page, and a test fails if one is missing. The engine has no card-specific branches.
  • Merchants resolve to a category plus the assumption behind it. "Whole Foods codes as a supermarket (MCC 5411)" is stated in the answer, and venues that can code more than one way (a restaurant inside a stadium or hotel) come back at medium confidence with the alternative spelled out. Unknown merchants fall back to base rates, or to an opt-in, cached and labeled Claude guess.
  • The engine is pure and deterministic. Given a purchase, a date and a set of cards (yours, or every card), it checks every rule against network acceptance, the date window, caps already used (split when a purchase straddles one), quarterly picks and activations, then values points at your cents-per-point, including pooling (Freedom Unlimited points are worth Sapphire points when you hold both). Ties, the valuation at which the runner-up would win, stale data, and a rotating card whose new quarter isn't in the data yet all show up in the answer.
  • Wallet edits keep your file intact. Adding or changing a card, or recording a purchase, splices in only the lines that changed and checks the result before saving, so comments and formatting in your YAML survive.
  • Drift detection. A weekly GitHub Action opens each issuer page in a headless browser, checks every quote is still there, and opens an issue when terms move. It stores only hashes of issuer text. An hourly check confirms earnrate.dev and the hosted server are up, and a daily one checks them end to end (a browser load of the site, sign in, ask, save a card, delete the wallet, and the server's error counts), opening an issue if anything fails.
  • Tested end to end. Golden cases written from issuer terms, CLI snapshot tests, an MCP round trip over real stdio, an install test that packs and installs the npm package, and a check that no committed file contains a card number. CI runs all of it on every push.

The code is TypeScript run directly by Node 24 (src/), with the engine in src/engine/, merchant resolution in src/merchants/, and the CLI and MCP server as thin layers over them. site/ is earnrate.dev, which runs the same engine in the browser, and remote/ is the hosted server at mcp.earnrate.dev.

Keeping card data current

Every rule in data/cards/ carries a short quote from the issuer's own page. In a clone of this repo, yarn check-sources opens each issuer page in a headless browser and reports:

  • rules whose quote is no longer on the page, which usually means the rule changed
  • earning lines that appeared or disappeared since the last baseline, such as a new perk

A GitHub Action runs it every Monday and opens a "Card source changes" issue when something moved or a page couldn't be read. After updating a card file, run yarn check-sources --update --cards <ids> to record the new baseline for those cards' pages. Some issuers block headless browsers on shared servers; those pages are listed as "couldn't check", and running the command locally covers them. The first run needs yarn playwright install chromium.

Rotating categories (Freedom Flex) are added each quarter once the issuer posts them. Until then, answers say that quarter's categories are missing rather than guessing.

Privacy Policy

earnrate needs no account. The local version has no telemetry; the hosted server counts requests and errors by tool or page, with the kind of app they came from, and how many wallets are started and used each day, never what was asked. The full policy is at earnrate.dev/privacy; in short:

  • The Claude connector: earnrate's server at mcp.earnrate.dev receives each question Claude asks it (a store or kind of purchase, and any amount, country, spending or cards you gave) and answers without keeping it; request logging is off. It counts requests and errors by tool or page, with the kind of app they came from, and how many wallets are started and used each day. Connecting it starts an anonymous wallet (a recovery code, no email). It holds only what you save: card IDs and the details you gave, memberships and point values, never card numbers, and is encrypted with its own key that only your recovery code or your connected apps can unlock. Delete it any time; it's deleted automatically after 13 months unused, or a week if it's never used.
  • What it stores locally: your wallet, a YAML file on your computer (~/.earnrate/wallet.yaml unless you set EARNRATE_WALLET). It lists cards by product ID, like amex-gold, plus your category picks, activations and how much you've spent toward caps. earnrate never asks for or stores card numbers, expiry dates, security codes or bank logins. When you ask about a store earnrate doesn't recognize, its name goes in ~/.earnrate/missed-merchants.json (earnrate missed lists them; EARNRATE_MISSED_MERCHANTS=off keeps no list).
  • What the local version sends: nothing, by default. The optional merchant lookup (off unless you turn it on with your own Anthropic API key) sends only the name of a store earnrate doesn't recognize to Anthropic's API, and saves the answer in ~/.earnrate/merchant-cache.json.
  • AI assistants: when you use earnrate through Claude or another assistant, that assistant's provider sees the conversation, including earnrate's answers, under its own privacy policy.
  • earnrate.dev: everything you enter on the site stays in your browser, except when you add the cheat sheet to Apple Wallet: then pass.earnrate.dev receives what the pass needs (card IDs, picks, activations, checkout names, memberships and the date) and keeps none of it. If you turn on syncing with Claude, the wallet (cards, picks, activations, memberships, point values, cap and spending totals, credits used and not used, opening dates, issuers left out of next-card answers) goes to mcp.earnrate.dev and is stored encrypted, like the connector's; a purchase you record is sent so its totals can be updated, and only the totals are kept. Searches, stores and amounts you ask about still never leave the browser. The sign-in stays in a cookie the page's scripts can't read. The site counts which of its parts get used, by name only, and counts visits with Cloudflare Web Analytics, without cookies.
  • Retention: locally, your data lives only in files you control, for as long as you keep them. Delete the wallet file, or clear the site's data in your browser, to remove it. A saved wallet on mcp.earnrate.dev lasts until you delete it or leave it unused for 13 months (a week, if it's never used); the record that an app is connected goes after 90 days unused.
  • Terms: earnrate.dev/terms.
  • Contact: [email protected].

Working on earnrate

Development needs Node 24 or later: the repo runs its TypeScript directly, with no build step. The published package is compiled and runs on Node 22 or later.

sh
git clone https://github.com/cwasley/earnrate.git && cd earnrateyarn installyarn earnrate whole foods 80   # runs src/ directly, no buildyarn validate                  # typecheck, lint, format check and tests

See CONTRIBUTING.md before opening a pull request.

Licensing

  • Code (everything outside data/) is MIT.
  • Data (card rules, merchants, categories and currencies under data/) is CC BY-NC 4.0. It's free for personal and non-commercial use, with attribution.
  • Commercial use of the data needs a license. That includes serving it through your own API or MCP server, or using it in a paid product. Contact [email protected].

Not legal advice; this is a good-faith structure.

earnrate isn't financial advice. Issuers change their terms, and every answer names the rule it used, so check the card's issuer page (linked in its file) before a big purchase.

來源:README.md,提交 113e9c7

工具

14

best_card_for_purchase

Best card for a purchase

Which credit card earns the most rewards for a purchase, and why. With no cards given and no saved wallet, it ranks every card earnrate knows (in `allCards`): a complete answer for anyone. With cards named in the conversation (`cards`) or a saved wallet, it picks the best of the user's own: `decision.cardId` is the pick and `decision.checkoutLabel` is how the card appears at checkout, with every usable card ranked with reasons, cards the merchant won't take, assumptions, warnings, and when a different point valuation would change the pick. For a business earnrate may not know, like a local restaurant, pass `category` when you can tell what kind of business it is. When the user is paying outside the U.S. or in another currency, pass `country`: abroad, each card is ranked after its foreign transaction fee. Pass `payment` only when the user says how they're paying, like Apple Pay or PayPal checkout. A statement credit (a card's `credit`, like Amex Platinum's lululemon credit) counts toward the pick only once it's enrolled in the wallet and has dollars left this period, and only when the amount is given; say its dollars apart from the % back. With no cards, `allCards.credits` lists cards with a credit at the store; present those first. Never needs or returns card numbers.

輸入參數datecardsamountchannelcountrypaymentcategorymerchant必填valuationmemberships

resolve_merchant

Resolve a merchant

Shows how earnrate identifies a merchant: its spend category, likely MCC, which card networks it takes, confidence, and whether that came from curated data, Claude, or nowhere. Use it to explain or double-check a recommendation.

輸入參數channelcategorymerchant必填

compare_welcome_offers

Compare welcome offers

Ranks cards the user doesn't have by what they'd be worth over the first two years: what each adds to the user's cards (or, with none, earns) on their spending, plus the public welcome (sign-up) bonus in year one if its minimum spend fits in the window, less each year's annual fee and any membership it needs. Each offer also shows the bonus alone (first-year value), year one and year two, and how many weeks of spending the minimum takes. Offers the issuer rules out because of a card in the user's wallet are marked likely not eligible and listed last; issuers the user can't get cards from (skippedIssuers, or saved with set_memberships) are left out. Use it when the user asks which card to get next or which has the best sign-up bonus. Spending is optional (typical amounts otherwise). It covers only the cards earnrate knows, offers vary by person, and each offer's note gives the issuer's eligibility rules; pass those caveats on. Never suggest applying through a link.

輸入參數kindcardsbusinessspendingvaluationincludeHeldmembershipsnoAnnualFeeskippedIssuers

best_cards_for

Best cards for a purchase

Ranks every card earnrate knows that takes new applicants, not only the user's, for one purchase or category, each set up at its best (the right category pick, activated, cap unused), with its annual fee and what earning the rate takes. Use it for questions like "what's the best card for groceries?" or "which card should I get for Amazon?". It needs no wallet. For which of the user's own cards to use, call best_card_for_purchase instead. Mention the annual fee and any conditions alongside each card. For a store, cards with a statement credit there come first in `credits` ("$75 back each quarter, then 1x Amex Membership Rewards"): present them first, in dollars and never as a percentage, saying when the cardholder must enroll, then the ranking by rate.

輸入參數kindamountissuerchannelcountrypaymentbusinesscategorymerchantvaluationmembershipsnoAnnualFee

simulate_spending

Simulate a year of spending

Spends monthly amounts for a year across every card earnrate knows, and ranks single cards and two-card pairs by rewards minus annual fees, and minus a membership a card needs (a Costco membership) unless the user has it or spends at Costco. Spending is optional: without it, typical U.S. household amounts are used and the answer says so. With `cards` (named in the conversation) or compareToWallet (the saved wallet), it ranks the cards that would add the most to those cards instead. Use it for "which card fits my spending?" or "is it worth adding a card?". It leaves out welcome bonuses.

輸入參數kindcardsissuerbusinessspendingvaluationmembershipsnoAnnualFeecompareToWallet

cheat_sheet

Cheat sheet

The card to use for each everyday kind of purchase right now: groceries, dining, gas, Amazon, Costco, travel, streaming, drugstores and everything else. With no cards given and no saved wallet, it picks from every card earnrate knows (`scope: all cards`, each row noting the card's fee and conditions). With cards named in the conversation or a saved wallet, it picks from the user's own cards, with caps, picks and activations as they are. The kind, noAnnualFee, business and issuer filters apply only when it picks from every card. For one specific store, call best_card_for_purchase instead. Pass on the notes.

輸入參數datekindcardsissuerbusinesseveryCardvaluationmembershipsnoAnnualFee

search_cards

Search cards

Finds credit cards in earnrate's catalog by name or issuer, e.g. "sapphire", "amex gold" or "bofa". Returns each card's id (for add_card), network, annual fee (and any first-year waiver), foreign transaction fee, whether it's already in the wallet, what it needs set up (category picks and their options, memberships, activations), its yearly spend bonuses, first-year rates and statement credits, each with the id update_card takes. Leave the query out to list every card. US cards only.

輸入參數query

list_wallet

List wallet

Starts with a to-do list for the user's cards right now (bonuses to activate and their deadlines, categories to pick or confirm, caps nearly used up, welcome bonuses to finish and the weekly pace, yearly spend bonuses at least 75% of the way, statement credits to enroll in or use before they reset, and a fee card's renewal check in the month before its anniversary: whether it still pays for itself at typical spending); use it when the user asks what to do with their cards this quarter or what they're forgetting. Then lists the user's cards: checkout label, network, rewards currency and its value, spending caps with how much is left this period, chosen bonus categories (and whether they're current), welcome-bonus progress, progress toward yearly spend bonuses, statement credits (enrolled or not, and what's left this period), which stores a store card works at, when each card's data was last verified, the point values the user saved, and (for the hosted wallet) when it was started. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

無需輸入參數。

record_purchase

Record a purchase

Records a purchase the user has already made, so spending caps, welcome-bonus progress, yearly spend bonuses and statement credits used stay accurate for future recommendations. It updates the user's saved wallet. Only call it after the purchase has happened, and only once per purchase: calling it twice counts the spend twice. Purchases with no cap, no open welcome bonus, no spend bonus and no enrolled statement credit are acknowledged and nothing is written. For a merchant earnrate doesn't recognize it asks for category first, so caps aren't missed. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數dateamount必填cardId必填channelcategorymerchant必填

add_card

Add a card

Adds a card the user holds to their wallet by its id from search_cards, creating the wallet if there isn't one. The reply says what the card still needs (category picks, memberships, activations); ask the user about those. Stores only the card's product id and settings, never card numbers. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數bonuspickscardId必填openedcapSpentenrolledactivatedcreditUsedanniversarycheckoutLabelmilestoneSpentskippedCredits

update_card

Update a card

Changes settings on a card already in the wallet: its category picks for this period, checkout label, anniversary, opening date (optional; for first-year rates), activated categories, cap spending so far (capSpent), spending this year toward its spend bonuses (milestoneSpent), statement credits enrolled in (enrolled), used this period (creditUsed) or not used at all (skippedCredits), or a welcome bonus to track. Picks replace the saved ones in each choice group you set (other groups are kept) for the current period. Use it when the user picks new categories, such as each quarter on U.S. Bank Cash+. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數bonuspickscardId必填openedcapSpentenrolledactivatedcreditUsedanniversarycheckoutLabelmilestoneSpentskippedCredits

remove_card

Remove a card

Removes a card from the wallet, with its tracked cap usage, bonus progress and yearly spending. Memberships and point values stay, even when the last card goes. Only when the user says they no longer have it or don't want it considered. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數cardId必填

set_memberships

Set memberships

Sets the memberships that unlock some cards' rates, such as amazon-prime for Prime Visa's 5% or a Bank of America Preferred Rewards tier, and costco for a Costco membership (so spending answers don't count its cost against Costco Anywhere). Replaces the whole list, so include the ones to keep. It saves them even with no cards saved, and every answer then uses them. With skippedIssuers, it also saves the issuers the user can't or won't get a new card from (Chase over its 5/24 rule), which next-card answers leave out; either can be given alone. It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數membershipsskippedIssuers

set_point_values

Set point values

Saves what the user's points are worth to them, in cents per point, in their saved wallet; every answer then compares cards at those values unless a valuation profile is asked for. No saved cards are needed. Use it when the user says what their points are worth ("I value Chase points at 1.5¢") or that they transfer points to airlines and hotels (profile points-heavy). Values change only the currencies given; null goes back to earnrate's default. Currencies by id: cash (Cash back), MR (Amex Membership Rewards), UR (Chase Ultimate Rewards), sofi-rewards (SoFi Member Rewards), bofa-travel-rewards (Bank of America Travel Rewards points), bofa-premium-rewards (Bank of America Premium Rewards points), usbank-altitude (U.S. Bank Altitude points), navy-federal-rewards (Navy Federal Rewards points), rei-rewards (REI Co-op Mastercard rewards), best-buy-rewards (My Best Buy rewards), C1 (Capital One miles), TYP (Citi ThankYou points), WFR (Wells Fargo Rewards), BILT (Bilt points), united-miles (United MileagePlus miles), aadvantage-miles (American Airlines AAdvantage miles), southwest-rapid-rewards (Southwest Rapid Rewards points), aeroplan (Aeroplan points), atmos-points (Atmos Rewards points), trueblue-points (JetBlue TrueBlue points), ihg-points (IHG One Rewards points), delta-skymiles (Delta SkyMiles), hilton-honors (Hilton Honors points), marriott-bonvoy (Marriott Bonvoy points), kohls-rewards (Kohl's Rewards), nordy-club (Nordy Club points). It uses the wallet file on this computer, not the hosted earnrate connector's wallet.

輸入參數valuesprofile

版本歷史

14
  1. v0.2.18最新Nov 7, 2026
  2. v0.2.17Nov 7, 2026
  3. v0.2.14Nov 5, 2026
  4. v0.2.13Nov 5, 2026
  5. v0.2.11Nov 4, 2026
  6. v0.2.10Nov 3, 2026
  7. v0.2.8Nov 3, 2026
  8. v0.2.5Nov 1, 2026
  9. v0.2.3Nov 1, 2026
  10. v0.2.2Nov 1, 2026
  11. v0.1.4Oct 31, 2026
  12. v0.1.3Oct 31, 2026
  13. v0.1.2Oct 30, 2026
  14. v0.1.1Oct 29, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分