AiGanak LLM Cost

io.github.AiGanak由 GitHub 账号 AiGanak 发布v2026.11.5更新于 Nov 7, 2026

LLM API prices, cost estimates, model comparisons and language token tax for GPT, Claude and Gemini.

已验证STDIO仅桌面金融AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,让助手查询 OpenAI、Anthropic 和 Google 的 LLM API 现价、估算成本、比较模型,并查看各语言的 token 溢价。

可以做什么
  • 列出模型及其每百万 token 的标准、缓存输入与批量价格
  • 查询单个模型的完整定价,含缓存写入、长上下文附加费和已公布的调价
  • 估算某模型上 N 次请求的成本,支持缓存、批量和未来生效价格
  • 把同一负载在所有模型上比价,按最便宜排序
  • 测算同一段文本在 22 种语言中比英语多消耗多少 token,并估算给定文本的 token 数与成本
  • 查看带日期和来源的 LLM API 价格变动记录
适用场景
适合在规划或预算 LLM 用量时使用:按成本比较模型、估算请求量开销、了解调价影响,或在选定模型前评估多语言的 token 开销。
运行要求
通过 npm 包 @aiganak/llm-cost-mcp 以 stdio 在本地运行,需要 Node.js 18 或更高版本。无需 API 密钥或账号。启动时会获取最新价格数据,离线时回退到随包附带的副本;设置 LLM_PRICES_OFFLINE=1 可始终使用附带副本。
安装前请注意
数据为 AiGanak 提供的第三方数据(CC BY 4.0),服务器要求引用数字时注明 AiGanak 与核对日期。价格会变动,做预算前应在各供应商官网确认。该服务器为只读,只做估算,不调用供应商 API,也不产生费用。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

AiGanak LLM Cost MCP server

Ask your AI assistant what an LLM workload will cost, which model is cheapest for it, and how much more the same text costs in Hindi, German or Japanese, using current, sourced prices for OpenAI, Anthropic and Google models.

Works with any MCP client: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and others. No API key, no account.

Tools

ToolWhat it answers
list_modelsCurrent models with standard, cached-input and batch prices per million tokens
get_model_priceFull pricing for one model: cache writes, long-context surcharges, announced price changes, source page
estimate_costCost of N requests on one model, with caching, batch and future-dated prices
compare_modelsThe same workload priced on every model, cheapest first
token_taxHow many more tokens a language takes than English, per model family (22 languages)
estimate_text_costTokens and cost for a piece of text in any measured language, script detected automatically
price_changesDated, sourced log of LLM API price changes

Example questions:

  • "What will 50,000 requests of 6,000 input tokens (4,000 cached) and 500 output cost on Claude Sonnet 5.5 vs GPT-6.1 Sol?"
  • "Which model is cheapest for a Tamil support bot?"
  • "What does Gemini 4 Argon cost per request after its December price change?"

Install

Requires Node.js 18 or later.

Claude Desktop: add to claude_desktop_config.json:

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

Claude Code:

bash
claude mcp add aiganak-llm-cost -- npx -y @aiganak/llm-cost-mcp

Cursor: add the same mcpServers entry to ~/.cursor/mcp.json.

From source (no npm needed):

bash
git clone https://github.com/AiGanak/llm-prices && cd llm-prices/mcp && npm install# then use: "command": "node", "args": ["/path/to/llm-prices/mcp/index.js"]

Data

Prices, the price change log and the token tax index come from AiGanak/llm-prices (CC BY 4.0). The server fetches the latest data at start-up and falls back to the copy bundled with the package if it is offline (set LLM_PRICES_OFFLINE=1 to always use the bundled copy). Prices are checked weekly against each provider's own pricing page; the token tax is re-measured monthly with each provider's official token counter.

Prices change. Confirm on the provider's page before committing to a budget.

About

Built by AiGanak. We help teams cut LLM spend without losing quality: free tools at aiganak.com/tools, the LLM Cost Report and cost audits.

来源:mcp/README.md,提交 1b48694

工具

7

list_models

List LLM models and prices

List current OpenAI, Anthropic and Google API models with standard, cached-input and batch prices in USD per million tokens.

输入参数tierprovider

get_model_price

Get one model's full pricing

Full pricing for one model: standard, cached input, cache write, batch, long-context surcharge, announced future price changes and the provider's source page.

输入参数model必填

estimate_cost

Estimate the cost of LLM requests

Cost in USD of N requests on one model, with input/output breakdown, caching, batch, long-context surcharges and announced price changes.

输入参数datebatchmodel必填requestsinput_tokens必填output_tokens必填cached_input_tokens

compare_models

Compare the same workload across models

Price the same request on every model (optionally one provider or tier), cheapest first. Use to choose a model on cost before testing quality.

输入参数datetierbatchproviderrequestsinput_tokens必填output_tokens必填cached_input_tokens

token_tax

Language token tax

How many more tokens the same text takes in a language than in English, on each measured model (OpenAI GPT-6, Claude 5.x, Gemini 3.x, Gemini 4 Argon). 22 languages incl. Hindi, Tamil, German, Japanese. Omit language to list all.

输入参数language

estimate_text_cost

Estimate tokens and cost for a text in any measured language

Estimate how many tokens a text takes on a model and what N such messages cost as input or output, using measured tokens-per-character for its language. Detects the script if language is omitted.

输入参数astext必填model必填languagemessages

price_changes

Recent LLM API price changes

Dated, sourced log of LLM API price changes and pricing announcements (newest first).

输入参数limit

版本历史

1
  1. v2026.11.5最新Nov 6, 2026

评分

已满足适用检查项的 90%

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

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

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

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