# ai-usage-mcp

Local-first MCP server that reports real token usage and cost across coding agents (Claude Code, OpenCode). Nothing leaves your machine.

- **Type:** MCP server
- **Trust:** 85/100 (A), scored on the package rubric
- **Verification:** verified (build provenance)
- **Version:** 0.5.1
- **Author:** Mohit Bansal
- **License:** MIT
- **npm:** ai-usage-mcp
- **Source:** https://github.com/MohitBansal321/ai-usage-mcp
- **Compatible clients:** claude-code, cursor, copilot, gemini (basis: transport)

## Trust

85/100 (A), scored on the package rubric
- Publisher verified: no
- Build provenance: verified attestation
- npm trusted publishing (OIDC): yes
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 0 days

## Security scan

- **Status:** clean
- **Scanned:** 2026-09-05T12:53:02.314Z
- **Version scanned:** 0.5.1
- **CVEs:** none found by OSV at scan time

## Tools

7 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `client_usage` — Token usage and cost per coding agent (Claude Code vs OpenCode).
- `daily_usage` — Per-day token usage and cost, newest day first. Use this for "how much did I use
- `model_usage` — Per-model token usage and cost, highest token count first. Use this to answer
- `project_usage` — Per-project token usage and cost, highest token count first. A project is the working
- `recent_sessions` — Most recently active sessions with project path, client, model(s), duration,
- `session_usage` — Usage for one session: client, model(s), duration, token breakdown and cost.
- `usage_summary` — Total token usage and cost for a period, split by client (Claude Code, OpenCode).

## Install

**Verdict: install** — No blocking findings and no open coverage gaps — safe to install as configured.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"ai-usage\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"ai-usage-mcp\"\n      ]\n    }\n  }\n}"
```

## Blast radius

Contained to moderate — no credential declaration found, from the publisher, the upstream registry, or the README. Known so far: runs on your machine; read-only tool surface.
- Floor 13, ceiling 31 (tier: unknown)
- `unknown` means the floor and ceiling land in different bands — not measured enough to name one. It does not mean low.
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/ai-usage-mcp
- Install plan: https://forgeregistry.com/api/v1/packages/ai-usage-mcp/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/ai-usage-mcp
- HTML page: https://forgeregistry.com/registry/ai-usage-mcp
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
