Burnmeter

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 3, 2026

本地 Claude Code token 分析:效率占比与各模型支出明细。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Local Claude Code token analytics: efficiency shares and per-model spend breakdown.

已验证STDIO仅桌面数据与分析AI 与机器学习

概览

Burnmeter 的本地 MCP 服务;无需登录;STDIO。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

burnmeter

burnmeter analyses Claude Code token spend from the session logs already on your machine. It reads the JSONL session files, adds up the token counts in every usage record, and reports two views: how the total splits across output, input, cache-creation, and cache-read (the efficiency view), and the full totals with a per-model split (the breakdown view). One binary serves a command-line interface and a stdio MCP server.

Everything is local. There is no network access, no API key, and no account. The log directory is taken from CONTEXTBURN_LOG_DIR when set and defaults to ~/.claude/projects; every *.jsonl file under it is read recursively.

Install

bash
npx @reneturcios/burnmeter breakdown

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/burnmeter

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead. Note the container reads logs from inside the container, so mount your log directory and point CONTEXTBURN_LOG_DIR at the mount if you use it for real logs.

CLI

bash
burnmeter efficiencyburnmeter breakdownburnmeter breakdown --log-dir ~/somewhere/else
burnmeter --version

Both reports print JSON. --log-dir wins over CONTEXTBURN_LOG_DIR, which wins over the ~/.claude/projects default. Exit codes: 0 on success, 1 when a report fails, 2 for usage errors.

A breakdown contains logDir, filesScanned, entriesWithUsage, malformedLines, totals (the four token counts plus total_tokens), and byModel (the same counts per model, with an entry count, sorted by total tokens descending). An efficiency report contains the same scan fields and totals, plus shares: each category as a percentage of total tokens, rounded to two decimal places.

How entries are counted: a log line that is not valid JSON (or not a JSON object) is skipped and counted in malformedLines. An entry counts when it carries a usage object, either at the top level or under its message; the four counts input_tokens, output_tokens, cache_creation_input_tokens, and cache_read_input_tokens are summed, with a missing or non-numeric field counting as 0. The model is message.model, falling back to a top-level model, falling back to unknown. Entries without a usage object are ignored.

When the directory is missing or no usage entries are found, the report is not an error and no numbers are invented: totals and shares are zero, and the report carries a note field saying no usage entries were found and where it looked.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/burnmeter mcp

MCP client configuration:

json
{  "mcpServers": {    "burnmeter": {      "command": "npx",      "args": ["-y", "@reneturcios/burnmeter", "mcp"]    }  }}

To read logs from a non-default directory, add CONTEXTBURN_LOG_DIR to the client's env for this server.

Tools

Both tools are parameterless, as documented in the original tool's public spec.

ToolInputWhat it returns
run_efficiency(none)The efficiency report: totals plus each category's share of total tokens.
spend_breakdown(none)The full breakdown report: totals plus the per-model split.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network (temporary fixture logs only)npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 94b47df

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Nov 3, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分