# Tokenscope (npm · @wartzar-bee/tokenscope-mcp)

Analyze Claude Code session cost & context attribution: output, cached re-reads, cache writes.

- Trust score: 68/100 (medium)
- Change this week: +42
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@wartzar-bee/tokenscope-mcp`: 68/100 (this document), [markdown](https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp.md), [page](https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp)

## Channel facts

- Registry: `npm`
- Package: `@wartzar-bee/tokenscope-mcp`
- Version: `0.2.3`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 8 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 70/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 536 tokens (~178/item across 3 items; 3 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 23/100
  - Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add wartzar-bee-tokenscope -- npx -y @wartzar-bee/tokenscope-mcp
```

### Codex

```bash
codex mcp add wartzar-bee-tokenscope -- npx -y @wartzar-bee/tokenscope-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "wartzar-bee-tokenscope": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add wartzar-bee-tokenscope --command npx --arg -y --arg @wartzar-bee/tokenscope-mcp
```

### Hermes

```yaml
mcp_servers:
  wartzar-bee-tokenscope:
    command: "npx"
    args: ["-y", "@wartzar-bee/tokenscope-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "wartzar-bee-tokenscope": {
      "command": "npx",
      "args": [
        "-y",
        "@wartzar-bee/tokenscope-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 68, +1)

No change was recorded against any check on this day. Stability & Change Management went from 20 to 23. That category is still filling its 30-day observation window: 6 days of observed history at the previous scan, 7 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 67, +48)

- [security regression] Provenance: unverified → fail
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Install scripts: unverified → pass
- [security improvement] Malware scan: unverified → pass
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Schema quality: unverified → excellent
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Stability: unverified → 0.20
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional] Licence: MIT

### 2026-07-31 (score 19, +11)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 8, −18)

- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Dependency health: unverified → partial
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 26)

First indexed and scored.

## MCP tools (3)

### `analyze_claude_cost` (~206 tokens)

Analyze a Claude Code session's token cost and context attribution. Reads Claude Code session JSONL (read-only, local) and returns the total cost, the spend breakdown (model output vs re-sent cached context vs cache-write vs fresh input), the per-turn context-growth peak/avg, cache efficiency, cost by model, subagent spend, tool-call counts, and plain-language insights. With no path it analyzes your most recent Claude Code session under ~/.claude/projects.

Input parameters:

- `all` (boolean): Aggregate ALL sessions under ~/.claude/projects (ignored if `path` is set). Default false.
- `path` (string): Optional path to a session .jsonl file or a directory of them. Omit to use your latest Claude Code session.
- `pricing` (object): Optional per-model price overrides, e.g. {"claude-opus-4": {"in": 15, "out": 75}} (USD per 1M tokens).

### `get_cost_benchmark` (~224 tokens)

Compare a Claude Code session against tokenscope's shipped reference set of real sessions (n=66) and report percentiles: how big the session's cost is vs the set, its re-sent-context share, and how cache-efficient it is ('more cache-efficient than ~P% of measured sessions'). Either pass a `path` to a session, or pass explicit `totalCost`/`resentPct`/`cacheEfficiency` numbers. This is a yardstick reference set, not a population census.

Input parameters:

- `all` (boolean): With no path-derived metrics, aggregate ALL sessions. Default false.
- `cacheEfficiency` (number): Cache efficiency percent (0-100). Used if `path` is omitted.
- `path` (string): Optional session .jsonl path/dir to derive the metrics from.
- `resentPct` (number): Percent of spend that was re-sent (cached) context. Used if `path` is omitted.
- `totalCost` (number): Session total cost (USD). Used if `path` is omitted.

### `tokenscope_share_summary` (~106 tokens)

Produce a privacy-safe, shareable summary of a Claude Code session built ONLY from aggregate numbers (no file paths, no prompt/response content) — safe to paste in public. Returns both a structured summary object and a ready-to-paste markdown block. With no path it uses your latest session.

Input parameters:

- `all` (boolean): Aggregate ALL sessions. Default false.
- `path` (string): Optional session .jsonl path/dir. Omit to use your latest session.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp#diagnostics

## Score history

- 2026-08-03: 68
- 2026-08-02: 67
- 2026-08-01: 19
- 2026-07-31: 19
- 2026-07-30: 8
- 2026-07-28: 26
- 2026-07-27: 26

## Links

- npm package: https://www.npmjs.com/package/@wartzar-bee/tokenscope-mcp
- Socket report: https://socket.dev/npm/package/@wartzar-bee/tokenscope-mcp
- Repository: https://github.com/wartzar-bee/tokenscope
- Changelog RSS feed: https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/wartzar-bee-tokenscope/wartzar-bee-tokenscope-mcp
