usagebar MCP server
2026년 10월 15일 커밋Claude Code의 플랜 할당량과 세션 컨텍스트 사용량을 모니터링할 수 있는 macOS 메뉴 바 인터페이스 및 MCP tool을 제공합니다.
다른 이름 dnlbit/usagebar
- 스타
- 1
- Tools
- 2
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 15일
- 라이선스
- MIT
usagebar MCP란?
usagebar은(는) MCP server입니다. Claude Code의 플랜 할당량과 세션 컨텍스트 사용량을 모니터링할 수 있는 macOS 메뉴 바 인터페이스 및 MCP tool을 제공합니다. 2개 도구를 제공합니다. 예: plan, context.
프로젝트 README에서 생성된 요약
usagebar MCP server 정보
usagebar는 개발자가 macOS 메뉴 바에서 Claude Code의 플랜 할당량과 세션 컨텍스트를 모니터링할 수 있게 해줍니다. 작업 중, 사용자 대기, 차단됨과 같은 활성 세션 상태와 함께 세션 및 주간 할당량 백분율을 추적할 수 있는 시각적 인터페이스를 제공합니다. 이 tool은 macOS 메뉴 바에 리셋 카운트다운과 세션 상세 정보를 직접 표시하여 사용자가 리소스를 관리할 수 있도록 돕습니다.
시각적 인터페이스 외에도, 이 server는 AI 에이전트가 자신의 소비량을 검사할 수 있는 get_usage라는 MCP tool을 제공합니다. 에이전트는 현재 플랜 할당량과 세션 컨텍스트 내의 특정 토큰 수를 확인할 수 있습니다. 이를 통해 에이전트는 대규모 리팩토링을 진행할지, 작업을 분할할지, 아니면 할당량 리셋을 기다릴지 결정할 수 있습니다. 시스템은 Claude Code 출력과 프로젝트 트랜스크립트를 파싱하여 로컬에서 작동하므로 모든 데이터가 사용자의 머신에 안전하게 유지됩니다.
설치를 위해서는 macOS와 PATH에 설정된 Claude CLI가 필요합니다. Homebrew 또는 쉘 스크립트를 통해 설치할 수 있습니다. MCP tool은 메뉴 바 앱이 실행 중이지 않더라도 claude -p /usage 명령을 직접 실행하여 작동합니다.
활용 사례
- 1대규모 에이전트 작업 예산 관리AI 에이전트가 남은 할당량을 확인하여 대규모 리팩토링을 시작할지 아니면 리셋을 기다릴지 결정할 수 있습니다.
- 2세션 컨텍스트 제한 모니터링개발자는 에이전트가 모델의 최대 컨텍스트 윈도우에 도달하는 것을 방지하기 위해 토큰 사용량을 모니터링하도록 지시할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
usagebar MCP 도구 2
README에서 감지됨plancontext
| plan | — | |
| context | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능dnlbit/usagebar is public and reachablegithub.com/dnlbit/usagebar ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-15github.com/dnlbit/usagebar ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음2 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기usagebar
Your Claude Code plan quota in the macOS menu bar, plus an MCP tool so agents can check the quota and their own context size before starting big work. An agent can decide to wait for a reset, split work, or stop before it hits the limit.
Not affiliated with Anthropic. It reads what claude -p /usage prints and the
transcripts Claude Code keeps in ~/.claude/projects/. Neither format is documented,
so a Claude Code release can break parsing until usagebar is updated.
Install
Homebrew
brew install dnlbit/tap/usagebar
brew services start usagebar
claude mcp add usagebar -s user -- "$(brew --prefix)/opt/usagebar/bin/usagebar-mcp"
brew services start starts the menu bar app now and at login. Update with
brew upgrade usagebar: the in-app updater is off for Homebrew installs. Needs
claude on your PATH (~/.local/bin, /opt/homebrew/bin or /usr/local/bin).
Uninstall:
brew services stop usagebar
brew uninstall usagebar
claude mcp remove usagebar -s user
Install script
curl -fsSL https://usagebar.dnlbit.com/install.sh | sh
Installs into ~/.local/share/usagebar (Python venv with rumps), starts at login,
and prints the claude mcp add command for the MCP tool. Needs macOS, python3 3.10+
and claude on your PATH.
Updates: the app checks GitHub Releases once a day and shows "Update to vX.Y.Z" in its menu. Click it to install and restart. Nothing updates without that click. Rerunning the install command also updates.
Uninstall:
launchctl bootout gui/$(id -u)/com.dnlbit.usagebar
rm -rf ~/.local/share/usagebar ~/Library/LaunchAgents/com.dnlbit.usagebar.plist \
~/.config/usagebar.json ~/.cache/usagebar
claude mcp remove usagebar -s user
Menu bar
The bar shows the current session quota (▰▰▱▱▱ 48%), then the open Claude Code
sessions counted per state: working, your turn, blocked (▰▰▱▱▱ 48% ●1 ○2 ⚠1).
States with no sessions are not shown (▰▰▱▱▱ 48% ●1 ○2). Hover for the reset time, click
for each quota with "in 1h 52m" after its reset time.
Plans without quota lines in /usage (enterprise) show the session counts only (●1 ○2 ⚠1).
With nothing to count (no quotas and no counted sessions) the bar shows ◉.
Sessions
The menu lists each open Claude Code session, newest change first:
<state> <name> <context>% context <status>.
●working: Claude is working or running a tool.○your turn: the turn is finished and the session waits for your next message. "your turn (background shell)": a background shell command still runs, but you can type.⚠blocked: the session needs you, for example a permission prompt (the row shows why).·a status this version does not know; the raw value shows. It is not counted in the bar.
Click a session to bring its terminal to the front. In Terminal.app and iTerm2 its tab is selected (macOS asks once for Automation permission). In other apps (Ghostty, VS Code, Cursor, Warp…) the app only comes to the front.
Session data comes from ~/.claude/sessions/*.json and the transcripts in
~/.claude/projects. Claude Code does not document these files, so a Claude Code
update can change or break this part.
Settings… holds:
- Idle interval (default 20 min): poll rate while usage is flat.
- Active interval (default 5 min): used after a poll sees the percentages change, until a poll sees no change.
- Auto start at login: writes
~/Library/LaunchAgents/com.dnlbit.usagebar.plist(unchecking removes it). Takes effect at next login. Homebrew installs have no checkbox: usebrew services start usagebarto start at login. - Notify: blocked (permission prompt) (default on): a notification when a session becomes blocked, for example on a permission prompt.
- Notify: your turn (finished) (default on): a notification when a session finishes a turn that ran for 2 seconds or more and waits for your reply.
Settings are saved to ~/.config/usagebar.json. Log: /tmp/usagebar.log.
MCP tool
mcp_server.py (standard library only) gives agents one tool, get_usage, returning:
plan: quota percentages and reset times, shared with the menu bar app through~/.cache/usagebar/last.json. If that is older thanmax_age_minutes(default 2; 0 forces it), the tool runsclaude -p /usageitself (about 2s), so it works without the app.fetched_atsays how fresh it is.context: tokens in the calling Claude Code session's context, the model's max window (hard-coded table inmonitor.py) and percent used.
Either part comes back as {"error": ...} on its own if it fails. Example (text,
the raw /usage output, shortened):
{
"plan": {
"fetched_at": "2026-10-13T22:53:05-07:00",
"error": null,
"quotas": {
"Current session": {"percent_used": 41, "resets_at": "2026-10-13T23:59:00-07:00"},
"Current week (all models)": {"percent_used": 16, "resets_at": "2026-10-20T15:59:00-07:00"},
"Current week (Fable)": {"percent_used": 0, "resets_at": "2026-10-20T16:00:00-07:00"}
},
"text": "You are currently using your subscription to power your Claude Code usage\n\nCurrent session: 41% used …"
},
"context": {
"session_id": "a659f724-dd01-40c3-bcbe-6a3d33bd43a6",
"model": "claude-opus-5-5",
"context_tokens": 135210,
"window_tokens": 1000000,
"percent_used": 13.5
}
}
Let your agents budget themselves
Paste this into your project or user CLAUDE.md (after the MCP setup above):
## Usage budget
- Before long or parallel work, and about every hour during it, call the
`mcp__usagebar__get_usage` tool.
- If the session quota is above 80%, finish the current step, then stop or wait
for the reset time it reports.
- If context is above 50%, compact or hand off to a fresh session.
Privacy
Everything stays on your machine. The only network requests are the ones claude
makes itself and the daily update check to api.github.com.
Development
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
./run.sh
python3 monitor.py --test && python3 mcp_server.py --test
A git checkout never offers updates. Release: bump __version__ in monitor.py,
commit, then gh release create vX.Y.Z --generate-notes. Tags are never moved or re-pointed; fix a bad release with a new version.
usagebar MCP 질문
usagebar MCP는 어떤 도구를 제공하나요?
2개 도구를 제공합니다. 예: plan, context.
에이전트가 이 tool을 어떻게 사용할 수 있나요?
에이전트는 get_usage tool을 사용하여 플랜 할당량 백분율, 리셋 시간, 그리고 자신의 컨텍스트 윈도우 사용량을 확인하여 작업을 계속할지 아니면 리셋을 기다릴지 결정할 수 있습니다.
이 tool이 데이터를 클라우드로 전송하나요?
아니요, GitHub를 통한 일일 업데이트 확인 및 Claude Code가 자체적으로 수행하는 요청을 제외한 모든 데이터는 로컬 머신에 유지됩니다.