li195111/claude-token-analyzer
Diagnoses token waste in Claude Code sessions. 6 anomaly types, cost audit, trend forecasting. Fully local plugin.
Platform-specific configuration:
{
"mcpServers": {
"claude-token-analyzer": {
"command": "npx",
"args": [
"-y",
"claude-token-analyzer"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
> Your Claude Code sessions might be burning tokens you can't see. > Diagnoses where your tokens go, why they're wasted, and what to fix first.
Fully local — parses your ~/.claude JSONL files into SQLite. Nothing leaves your machine. No cloud. No telemetry.
[](LICENSE) [](https://github.com/li195111/claude-token-analyzer/releases)
# Install (binary auto-downloads, no Rust toolchain needed)
claude plugin install claude-token-analyzerThen just ask in any Claude Code session:
> cta
> how much did I spend this month?
> scan for anomalies
> analyze this project
> show me usage trends~/.claude/projects/**/*.jsonl Your session logs (never modified)
→ parser.rs Extract + deduplicate responses
→ analyzer.rs Cost calculation, 10-dimension metrics
→ storage.rs Upsert into local SQLite
→ detector.rs 6-type anomaly detection + severity scoring
→ MCP tools / Skills You ask, it answersAll processing happens locally. The SQL
Loading reviews...