PromptSpend

io.github.AndrewAvery7由 GitHub 帳號 AndrewAvery7 發布v0.1.11更新於 Oct 29, 2026

LLM pricing where every rate carries its source and the date it was last confirmed.

已驗證Streamable HTTP可網頁執行金融AI 與機器學習

概覽

AI 產生的概覽

PromptSpend 為助理提供附來源與確認日期的 LLM 標價,並依工作負載估算成本,讓報價有憑有據而非孤立數字。

可以做什麼
  • 查詢某模型每百萬 token 的輸入與輸出價格,附上來源、最後確認日期、爭議標記,模型名稱未知時提供相近比對。
  • 依指定日期取回歷史費率,包含更正紀錄;在開始追蹤之前則回覆「未追蹤」。
  • 為描述的工作負載或實測用量估算每月成本,計入對話歷史累積、快取寫入、長上下文級距與推理 token。
  • 依示意性能力指數找出評分不低於指定模型的較便宜模型,以待測試候選的形式回傳。
適用情境
適合助理回答模型價格、用歷史費率核對舊帳單,或在多個模型間為描述的工作負載做預算。鎖定那些否則只會重複一個價格數字、卻不說明其時效與可信度的程式開發助理。
執行需求
可使用 promptspend.dev 的遠端端點(streamable HTTP),或以 npx 在本機執行 npm 套件 @promptspend/mcp(需 Node.js)。不需要 API 金鑰或帳號。取得價格目錄需要網路連線。
安裝前請注意
遠端端點會接收模型名稱、token 數量等工具參數;它不儲存這些參數,但 Cloudflare 請求日誌會記錄時間、路徑、請求標頭與 IP 等連線資訊,最多保留七天,若工作負載細節不宜外流請改用 npm 套件。價格僅涵蓋標準級全球標價,不含區域加價、優先級、伺服器端工具呼叫費、微調與協議折扣。較便宜模型的結果只是示意性候選,並非推薦。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 PromptSpend,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

README

@promptspend/mcp

[PromptSpend MCP on mcprush]

LLM pricing for coding agents — every price carries its source and the date it was last confirmed.

There are already MCP servers that will tell you what a model costs. This one tells you where the number came from, when it was last checked, and which numbers two sources disagree about. And it will cost a described workload rather than just quoting a rate, because the arithmetic between "$3 per million tokens" and "$4,955 a month" is where nearly every estimate goes wrong.

bash
claude mcp add promptspend -- npx -y @promptspend/mcp

No API key. No account. MIT.


Why another pricing server

Every price comes with its paperwork.

jsonc
// Real output, not an illustration: `get_price` for gpt-5 on 2026-08-03.{  "model": "gpt-5",  "input_per_million_usd": 1.25,  "output_per_million_usd": 10,  "provenance": {    "source": "vendor",    "source_description": "Hand-verified against the provider's own published pricing page.",    "last_verified": "2026-08-03",    "disputed": false,    "upstream_stale": false,    "confidence": "Confirmed against the provider's own pricing page on 2026-08-03.",    "verified_url": "https://developers.openai.com/api/docs/pricing",  },}

last_verified moves as rows are re-read, so the date here will age; the shape will not. What is worth checking is that the block is present at all — a price without one is a price you cannot audit.

That matters more to an agent than to a person. Someone reading a web page sees the interface around the number and forms their own view of how much to trust it. A model handed a bare figure has nothing, and will repeat it with whatever confidence the phrasing implies. Given the date and the source it can say "as of 1 August, per OpenAI's pricing page" instead of stating a number as though it were timeless.

And it says when it does not know. Where two sources disagree and no human has adjudicated, the response is marked disputed: true with both figures, rather than quietly picking one:

DISPUTED — two sources disagree on this price and no human has adjudicated it.The figure shown is the primary feed's number, last confirmed 2026-08-02.Treat it as indicative and say so.

The tool a price lookup cannot provide

estimate_cost runs promptspend.com's own cost engine — imported, not reimplemented, so a number this server reports and a number the website shows cannot drift apart. A test asserts it.

It accounts for the things hand-rolled estimates miss:

  • Conversation history compounds. Turn N re-sends turns 1…N−1 as input, so cost grows with the square of the turn count.
  • Cache writes cost more than input — 1.25× at both OpenAI and Anthropic. Counting only the cheaper reads reports a saving your invoice will not have.
  • Long-context tiers apply per request, not per conversation.
  • Reasoning tokens are billable even though you never see them.
  • Output is priced separately, typically 3–5× input.

"What would a support assistant cost at 4,000 conversations a day on GPT-5 versus DeepSeek V3.2?"

Context footprint

MCP tool definitions are loaded into your context on every turn, for as long as the server is connected. A heavy server can add thousands of tokens to every message, which is why the advice going round is to prefer a CLI for read-only data.

A pricing server that quietly taxes every turn, to tell you about token costs, would be an easy and deserved joke. So:

This server adds ~897 tokens per turn. Three tools, short descriptions, budgeted at 1,200 and checked in CI by npm run check:footprint.

If that number ever stops being true, the build fails — the README figure is asserted against the actual manifest, not typed once and trusted.

Tools

ToolWhat it answers
get_priceWhat does this model cost, and how much should I trust that? With as_of, what did it cost then?
estimate_costWhat will my workload cost per month on each? With usage, what would these totals have cost?
find_cheaperWhat could I test that is cheaper and not obviously worse?

get_price with as_of: "2026-09-15" returns the rate PromptSpend published on that UTC day, read from the price history — useful for checking an old invoice. A day before PromptSpend began tracking the model is answered "not tracked", never with the first rate seen, and a later correction (PromptSpend had been reading the wrong page) is returned with the figure, so an agent does not present a misreading as what the vendor charged.

estimate_cost with usage prices measured totals — say a month from a usage export — instead of a described workload: { "input": 1200000, "output": 300000, "cache_read": 4000000, "cache_write": 200000 }, where input excludes cache reads. A model without a published cache rate is billed at its full input rate (and the response says so), and a model with a long-context tier is flagged, because totals cannot show which requests crossed it.

find_cheaper returns candidates to test, never a recommendation — the capability index behind it is an illustrative estimate, not a benchmark, and the response says so.

Install

Claude Code

bash
claude mcp add promptspend -- npx -y @promptspend/mcp

Cursor / Claude Desktop / Windsurf — in mcp.json:

json
{ "mcpServers": { "promptspend": { "command": "npx", "args": ["-y", "@promptspend/mcp"] } } }

No install — hosted at https://promptspend.dev/mcp. Same tools, same answers, imported from this package rather than copied. In Claude.ai or ChatGPT, add it as a custom connector with that URL; in Claude Code:

bash
claude mcp add --transport http promptspend https://promptspend.dev/mcp

The hosted server receives your tool arguments (a model name, a workload's token counts) to answer them, and stores none of them; it needs no key or account. Like the rest of the pricing API at promptspend.dev, it has Cloudflare's request logging switched on: each entry records the time, the address (/mcp), request headers and connection details such as an IP address, kept for up to seven days. PromptSpend's code never logs the arguments themselves. Run the npm package instead if a workload description should never leave your machine.

Or as an Agent Skill, which costs context only when a price question comes up rather than on every turn: see skills/.

What it will not do

  • It will not pass off a stale price as current. The catalog is fetched, never bundled. A retained copy may be used for at most 24 hours when the live file cannot be reached, and every affected tool response carries an explicit catalog_status warning written for the agent to relay. Past that bounded grace period, the tools return an error rather than an old number.
  • It has no benchmarks, latency or endpoint data. Other servers do. Three tools is a deliberate choice about your context budget.
  • It has no telemetry. Neither the npm package nor the hosted endpoint sends analytics or usage reports, and neither needs a key or an account. The hosted endpoint's request logging is described under Install.

Scope of the prices

Standard-tier, global-endpoint list prices in USD. Not modelled: regional and data-residency premiums, priority tiers, server-side tool-call fees, fine-tuning, and negotiated or committed-use discounts.


The same catalog is also in free native apps for iPhone and iPad and Android.

Part of PromptSpend — MIT. Found a wrong price? That is the most serious class of bug this project can have. Open an issue.

來源:mcp/README.md,提交 e6d0c9b

工具

3

get_price

List price for one LLM in USD per million tokens, with its source and last-confirmed date. Returns disputed=true when two sources disagree, and close matches when the model is unknown. To cost a workload, use estimate_cost.

輸入參數as_ofmodel_name必填

estimate_cost

Monthly cost of a described workload, or of measured usage, on each model. Accounts for history compounding, cache writes, long-context tiers and reasoning tokens. Use this instead of multiplying prices by hand.

輸入參數turnsusagemodels必填user_tokensoutput_tokenssystem_tokensuse_batch_apicached_input_sharereasoning_multiplierconversations_per_day

find_cheaper

Cheaper models that score at or above the given one on capability, costed on the same workload. Returns candidates to test, not a recommendation.

輸入參數model必填turnsuser_tokensoutput_tokenssystem_tokensmin_capabilityconversations_per_day

版本歷史

2
  1. v0.1.11最新Oct 29, 2026
  2. v0.1.6Sep 16, 2026

評分

已滿足適用檢查項的 100%

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

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