Tokencost Dev

io.github.jeff-atriumn由 GitHub 帳號 jeff-atriumn 發布v0.1.3更新於 Oct 24, 2026

LLM pricing oracle — model lookup, cost estimation, and comparison via LiteLLM

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

概覽

AI 產生的概覽

本機 MCP 伺服器,為助理提供 LLM 價格資料:模型查詢、token 成本估算與依成本比較模型,資料來自 LiteLLM。

可以做什麼
  • 查詢模型的每 token 價格、上下文視窗與能力,支援模糊名稱比對
  • 估算指定輸入與輸出 token 數量下的模型成本
  • 依性價比比較模型,可依供應商與模式篩選
  • 強制重新整理本機快取的價格資料
適用情境
適合需要快速取得 LLM API 價格答案、估算某段提示或工作負載的預算,或在不離開助理的情況下挑選符合需求且最便宜的模型。
執行需求
透過 npx 以本機程序執行(需要 Node.js)。不需要 API 金鑰、帳號或設定檔;價格資料從 LiteLLM 社群登錄檔取得並在本機快取 24 小時,因此取得與重新整理時需要網路存取。
安裝前請注意
價格來自 LiteLLM 社群登錄檔,可能落後於官方定價,用於計費決策前應先確認。此伺服器會透過網路從第三方登錄檔取得資料。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[圖片]

tokencost

[npm version] [npm downloads] [CI status] [license]

Ask your AI assistant "how much does GPT-4o cost?" — get an instant, accurate answer.


[tokencost demo in Claude Code]

Install in 30 seconds

Claude Code:

bash
claude mcp add tokencost-dev -- npx -y tokencost-dev

Then ask: "How much would 1M input tokens cost on claude-sonnet-4-5?"

Cursor (.cursor/mcp.json):

json
{  "mcpServers": {    "tokencost-dev": {      "command": "npx",      "args": ["-y", "tokencost-dev"]    }  }}

No API keys. No accounts. No configuration files. Pricing data is fetched from the LiteLLM community registry and cached locally for 24 hours.

Tools

get_model_details

Look up pricing, context window, and capabilities for any model. Fuzzy matching means "sonnet 4.5" works just as well as "claude-sonnet-4-5-20250514".

> "What are Claude Sonnet 4.5's pricing and capabilities?"
Model: claude-sonnet-4-5Provider: anthropic | Mode: chat
Pricing (per 1M tokens):  Input:  $3.00  Output: $15.00
Context Window:  Max Input:  200K  Max Output: 8K
Capabilities: vision, function_calling, parallel_function_calling

calculate_estimate

Estimate cost for a given number of input and output tokens.

> "How much will 1000 input + 500 output tokens cost on Claude Sonnet 4.5?"
Cost Estimate for claude-sonnet-4-5
  Input:  1K tokens × $3.00/1M  = $0.003000  Output: 500 tokens × $15.00/1M = $0.007500  ─────────────────────────────  Total:  $0.0105

compare_models

Find the most cost-effective models matching your requirements.

> "What are the cheapest OpenAI chat models?"
Top 2 most cost-effective models (provider: openai) (mode: chat):
1. gpt-4o-mini   Provider: openai | Mode: chat   Input: $0.15/1M | Output: $0.60/1M   Context: 128K in / 16K out
2. gpt-4o   Provider: openai | Mode: chat   Input: $5.00/1M | Output: $15.00/1M   Context: 128K in / 16K out

refresh_prices

Force re-fetch pricing data from the LiteLLM registry (cache is refreshed automatically every 24h).

Docs

Full documentation at tokencost.dev

License

MIT

來源:README.md,提交 adb73fc

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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