Claude Code Usage MCP server
io.github.wheelbarrel00/claude-code-usage·v0.1.0Claude Code token usage, cost, and plan limits from local logs and Anthropic's usage API.
0 stars24 downloads/wk
Reviews
Write oneNobody has reviewed Claude Code Usage yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Claude Code Usage tools (2)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
get_claude_usageSnapshot of current Claude Code usage: today's cost and tokens, plan-limit utilization (5-hour, weekly, and per-model weekly) with reset times and pace projection, recent burn rate, current context-window fill, and pay-as-you-go extra usage. Reads local ~/.claude logs and Anthropic's usage API.
get_usage_breakdownBreak down Claude Code usage by model, project, session, or git branch, or over time (daily this month / monthly all-time). Returns cost, tokens, and message counts per group.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan2 source files scanned20/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 97 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- mediumeval / new Function used
exec.evaldist/server.mjs: …ode, sch); const makeValidate = new Function(`${names_1.default.self}`, `${names_1.de…
How Claude Code Usage compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 74/100
- higher than 43% of 4,460 AI and agents servers
- Tools
- 2
- the typical AI and agents server has 6
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 24
- more than 10% of 1,538 AI and agents servers with a package
What its tools let an agent do: 2 read
Install Claude Code Usage in Claude Code, Cursor or VS Code
Runs npx -y claude-code-usage-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add claude-code-usage -- npx -y claude-code-usage-mcp
What the publisher says
From the Claude Code Usage repository's README, as published. We do not edit it. Read it on GitHub
Claude Code Usage
An MCP server that surfaces your Claude Code token usage, estimated cost, and plan-limit status in any MCP client (Zed, Claude Desktop, Cursor, and others). It reads Claude Code's own logs (~/.claude/projects//.jsonl) and Anthropic's usage API, then exposes the data as tools the agent can call.
Published on npm as claude-code-usage-mcp and in the official MCP registry as io.github.wheelbarrel00/claude-code-usage.
What you get
Two tools:
utilization (with reset times and a pace projection), recent burn rate, current context-window fill, and pay-as-you-go extra usage.
- getclaudeusage — today's cost and tokens, 5-hour and weekly plan-limit
branch, or over time (daily this month / monthly all-time).
- getusagebreakdown — usage grouped by model, project, session, or git
Ask the agent things like "what's my Claude usage right now?" or "break down my Claude spend by project this month." MCP tools are queried on demand — there's no persistent status-bar display.
Install
npx -y claude-code-usage-mcpRegister it with your client. For Zed (settings.json):
{
"context_servers": {
"claude-code-usage": {
"command": "npx",
"args": ["-y", "claude-code-usage-mcp"]
}
}
}For Claude Desktop (claudedesktopconfig.json), use the same command under "mcpServers" instead of "context_servers".
Requirements
An authenticated Claude Code install — the server reads ~/.claude/.credentials.json and ~/.claude/projects, the same files the CLI writes.
Configuration
Optional environment variables:
How it works
Live plan limits come from api.anthropic.com/api/oauth/usage using the OAuth token already on disk; the access token is refreshed in memory only, so a running Claude Code session is never logged out. Token and cost figures are parsed from the local session logs.
Repository layout
embeds and launches the server (an alternative to the npx install above).
- mcp-server/ — the MCP server (TypeScript, bundled to dist/server.mjs).
- extension.toml, Cargo.toml, src/lib.rs — a self-contained Zed extension that
Build from source
cd mcp-server
npm install
npm run build # bundles to dist/server.mjs
node dist/server.mjs --selftestZed extension (self-contained, no npm needed)
The Zed extension embeds the bundled server and launches it with Zed's own Node. Build the server first, install rustup and the WebAssembly target (rustup target add wasm32-wasip1), then in Zed open Extensions → Install Dev Extension and select this repository's root folder.
License
MIT
Nothing above is checked by us. What we check is on the safety report.
Claude Code Usage: common questions
- Is Claude Code Usage MCP server safe?
- Mostly: it is graded B (74/100). Read the Claude Code Usage safety report
- How do I install Claude Code Usage?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Claude Code Usage need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Claude Code Usage maintained?
- The last commit was 135 days ago (2026-06-21). The latest release is v0.1.0.
- What can I use instead of Claude Code Usage?
- Servers from other publishers that do the same job: llmtrim MCP server, three.ws Billing MCP server and Commonly MCP server.
- How does Claude Code Usage compare with other AI and agents MCP servers?
- safety score 74/100 (higher than 43% of 4,460 AI and agents servers); tools 2 (the typical AI and agents server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Claude Code Usage
Same job from other publishers: the closest match first, then the best rated.
- llmtrimMCP server and proxy that compresses LLM prompts, tool output, and replies to cut token cost.not reviewedEstablishedA
- three.ws BillingAn agent's account economics — plan quotas, metered usage, invoices, receipts, and earnings.not reviewedEstablishedB
- CommonlyRead Commonly pods and post as a Commonly agent you create, with a token from your Commonly account.not reviewedEstablishedA
- Agent-Native PlanStructured visual plans and PR recaps with diagrams, prototypes, annotations, and sharingnot reviewedEstablishedA
- mcptoonMCP tools + agent skills in one zero-dependency CLI: 71,929 -> 581 tokens (-99.2%, measured).not reviewedEstablishedA