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 分