Agent Cost Log

com.botrecipe由 botrecipe.com 发布v1.0.0更新于 Oct 24, 2026

Cost per run, tool, model and day for AI agents, from one call or an OpenTelemetry export.

发布方自己的服务:Bot Recipes

已验证Streamable HTTP可网页运行数据与分析AI 与机器学习

概览

AI 生成的概览

远程 MCP 服务器,用于记录 AI 智能体的模型与工具调用成本,并按运行、工具、模型和日期生成花费报告。

可以做什么
  • 记录模型与工具调用成本,可逐次传入事件或使用 OpenTelemetry OTLP/JSON 追踪导出,并获得本次运行与当天的累计总额
  • 按运行、工具、模型和日期报告成本,可限定单次运行或某个 API 密钥下的全部数据
  • 获取最近 7 天花费的通俗摘要:总额、花费最高的运行、工具、模型和最忙的一天
  • 查看某个密钥或 IP 当天的用量,并了解付费升级选项
适用场景
适合希望让助手跟踪并汇报自身模型与工具调用花费,或想总结一周智能体支出而不自建记账的场景。也适合已在产出 OpenTelemetry 追踪、需要快速按运行拆分成本的团队。
运行要求
需要远程 streamable HTTP 端点;未声明本地包、环境变量或请求头。周报和按密钥的整体成本报告需要免费 API 密钥;无密钥时报告仅限单个 run_id。免费额度为每天 500 次调用。
安装前请注意
成本数据会发送到第三方托管服务,用量按 API 密钥或 IP 统计。报告为只读,但记录操作会向该服务写入成本事件。升级工具会指向每月 9 美元的付费方案,工具本身不直接收款。免费版显示 7 天历史,Pro 为 30 天。

安装

在 SourceWeft 中

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

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.botrecipe%2Fcostlog/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "agent-cost-log": {
      "type": "http",
      "url": "https://costlog.cloudforbots.com/mcp"
    }
  }
}

工具

4

log_costs

Log what your agent's model and tool calls cost, then get the running total for the run and for today. Pass events (one per call, up to 500) or an OpenTelemetry OTLP/JSON trace export as otel (gen_ai.usage.input_tokens / output_tokens / gen_ai.request.model are read; trace id becomes run_id). Give cost_usd per call, or tokens plus your own per-million prices; nothing is guessed. Optional caps: run_cap_usd and daily_cap_usd. Free watch-only returns would_alert when a cap is crossed; Pro posts one alert per day to alert_webhook. Never blocks or changes your agent.

输入参数oteleventsrun_idrun_cap_usdalert_webhookdaily_cap_usdprice_in_per_mprice_out_per_m

cost_report

Cost per run, per tool, per model and per day. Without an API key pass run_id (one run). With a key: everything on that key. Free shows 7 days, Pro 30.

输入参数daysrun_id

weekly_report

Plain-English summary of the last 7 days of spend: total, top runs, top tools, top models, busiest day. Read-only; sends nothing. Needs a free API key.

无需输入参数。

usage_and_upgrade

Show today's usage for your key or IP and the $9/month upgrade link. Free tier: 500 calls/day. Not metered.

无需输入参数。

版本历史

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

评分

已满足适用检查项的 72%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分

    请在注册中心条目中发布图标。

  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。

其他 Botrecipe 集成