AICostBudget AI API Pricing

io.github.aicostbudget由 GitHub 账号 aicostbudget 发布v0.1.1更新于 Oct 30, 2026

Read-only source-linked AI API prices, comparisons, cost estimates, and price changes.

概览

AI 生成的概览

只读 MCP 服务器,让助手查询带官方来源链接的 AI API 模型价格、成本估算、模型对比和近期价格变动。

可以做什么
  • 按模型 ID 或显示名称查询输入、缓存输入与输出价格
  • 按提供商及输入或输出 token 价格上限筛选并列出模型
  • 根据请求量估算每月 token 成本,可选缓存输入与批量计价
  • 对比多个模型的每月成本,并按总额从低到高排序
  • 列出最新的价格变动事件,可按日期或提供商筛选
适用场景
适合需要了解某个 AI 模型的价格、为特定负载做预算,或在给定请求量下挑选最便宜模型,并希望每个数字都附带官方来源与核验日期的场景。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 18 或更高版本,且 node 与 npx 在客户端 PATH 中。未声明任何账号、API 密钥或环境变量。需要访问 npm 源及三个公开数据端点,企业代理须放行。
安装前请注意
服务器为只读,不写文件也不收集遥测,但运行时会从第三方端点获取公开数据。实时加载失败时会改用内置备用数据,内容可能较旧,应查看核验日期。估算不含税费、合同、抵扣与提供商取整,缺失的缓存或批量费率不会被猜测填补。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ai-api-pricing-mcp

Read-only MCP server for the source-linked AICostBudget AI API Pricing Dataset. It exposes model prices, filtered model lists, monthly cost estimates, comparisons, and price-change events. Every successful result includes official provider source URL(s), a verification date, and an AICostBudget page link.

Data, history and issue tracker: aicostbudget/ai-api-pricing-data on GitHub. Spot a wrong price? Open an issue with the official source link.

The server writes no files, collects no telemetry, and uses only these public endpoints at runtime:

  • https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.json
  • https://raw.githubusercontent.com/aicostbudget/ai-api-pricing-data/main/data/price-change-events/events.jsonl
  • https://aicostbudget.com/sitemap.xml

If live pricing or price-change loading fails, the response explicitly reports that the bundled fallback was used. Model-page links are emitted only when present in the sitemap; otherwise the server links to https://aicostbudget.com/en/models.

Run

Node.js 18 or newer is required.

bash
npx -y ai-api-pricing-mcp

Claude Desktop

Add this entry under mcpServers in claude_desktop_config.json:

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

Restart Claude Desktop after saving the file.

Install in Claude Desktop (MCPB)

The maintainer creates the GitHub Release and attaches ai-api-pricing-mcp-<version>.mcpb. Download the bundle from GitHub Releases, then double-click it or drag it into Claude Desktop → Settings → Extensions to install it.

Claude Code

bash
claude mcp add ai-api-pricing -- npx -y ai-api-pricing-mcp

Cursor

Create .cursor/mcp.json in a project, or ~/.cursor/mcp.json for global use:

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

VS Code

Create .vscode/mcp.json:

json
{  "servers": {    "ai-api-pricing": {      "type": "stdio",      "command": "npx",      "args": ["-y", "ai-api-pricing-mcp"]    }  }}

Tools

  • get_model_price({ model })
  • list_models({ provider?, max_input_price?, max_output_price? })
  • estimate_monthly_cost({ model, input_tokens_per_request, output_tokens_per_request, requests_per_month, cached_input_ratio?, use_batch? })
  • compare_models({ models, input_tokens_per_request, output_tokens_per_request, requests_per_month })
  • price_changes({ since?, provider? })

Model matching accepts exact IDs and display names. A fuzzy query that matches multiple models returns an explicit “Did you mean” list instead of silently choosing one. Cost estimates refuse missing required prices; they never substitute a standard, cache, or batch rate.

Demo transcript

text
User: Get the price of gpt-4.1.Assistant → get_model_price: GPT-4.1; input 2, cached input 0.5, output 8 USD per 1M tokens; official source and verified date included.
User: List OpenAI models with input price at most $2 per million tokens.Assistant → list_models: Matching model IDs and source-linked rates.
User: Estimate 1,000 monthly requests with 1,000 input and 100 output tokens on gpt-4.1.Assistant → estimate_monthly_cost: $2.80 before taxes, contracts, credits, or provider rounding.
User: Compare gpt-4.1 and claude-haiku-5-5 for that workload.Assistant → compare_models: Results sorted from lowest to highest estimated total.
User: Show OpenAI price changes since 2026-01-01.Assistant → price_changes: Up to 20 newest matching events with source URLs and the price monitor link.

Troubleshooting

  • Client cannot start npx: install Node.js 18+ and ensure node and npx are on the client application's PATH.
  • First launch is slow: npx may need to download the package once. Corporate proxies must allow the npm registry and the three documented runtime URLs.
  • Bundled fallback appears: the live URL timed out, returned a non-2xx response, or failed validation. The response remains usable but may be older; inspect its verification date.
  • Missing-price error: the requested cache, batch, input, or output rate is not present. Change the workload only if that matches the real provider billing mode; the server will not guess.
  • A model links to /en/models: the model-specific URL was absent from the current sitemap and the index link is intentional.

来源:packages/mcp-server/README.md,提交 bda8af7

工具

5

get_model_price

Get model price

Find a model by ID or display name and return source-linked prices.

输入参数model必填

list_models

List models

List source-linked models, optionally filtering by provider and maximum token prices.

输入参数providermax_input_pricemax_output_price

estimate_monthly_cost

Estimate monthly cost

Estimate monthly token cost from request volume, with optional cached-input and batch pricing.

输入参数model必填use_batchcached_input_ratiorequests_per_month必填input_tokens_per_request必填output_tokens_per_request必填

compare_models

Compare models

Compare monthly costs for multiple models and sort them from lowest to highest total.

输入参数models必填requests_per_month必填input_tokens_per_request必填output_tokens_per_request必填

price_changes

Price changes

List up to 20 newest source-linked price-change events.

输入参数sinceprovider

版本历史

2
  1. v0.1.1最新Oct 30, 2026
  2. v0.1.0Oct 21, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分