{"_id":"@anatoly314/claude-usage-mcp","name":"@anatoly314/claude-usage-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@anatoly314/claude-usage-mcp","version":"0.1.0","description":"MCP server exposing Claude subscription usage (session/weekly/per-model limits)","type":"module","main":"dist/index.js","bin":{"claude-usage-mcp":"dist/index.js"},"scripts":{"build":"tsc","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","start":"node dist/index.js","prepublishOnly":"npm run clean && npm run build","pack:local":"rm -f *.tgz && npm run clean && npm run build && npm pack","install:local":"npm install -g ./anatoly314-claude-usage-mcp-*.tgz","uninstall:local":"npm uninstall -g @anatoly314/claude-usage-mcp"},"keywords":["mcp","claude","claude-code","usage","model-context-protocol"],"author":{"name":"Anatoly Tarnavsky"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anatoly-lab/claude-usage-mcp.git"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0"},"devDependencies":{"@types/node":"^26.4.0","typescript":"^7.0.2"},"_id":"@anatoly314/claude-usage-mcp@0.1.0","gitHead":"209f8997658c43f8b05689f6c0745e8ea3348c37","bugs":{"url":"https://github.com/anatoly-lab/claude-usage-mcp/issues"},"homepage":"https://github.com/anatoly-lab/claude-usage-mcp#readme","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-2n4gVFCVo6Dfc2Lz9GevLVUeqjyoMTfpwVzFQmJxupLOxfnubp2EklFxbEECQkFalhxArmlZ84z81QSf5YSefQ==","shasum":"b0471d5b277260630f94e8207ce153dc170a5973","tarball":"https://registry.npmjs.org/@anatoly314/claude-usage-mcp/-/claude-usage-mcp-0.1.0.tgz","fileCount":6,"unpackedSize":17634,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIErtq06gECYECwu3fwF4cg+vh7fY3E5czMfEixMC2LhaAiB34kmzlDviArb3FgpTGJdYwS/BLwscCAK/TFCJkyrRhg=="}]},"_npmUser":{"name":"anatoly314","email":"anatolyt@gmail.com"},"directories":{},"maintainers":[{"name":"anatoly314","email":"anatolyt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/claude-usage-mcp_0.1.0_1788265935631_0.7107524434929056"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-01T12:32:15.303Z","0.1.0":"2026-09-01T12:32:15.754Z","modified":"2026-09-01T12:32:16.075Z"},"maintainers":[{"name":"anatoly314","email":"anatolyt@gmail.com"}],"description":"MCP server exposing Claude subscription usage (session/weekly/per-model limits)","homepage":"https://github.com/anatoly-lab/claude-usage-mcp#readme","keywords":["mcp","claude","claude-code","usage","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/anatoly-lab/claude-usage-mcp.git"},"author":{"name":"Anatoly Tarnavsky"},"bugs":{"url":"https://github.com/anatoly-lab/claude-usage-mcp/issues"},"license":"MIT","readme":"# claude-usage-mcp\n\nAn MCP server that reports your real Claude subscription usage — 5-hour\nsession window, weekly limit, and per-model limits — pulled from the same\nendpoint Claude Code's `/usage` command uses.\n\n## Requirements\n\n- macOS or Linux\n- Node.js 20+\n- Claude Code logged in on a Pro, Max, or Team plan\n\nThis server reads Claude Code's own OAuth access token (from the macOS\nKeychain, or `~/.claude/.credentials.json` as a fallback). It never asks for\nor stores credentials itself.\n\n## Install / configure\n\nAdd to your `.mcp.json`.\n\nLocal build:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-usage\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/claude-usage-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\nOr via npx:\n\n```json\n{\n  \"mcpServers\": {\n    \"claude-usage\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anatoly314/claude-usage-mcp\"]\n    }\n  }\n}\n```\n\n## Tool\n\n### `get_usage`\n\nTakes no arguments. Returns the current usage snapshot as JSON.\n\n```json\n{\n  \"session_5h\": { \"utilization_percent\": 42, \"resets_at\": \"2026-09-01T18:00:00Z\" },\n  \"weekly_7d\": { \"utilization_percent\": 61, \"resets_at\": \"2026-09-05T00:00:00Z\" },\n  \"model_limits\": [\n    {\n      \"model\": \"Opus\",\n      \"kind\": \"weekly_scoped\",\n      \"utilization_percent\": 51,\n      \"resets_at\": \"2026-09-05T00:00:00Z\",\n      \"is_active\": true\n    }\n  ],\n  \"fetched_at\": \"2026-09-01T15:04:00Z\",\n  \"stale\": false\n}\n```\n\nIf a fetch fails, the last successful response is served instead with\n`stale: true` and `stale_age_seconds` set.\n\n## Notes\n\n- This uses an undocumented Anthropic endpoint. It may change or break\n  without notice.\n- Responses are cached for 120 seconds; after a failed fetch, further\n  requests back off for 60 seconds before retrying, to avoid hammering the\n  API.\n- Everything stays local — no data leaves your machine except the request to\n  Anthropic's usage endpoint.\n","readmeFilename":"README.md","_rev":"1-0299dc0769d0cd9352621b033e246564"}