Back to browse
GitHub Repository

See what Claude Code and Codex actually send to the API — and what each part costs.

117 starsPython

Cost-Xray – per-token cost attribution, by tool, skill, prompt and more

by ruihanli·Jun 18, 2026·2 points·0 comments

AI Analysis

●●●BangerBig BrainSolve My Problem

Mitmproxy capture shows why each turn costs without touching agent config.

Strengths
  • Mitmproxy approach requires zero agent configuration changes to capture traffic
  • Attributes costs to system prompts, MCP servers, tool schemas, and cache hits
  • Local-only operation with no telemetry or API key requirements
Weaknesses
  • Only supports Claude Code and Codex, not other AI agents yet
  • macOS and Linux only, no Windows support mentioned
Category
Target Audience

Developers using Claude Code or Codex

Similar Projects