
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 分