claude-code-token-monitor-bash
Verified Safeby Yutaka-Murata
Overview
Real-time monitoring and analysis of Claude Code token usage and cost for local development sessions.
Installation
./monitor_cost.sh monitorEnvironment Variables
- CLAUDE_MODEL
Security Notes
The scripts utilize `python3 -c "..."` to embed shell variables (e.g., log entries, pricing rates) into Python strings for processing JSON. While this pattern carries an inherent, albeit low, risk of command injection if the source data (Claude Code transcript files) were malicious or improperly formed, it's generally considered safe within a controlled local environment where Claude Code itself is assumed to be trusted. No direct `eval` commands are used in Bash. No hardcoded credentials or external network risks are identified. macOS notifications via `osascript` use extracted log data, posing a minimal risk if log content were specifically crafted to exploit shell commands.
Similar Servers
claude-explorer
Facilitate searching, analyzing, and exporting user's Claude.ai conversation history with an AI assistant via CLI and a web interface.
session-buddy
The MCP server provides comprehensive session management, conversation memory, quality monitoring, and developer tooling integration for Claude Code projects, aiming to reduce token usage and enhance development workflows. It integrates with various LLM providers, Git worktrees, and code quality tools like Crackerjack.
claude-code-resources
Automates the initial setup of a Claude Code development environment by generating customized configuration files, AI agents, and commands based on user-defined project specifics.
session-mgmt-mcp
Manages comprehensive developer sessions by integrating AI-powered features like conversation memory, code analysis, quality monitoring, agent recommendations, and Git worktree coordination to enhance development workflows.