ComparEdge LLM Cost

io.github.imkemit-ops由 GitHub 帳號 imkemit-ops 發布v1.0.0更新於 Oct 25, 2026

Token cost math for LLM API calls: verified per-1M-token rates for 69 models, 17 providers.

發布方自己的服務:Edge Network

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

一個在本機執行的 MCP 伺服器,讓助理取得 69 個模型每百萬 token 的已驗證費率,並計算單次呼叫、工作負載與預算成本。

可以做什麼
依模型與 token 數量估算單次呼叫或多次相同呼叫的美元成本,並在模型支援時一併給出快取與批次價格。把同一次呼叫放到 2 到 6 個模型之間比價,依最便宜排序。依呼叫量與平均 token 數推算每日、每月與每年支出。找出成本最低的模型(可設定上下文長度下限),並列出收錄的模型與供應商及其費率與上下文。
適用情境
適合在規劃或說明 AI 功能規模化後的成本、依價格挑選模型,或預測每月 LLM 帳單時使用,並希望數字來自附日期的價格來源,而不是模型憑記憶報出的價格。
執行需求
透過 stdio 在本機執行,通常以 npx 從 npm 套件啟動,因此需要 Node.js。不需要 API 金鑰或帳號。它會連網取得一份公開價格來源並快取約六小時,取得失敗時改用上一份可用副本。
安裝前請注意
費用數字是根據第三方價格來源和你提供的 token 數推算的估計值,並非帳單紀錄,實際扣款可能不同。伺服器不傳送任何憑證,也不呼叫供應商 API,但會發出網路請求以取得公開價格來源。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Someone asks what the AI feature will cost at scale, and the honest answer around most teams is a shrug. Rates moved twice since anyone last checked, and the model itself will happily quote prices from its training data. This MCP server keeps current per-million-token rates for 69 models where your assistant can reach them, and does the arithmetic itself.

Watch it work

$ You: price Claude Opus 4.8 on a 25k-token prompt with a 1k answer, run 5,000 times
  llm-cost › estimate_cost
  Cost estimate: Claude Opus 4.8 (Anthropic)  Rates: input $5/1M, output $25/1M, cached input $0.5/1M
  Per call (25,000 in + 1,000 out tokens):    input:  $0.1250    output: $0.0250    per call total: $0.1500
  Across 5,000 calls: $750.00
  Ways to pay less for the same 5,000 calls:    with cached input:  $187.50    via batch API:      $375.00

Nothing here is rounded or guessed. The rate is verified, date-stamped, and the server multiplied.

Open a second session: same call across four models, ranked
$ You: compare that call on Opus 4.8, Sonnet 5, GPT-5.6 Terra and Gemini 3.1 Pro
  llm-cost › compare_models_cost
  25,000 in + 1,000 out, cheapest first:
  1. Claude Sonnet 5      $0.0600 /call    $300.00 /5k  2. Gemini 3.1 Pro       $0.0620 /call    $310.00 /5k  3. GPT-5.6 Terra        $0.0775 /call    $387.50 /5k  4. Claude Opus 4.8      $0.1500 /call    $750.00 /5k
  Ranking uses each model's live feed entry, not remembered prices.

The gap it closes

An assistant on its ownAn assistant with llm-cost
quotes output rates from training data, often a generation stalereads the current rate, dated
flattens the estimate to "a few cents"$0.1500 per call, $750.00 across 5,000
never mentions batch or caching discounts$375.00 batch, $187.50 cached, only where the model really offers them
confidently wrong, no way to tellevery figure traces to a feed entry with a verification date

The same numbers answer in a browser through the LLM calculator, and the LLM category hub ranks every tracked model by rating and price.

Where the numbers travel

mermaid
flowchart LR    V["provider pricing pages<br/>17 providers"] --> CE["verification<br/>date-stamped checks"]    CE --> F["model prices feed<br/>69 models, USD per 1M tokens"]    F -->|"6h cache, serve stale on failure"| MCP["llm-cost server<br/>local arithmetic"]    MCP --> A["your agent"]

The server never calls a provider API. It reads one public feed, llms-model-prices.json, and computes locally. Nothing to rate-limit, no key to leak, and a network hiccup serves the last good copy instead of an error. How each price gets checked is written up in the methodology, and the catalog behind it ships as an open dataset under CC BY 4.0.

The six tools

Four do the math. Two help you find the exact model id the math wants.

ToolAnswersParams
estimate_costone call, or N identical calls, in dollarsmodel, input_tokens, output_tokens, calls?
compare_models_costthe same call priced across 2 to 6 modelsmodels[], input_tokens, output_tokens
monthly_budgetdaily, monthly, yearly spend for a workloadmodel, daily_calls, avg_input_tokens, avg_output_tokens
cheapest_modelslowest-cost models, optional context floormin_context?, limit?
list_modelsevery model with rates, context and tierprovider?
list_providersproviders with model counts and cheapest picknone
Token rules of thumb, for when nobody knows the counts
  • A page of English prose is roughly 500 tokens; one token is about four characters.
  • Model references are forgiving: claude-opus-4-8, Opus 4.8 and anthropic/opus resolve to the same model. When the resolver is unsure, it returns candidates instead of guessing.
  • cheapest_models ranks by a blended rate weighting input to output 3 to 1, because real workloads read far more than they write. Confirm the winner with estimate_cost on your actual split.

Prompts

PromptArgsRuns
estimate_my_workflowworkflow, model?token estimates plus per-run and monthly cost for a described workflow
pick_cheapest_modeltaskcheapest model that still meets the requirement, top candidates priced
forecast_ai_budgetmodel, usagemonthly and yearly bill projected from expected volume

Wire it up

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

Claude Desktop keeps this file at ~/Library/Application Support/Claude/claude_desktop_config.json. Cursor: Settings, then MCP. VS Code with Copilot reads .vscode/mcp.json. Restart the client; six tools appear. No API key, no account. Per-client walkthroughs live in the setup guide.

Family

Built by ComparEdge, where software prices are checked against vendor pages before anyone quotes them. Two siblings share the data: the full catalog server and a price-change watcher, both on ComparEdge MCP.

MIT licensed. JSON-RPC 2.0 over stdio, standard Model Context Protocol.

來源:README.md,提交 c413e54

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Edge 整合