AI Price Index

io.github.RoninForge由 GitHub 账号 RoninForge 发布v0.1.2更新于 Oct 24, 2026

Read-only, zero-key MCP server for point-in-time AI model API prices. Open data, CC BY 4.0.

发布方自己的服务:PriceWin

概览

AI 生成的概览

只读 MCP 服务器,让助手查询 AI 模型 API 价格,包括某模型在指定日期的价格,并附来源。

可以做什么
  • 查询模型当前每百万 token 的输入与输出价格及其来源
  • 获取指定日期生效的价格,含最后校验日期与置信度
  • 在同一日期上并排比较多个模型的价格
  • 把 token 用量(含缓存读取与缓存写入)换算成美元金额
  • 列出已知模型 id 及其别名,可按供应商筛选
适用场景
适合助手需要引用或标注 AI 模型 API 价格时使用,尤其是查询某个历史日期的价格,或估算一批 token 用量的成本。对成本分析与报告类工作是一个轻量的本地只读补充。
运行要求
需要 Node.js 18 或更高版本;服务器以 stdio 在本地运行,通常通过 npx 启动。运行时无需 API 密钥、账号或网络访问,带日期的数据集已内置于依赖包中。
安装前请注意
只读且运行时不发起网络请求,无法写入或更改配置。价格来自内置数据集版本,在更新底层依赖前可能已过时。结果带有 CC BY 4.0 署名文本,引用数据时应保留。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AI Price Index,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ai-price-index-mcp

RoninForge ai-price-index-mcp is a read-only Model Context Protocol server that answers what an AI model's API price was on a given date, with the first-party source that proves it. It is MIT licensed, runs entirely on your machine, and requires no API keys.

Part of RoninForge.org, an independent open-source workshop that keeps dated, reproducible records of the AI developer tooling economy. It serves the open AI Price Index dataset to any MCP client, including Claude Code and Cursor.

Most pricing tools tell an agent what a model costs today. This one also answers what a model cost on a given date, and returns the first-party source URL plus the date that price was last validated, so the agent can cite the number. That point-in-time lookup is the differentiator.

  • Zero keys, zero prompts, zero network at runtime. The dated dataset is bundled inline inside the ai-price-index dependency. The server reads it locally and adds nothing to your traffic.
  • Read-only. It only looks prices up. It cannot write, configure, or call out.
  • Cite-ready. Every result carries source_url, last_validated, confidence, and the CC BY 4.0 attribution string.

Install

Requires Node.js 18 or newer. No build step, no API key.

bash
npx -y ai-price-index-mcp

That command runs the stdio server; an MCP client launches it for you using the config below.

Client configuration

Drop this into your MCP client config. The server speaks stdio.

Claude Code (~/.claude.json or a project .mcp.json), and Cursor (~/.cursor/mcp.json), use the same mcpServers shape:

json
{  "mcpServers": {    "ai-price-index": {      "command": "npx",      "args": ["-y", "ai-price-index-mcp"]    }  }}

Or, with Claude Code's CLI:

bash
claude mcp add ai-price-index -- npx -y ai-price-index-mcp

Tools

All tools return structured JSON as text content. Prices are usd_per_mtok (USD per million tokens). Model ids resolve through the dataset's aliases, so short ids work (e.g. claude-opus-4-5 resolves to claude-opus-4-5-20251101).

ToolArgumentsReturns
current_pricemodel, provider?Today's input/output price for a model, with its source.
price_onmodel, date (YYYY-MM-DD), provider?The price in effect on that date (the point-in-time lookup).
comparemodels[], date?Side-by-side input/output prices for several models on one date.
cost_from_usagemodel, tokens, date?, provider?USD value of a token rollup at a point in time, with cache multipliers.
list_modelsprovider?Known model ids (optionally one provider), each with its aliases.

tokens for cost_from_usage accepts input, output, cache_read, cache_write_5m, cache_write_1h (all optional, missing counts as 0). Cache read is 0.1x input, cache write is 1.25x (5 minute) or 2x (1 hour).

Pass provider (for example openai, anthropic, google) to disambiguate a bare id that exists under more than one vendor.

Example result

price_on with { "model": "gpt-4", "date": "2024-01-01" }:

json
{  "query": "gpt-4",  "provider": "openai",  "model": "gpt-4",  "date": "2024-01-01",  "covered": true,  "input": {    "usd_per_mtok": 30,    "unit": "usd_per_mtok",    "effective_from": "2023-03-14",    "effective_to": null,    "last_validated": "2023-04-15",    "confidence": "archived",    "source_url": "https://web.archive.org/web/20230415223802/https://openai.com/pricing"  },  "output": { "usd_per_mtok": 60, "...": "..." },  "provenance": {    "dataset": "AI Price Index by RoninForge",    "data_version": "2026-06-17",    "license": "CC-BY-4.0",    "attribution": "AI Price Index by RoninForge (https://roninforge.org/data/ai-price-index/), CC BY 4.0",    "source": "https://roninforge.org/data/ai-price-index/"  }}

How it works

This server is a thin wrapper over the ai-price-index npm library, which ships the dated dataset bundled inline. There is no pricing logic, no separate data layer, and no network call here. The data version a result reports is the dataset release that the installed ai-price-index pins to. To move to newer prices, update that dependency.

Data license and attribution

The price data is from the AI Price Index and is licensed CC BY 4.0. When you publish anything derived from it, attribute it:

AI Price Index by RoninForge (https://roninforge.org/data/ai-price-index/), CC BY 4.0.

The code of this server is licensed MIT (see LICENSE). Data and tooling licenses are tracked upstream in the ai-price-index repository.

Links

来源:README.md,提交 fe50c11

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Price 集成