Skip to content
ccgauge
MCP

Let your LLM read its own usage.

ccgauge ships a Model Context Protocol server: ccgauge mcp. Wire it into Claude Desktop, Cursor, Cline — or any MCP-compatible client — and ask the model: "how much did Opus cost me this week?" No screenshots, no SQL, no copy-paste.

1. Add it to your MCP client

Two config blocks below cover ~95 % of MCP-aware tools. The transport is stdio JSON-RPC — no port, no socket file. Any client that knows MCP knows how to read this.

Claude Desktop · ~/Library/Application Support/Claude/claude_desktop_config.json
json
{
  "mcpServers": {
    "ccgauge": {
      "command": "npx",
      "args": ["-y", "ccgauge", "mcp"]
    }
  }
}
Cursor · ~/.cursor/mcp.json
json
{
  "mcp": {
    "servers": {
      "ccgauge": {
        "command": "npx",
        "args": ["-y", "ccgauge", "mcp"]
      }
    }
  }
}

Restart the client. ccgauge should show up in the MCP tool picker with eight tools available. The server starts on first request and indexes your JSONL into a separate cache file (~/.ccgauge/cache/index-mcp-v2.json) so it never contends with the dashboard for the same on-disk index.

2. The eight tools

Each tool returns structured JSON. The LLM picks the right one based on your question; you don't need to remember names.

usage_summary

Totals (tokens, cost, cache savings, requests) over a range. Filter by source / models / projects.

usage_by_time

Time-bucketed series (hour / day / week / month) of tokens and cost.

usage_by_model

Per-model token + cost rollup with share-of-total.

usage_by_project

Per-cwd token + cost rollup. Worktree-aware project names.

usage_by_session

Per-session breakdown with title, model mix, duration, and cost.

daily_summary

A specific day's totals + top models + top projects. Useful for end-of-day reflection.

weekly_summary

A specific week's totals + day-by-day breakdown.

recent_activity

The last N assistant calls with timestamp / model / prompt preview / cost.

3. What to ask

Phrasing matters less than you'd think — the model translates plain English questions into MCP tool calls. A few starting points:

Notes

← Back to features