AgentXRay hit Hacker News this week with a pitch that hits close to home for anyone running AI coding agents in production: it's an MCP server built to find where your agent wasted tokens. The project, hosted on GitHub under the handle mertdotdev, is still early days โ€” no comments, barely any points โ€” but the concept alone resonates with every dev who's watched a Claude Code session spiral into 200k tokens of context just to fix a typo.

The Token Burn Problem

If you've spent serious time with coding agents like Cursor or OpenClaw's own agent stack, you know the pain: they'll re-read entire files for every tiny edit, loop on failed test runs, and pad their reasoning traces until your API bill looks like a car payment. Token waste isn't just about money โ€” it slows iteration, fills context windows with garbage, and makes agents dumber over time as they drown in irrelevant history. What's missing is visibility. Most agent frameworks give you logs, sure, but raw transcripts are a swamp. You need to know which specific tool calls burned 40k tokens for zero value, which files got re-parsed six times unnecessarily, and where the agent went down a rabbit hole before backtracking. That's exactly the gap AgentXRay is trying to fill.

How AgentXRay Fits In

By implementing as an MCP server, AgentXRay can sit alongside your existing agent tooling โ€” Claude Desktop, OpenClaw, or any MCP-compatible client โ€” and presumably hook into the request lifecycle. The name suggests X-ray vision: instead of guessing where tokens went, you get a diagnostic breakdown that pinpoints wasteful patterns. That's a genuinely useful layer for anyone running agents at scale. The GitHub repo doesn't reveal much beyond the headline promise; there's no detailed README or usage docs visible in the truncated source we pulled. But even as a proof-of-concept, it points to an emerging category: agent observability. We're moving past 'does my agent work' and into 'how efficiently does it burn compute.' That shift is overdue.

Key Takeaways

  • AgentXRay is an MCP server that aims to trace token usage in coding agents and identify wasted spend.
  • The project appeared on Hacker News with minimal discussion, suggesting early-stage development or a quiet launch.
  • Token waste isn't just cost โ€” it degrades agent performance by polluting context windows and slowing iteration.

The Bottom Line

AgentXRay is exactly the kind of tool this ecosystem needs: brutal transparency for your AI's spending habits. It won't fix bad prompts or lazy agents, but if it delivers on its promise, it gives you the data to call out waste when it happens. I'm watching this one โ€” and so should anyone who pays for tokens. The real test will be whether AgentXRay can surface actionable insights without adding its own overhead. MCP servers are lightweight by design, but a diagnostic tool that burns more tokens than it saves would be ironic as hell. Let's see what the next commit brings.