# Tokmeter — AI Agent Usage & Cost (npm · @sriinnu/tokmeter-mcp)

Tokens and cost for Claude Code, Codex and 14 more AI coding agents, from local session files.

- Trust score: 79/100 (medium)
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-09-24

## Components

- npm · `@sriinnu/tokmeter-mcp`: 79/100 (this document), [markdown](https://verifymcp.io/servers/sriinnu-tokmeter/sriinnu-tokmeter-mcp.md), [page](https://verifymcp.io/servers/sriinnu-tokmeter/sriinnu-tokmeter-mcp)

## Channel facts

- Registry: `npm`
- Package: `@sriinnu/tokmeter-mcp`
- Version: `1.13.0`
- 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-09-24.

- **Supply Chain Security**: 98/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - 46 of 146 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to sriinnu/tokmeter).
  - Clear OSI-approved license (AGPL-3.0-only).
  - Actively maintained (last published 0 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 76/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 2875 tokens (~119/item across 24 items; 24 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **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.
- **Tool Safety**: 75/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - 0 of 1 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation; "tokmeter_cleanup_execute" implies "execute" and declares no destructiveHint at all, which the MCP spec reads as destructive by default.
  - An AI judge read all 24 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### How do I install the Tokmeter — AI Agent Usage & Cost MCP server?

Tokmeter — AI Agent Usage & Cost runs locally as an npm package, launched with npx -y @sriinnu/tokmeter-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add sriinnu-tokmeter -- npx -y @sriinnu/tokmeter-mcp
```

### Cursor

```json
{
  "mcpServers": {
    "sriinnu-tokmeter": {
      "command": "npx",
      "args": [
        "-y",
        "@sriinnu/tokmeter-mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "sriinnu-tokmeter": {
      "command": "npx",
      "args": [
        "-y",
        "@sriinnu/tokmeter-mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add sriinnu-tokmeter -- npx -y @sriinnu/tokmeter-mcp
```

### opencode

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

### OpenClaw

```bash
openclaw mcp add sriinnu-tokmeter --command npx --arg -y --arg @sriinnu/tokmeter-mcp
```

### Hermes

```yaml
mcp_servers:
  sriinnu-tokmeter:
    command: "npx"
    args: ["-y", "@sriinnu/tokmeter-mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "sriinnu-tokmeter": {
      "Transport": "stdio",
      "Command": "npx",
      "Arguments": [
        "-y",
        "@sriinnu/tokmeter-mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add sriinnu-tokmeter -t stdio -c npx -a -y @sriinnu/tokmeter-mcp
```

### Other

```json
{
  "mcpServers": {
    "sriinnu-tokmeter": {
      "command": "npx",
      "args": [
        "-y",
        "@sriinnu/tokmeter-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-09-24 (score 79, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-09-23 (score 64)

First indexed and scored.

## MCP tools (24)

### `tokmeter_pulse` (~116 tokens)

Get a quick pulse-check snapshot of token usage — total cost, tokens, active models, projects, and providers. Use this as the default first tool to understand overall AI agent spending. Supports today/week/month/all scopes.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_models` (~128 tokens)

Detailed per-model cost and token breakdown with visual bar charts. Shows every model used, its provider, total tokens, cost, and share of total spend. Use this to identify which models are driving cost.

Input parameters:

- `limit` (number): Max models to show (default: 20)
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_providers` (~97 tokens)

Compare token usage across providers (Claude Code, Cursor, Codex, Gemini, etc.). Shows cost, tokens, model count, and share for each provider. Use this to understand which AI coding agents are most used and costly.

Input parameters:

- `project` (string): Filter by project name/path substring
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_projects` (~108 tokens)

Show per-project token usage breakdown — cost, tokens, active days, models used, and date range. Use this to see which projects are consuming the most AI resources.

Input parameters:

- `limit` (number): Max projects to show (default: 20)
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_timeline` (~130 tokens)

Show a day-by-day timeline of token usage with sparkline trends and daily cost/token breakdowns. Use this to see patterns over time — spending spikes, quiet days, and usage trends.

Input parameters:

- `limit` (number): Max days to show (default: 30, most recent first)
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_forecast` (~127 tokens)

Project future AI token costs based on historical burn rates. Calculates daily/weekly/monthly averages and projects costs for the next 7, 30, and 90 days. Also shows trend direction (accelerating, decelerating, or steady). Use this for budgeting.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_search` (~232 tokens)

Flexible search across all token usage records with filtering by model, provider, project, date range, and cost thresholds. Returns individual records sorted by timestamp. Use this to find specific usage events or investigate high-cost records.

Input parameters:

- `limit` (number): Max records to return (default: 25)
- `max_cost` (number): Maximum cost per record (USD)
- `min_cost` (number): Minimum cost per record (USD)
- `model` (string): Filter by model name substring
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)
- `since` (string): Start date (YYYY-MM-DD) for custom date range
- `sort_by` (string): Sort by cost (desc), tokens (desc), or time (desc). Default: time
- `until` (string): End date (YYYY-MM-DD) for custom date range

### `tokmeter_compare` (~130 tokens)

Compare two or more models or providers side-by-side on cost, tokens, efficiency, and usage metrics. Use this when the user wants to know which model or provider is cheaper, more efficient, or more heavily used.

Input parameters:

- `compare_type` (string, required): What to compare: models, providers, or projects
- `names` (array): Specific names to compare (if omitted, compares top entries)
- `project` (string): Filter by project name/path substring
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_export` (~139 tokens)

Export token usage data as JSON, CSV, or Markdown. Returns the full data payload in the requested format. Use JSON for programmatic consumption, CSV for spreadsheets, Markdown for reports.

Input parameters:

- `data` (string): Which data to export (default: all)
- `format` (string, required): Export format: json, csv, or markdown
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_budget` (~126 tokens)

Monitor spending against a budget with visual progress bars and alerts. Set a daily, weekly, or monthly budget and see how close you are to the limit. Shows projected overshoot/undershoot. Use this to stay within spending targets.

Input parameters:

- `daily_budget` (number): Daily budget in USD
- `monthly_budget` (number): Monthly budget in USD
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `weekly_budget` (number): Weekly budget in USD

### `tokmeter_heatmap` (~137 tokens)

Visualize activity patterns as a heatmap — see which hours of the day and days of the week have the heaviest usage. Shows both cost and token intensity. Use this to understand work patterns and peak usage times.

Input parameters:

- `metric` (string): Heatmap metric: cost, tokens, or records (default: cost)
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_anomaly` (~131 tokens)

Detect unusual spending patterns and anomalies in token usage. Identifies days or sessions with cost spikes, sudden model switches, abnormally large requests, and deviation from historical averages. Use this to catch runaway costs or unexpected usage.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)
- `sensitivity` (string): Anomaly detection sensitivity (default: medium)

### `tokmeter_efficiency` (~123 tokens)

Analyze cache hit rates, reasoning token ratios, input/output efficiency, and cost-per-token metrics. Shows how efficiently AI agents are using tokens — high cache rates mean less wasted compute. Use this to optimize costs by identifying models or projects with poor cache utilization.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_leaderboard` (~147 tokens)

Rank models and providers by various metrics: total cost, cost-efficiency (cost per 1M tokens), total tokens, cache efficiency, reasoning usage, and output volume. Use this to find the best value models or identify the heaviest hitters.

Input parameters:

- `entity` (string): Rank models or providers (default: models)
- `limit` (number): Top N to show (default: 10)
- `project` (string): Filter by project name/path substring
- `rank_by` (string): Ranking metric (default: cost)
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_digest` (~120 tokens)

Generate a concise natural language summary of token usage — like a daily/weekly briefing. Highlights key stats, top spenders, notable trends, and actionable insights in prose form. Use this when the user wants a quick narrative overview rather than tables.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_streaks` (~111 tokens)

Analyze your AI coding habits — active day streaks, weekend vs weekday usage, session frequency, and consistency metrics. Use this to understand how regularly and intensively you use AI coding agents.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)

### `tokmeter_cache_efficiency` (~96 tokens)

Analyze cache hit/miss patterns across sessions. Shows overall cache hit rate, dollar savings from caching, cache write waste, and per-model breakdown. Use this to understand how effectively prompt caching is reducing your costs.

Input parameters:

- `period` (string): Time period to analyze: today, week, or month
- `project` (string): Filter by project name/path substring
- `provider` (string): Filter to a specific provider

### `tokmeter_model_advisor` (~95 tokens)

Compare what you actually spent vs what cheaper models would have cost. Shows current spending by model and estimates savings if you downgraded expensive models (e.g., Opus → Sonnet, GPT-5 → GPT-4o). Includes a reference pricing table.

Input parameters:

- `period` (string): Time period to analyze: today, week, or month
- `project` (string): Filter by project name/path substring

### `tokmeter_budget_alert` (~90 tokens)

Proactive budget monitoring with configurable daily/weekly/monthly thresholds. Shows current spend, percentage of budget used, projected end-of-period spend, and hours remaining until budget is exceeded. Gives green/yellow/red status indicators.

Input parameters:

- `daily_budget` (number, required): Daily budget in USD
- `monthly_budget` (number): Monthly budget in USD
- `weekly_budget` (number): Weekly budget in USD

### `tokmeter_cost_optimization_tips` (~72 tokens)

Analyze usage patterns and provide actionable cost optimization recommendations. Generates tips based on actual data — cache efficiency, model selection, conversation length, and spending distribution. Each tip includes category, severity, and estimated savings.

Input parameters:

- `period` (string): Time period to analyze: today, week, or month

### `tokmeter_cleanup_preview` (~151 tokens)

Preview what session data would be deleted for the given filters. Shows affected files, directories, database rows, total bytes, and per-project/provider breakdown. ALWAYS call this before tokmeter_cleanup_execute to understand the impact.

Input parameters:

- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)
- `since` (string): Start date (YYYY-MM-DD) for custom date range
- `until` (string): End date (YYYY-MM-DD) for custom date range

### `tokmeter_cleanup_execute` (~182 tokens)

DESTRUCTIVE: Permanently delete session data matching the given filters. Creates a backup by default before deleting. ALWAYS call tokmeter_cleanup_preview first. Requires confirm='DELETE' as a safety guard.

Input parameters:

- `backup` (boolean): Create tar.gz backup before deleting (default: true)
- `confirm` (string, required): Must be exactly 'DELETE' to proceed with deletion
- `project` (string): Filter by project name/path substring
- `providers` (array): Filter to specific providers (e.g. ['claude-code','cursor'])
- `scope` (string): Time scope: today, week (last 7d), month (calendar month), or all (default)
- `since` (string): Start date (YYYY-MM-DD) for custom date range
- `until` (string): End date (YYYY-MM-DD) for custom date range

### `tokmeter_backups` (~25 tokens)

List available cleanup backups with metadata (date, size, providers, projects).

### `tokmeter_restore` (~62 tokens)

Restore session data from a cleanup backup. Requires confirm='RESTORE' as a safety guard.

Input parameters:

- `backup_id` (string, required): Backup ID to restore (from tokmeter_backups)
- `confirm` (string, required): Must be exactly 'RESTORE' to proceed

## Diagnostics

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

## Score history

- 2026-09-24: 79
- 2026-09-23: 64

## Common questions

### What is the Tokmeter — AI Agent Usage & Cost MCP server?

Tokmeter — AI Agent Usage & Cost is an MCP server listed in the public MCP registry as io.github.sriinnu/tokmeter. Tokens and cost for Claude Code, Codex and 14 more AI coding agents, from local session files. This page covers its npm package (@sriinnu/tokmeter-mcp).

### Is the Tokmeter — AI Agent Usage & Cost MCP server safe to use?

Tokmeter — AI Agent Usage & Cost scores 79 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 24 September 2026. It declares no install or post-install scripts. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the Tokmeter — AI Agent Usage & Cost MCP server expose?

Tokmeter — AI Agent Usage & Cost exposes 24 tools: tokmeter_pulse, tokmeter_models, tokmeter_providers, tokmeter_projects, tokmeter_timeline, and 19 more. Their descriptions and schemas cost roughly 2,875 tokens of context every time the server is loaded.

### Is the Tokmeter — AI Agent Usage & Cost MCP server still maintained?

Tokmeter — AI Agent Usage & Cost is still listed as active in the MCP registry. We last reached this channel on 24 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the Tokmeter — AI Agent Usage & Cost MCP server under?

Tokmeter — AI Agent Usage & Cost declares the AGPL-3.0-only licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

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