
AI-Cost-CLI
io.github.ufhouck由 GitHub 帳號 ufhouck 發布v1.1.0更新於 Oct 24, 2026
AI API cost calculator, recommender & MCP server. 29 models across text/image/video/audio.
概覽
本機 MCP 伺服器兼命令列工具,可計算、比較並推薦 29 個文字、圖像、影片與音訊 AI 模型的 API 成本。
- 可以做什麼
- 列出支援的模型及其按單位計價的價格,涵蓋文字、圖像、影片與音訊類型,可換算為本地貨幣。依輸入與輸出 token 數計算文字模型成本,並列出聚合平台的費用明細。比較模型,或將直連供應商與 OpenRouter、Portkey、LiteLLM、Martian 等聚合平台與閘道對比。依「快速、便宜、程式開發」這類自然語言需求推薦模型。從官方供應商文件同步最新價格資料。
- 適用情境
- 適合在多个 AI 模型或供應商之間做選擇時使用,讓助理在確定模型前估算或比較 API 開銷,包括閘道與聚合平台費用。
- 執行需求
- 以本機程序執行;需安裝帶 mcp 附加元件的 PyPI 套件 aicost-cli,並以 aicost mcp 指令啟動。未宣告需要帳號、API 金鑰或環境變數。貨幣換算與價格更新需要網路,換算有離線備援。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AI-Cost-CLI,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AI-Cost-CLI
[PyPI] [License: MIT] [Python 3.9+] [MCP Registry]
A terminal-based calculator and recommendation engine for AI API costs. Supports multiple providers, local currency conversion, and automated pricing updates.
Preview: Direct vs. Aggregator Comparison
Compare the effective cost of using models directly vs. through gateways like OpenRouter, including platform fees.
Supported Models
Text Models
Image, Video & Audio Models
Full list available via
aicost list --currency USD
Features
- Infrastructure Comparison: Compare Direct providers vs. Aggregators (OpenRouter) and Gateways (Portkey, LiteLLM, Martian).
- Transparent Commissions: Automatically calculates platform fees (e.g., OpenRouter's 5.5% credit fee).
- Direct Cost Calculation: Full breakdown of base costs and platform middle-layer fees.
- Currency Conversion: Real-time conversion to local currencies (TRY, EUR, etc.) with offline fallback.
- Automated Pricing: Weekly automated updates from official provider documentation.
- MCP Server: Native support for AI agents (Cursor, Claude Desktop).
Installation
With MCP server support:
Or from source:
Usage
List All Models
Calculate Cost
Output Example:
Compare Models
Get Recommendations
Sync Latest Pricing
MCP Server
Start the Model Context Protocol server for AI agent integration:
Registries
- PyPI
- MCP Registry —
io.github.ufhouck/aicost-cli - Smithery.ai
- Skills.sh
Contributing
See CONTRIBUTING.md for guidelines on how to contribute, including pricing updates, bug reports, and code contributions.
Community
License
MIT — see LICENSE for details. Developed by Ufuk Aydın.
來源:README.md,提交 cd4e1bc
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分