Claudestat logo

Claudestat

by @statforge

Local MCP observability for Claude Code and OpenCode usage, costs, quotas, sessions, tools, models, and context.

Install Claudestat

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "statforge-claudestat": {
      "command": "npx",
      "args": [
        "-y",
        "@statforge/claudestat-mcp-bundle"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio statforge-claudestat -- npx -y @statforge/claudestat-mcp-bundle

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @statforge/claudestat-mcp-bundle

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@statforge/claudestat connects Claude Code and OpenCode telemetry to an MCP interface for querying local usage data. Its nine tools report quota status, session costs, token usage, tool activity, model breakdowns, context consumption, and usage insights. Data is collected locally in SQLite as agent events occur, without cloud dependencies. Reach for it when an AI coding agent needs to inspect its own spending, efficiency, quota pace, or recent activity.

Use cases

  • Check current Claude Code quota usage before starting a long task
  • Compare model costs and session counts over recent days
  • Identify tools responsible for the largest share of agent spending
  • Inspect context usage and efficiency during coding sessions

Key features

  • Local SQLite-backed telemetry
  • Claude Code and OpenCode monitoring
  • Quota, cost, token, and session reporting
  • Tool, model, project, and context analysis
  • Weekly and daily usage insights

Tools9

What Claudestat lets your agent do. Expand a tool for its parameters.

Verified live~493 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 36d

What it can do

From the 9 tools this server returned when we ran it.

Handles credentials · 5Read-only tools · 9
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceNot published
Package age110 days
Maintainers1

Observed 2026-11-14 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · @statforge/claudestat-mcp-bundle (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars34Stargazers on the source repository.
npm downloads38Package downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed9Callable tools this server registers over MCP.

How Claudestat works

What @statforge/claudestat does

@statforge/claudestat exposes local observability data from Claude Code and OpenCode through the Model Context Protocol. It is designed for developers who want an agent to answer questions about its own usage rather than relying only on post-session reports.

The server covers operational and historical views, including current quota consumption, recent session details, aggregated activity, tool costs, model usage, context-window status, and daily or weekly trends. It can also surface cache savings, input-to-output ratios, efficiency changes, peak usage hours, project-level costs, and detected loops where those values are available from the collected telemetry.

Telemetry stays on the local machine. The wider claudestat project stores event data in SQLite and supports monitoring for both Claude Code and OpenCode, including tool calls, agents, MCP activity, sessions, and orchestration.

How it works

claudestat hooks into Claude Code events as they happen instead of waiting for a completed session. The resulting local records support both current-state queries and summaries over a selected number of days. MCP clients can invoke the server's tools from an agent conversation after the server has been registered.

The server can be registered with Claude Code using:

Terminal
claude mcp add claudestat -s user -- claudestat-mcp

The project also provides a standalone MCP bundle named @statforge/claudestat-mcp-bundle. The broader package includes a local daemon and dashboard, while the MCP interface focuses on returning usage information to an AI coding agent.

Setup and configuration

Node.js 22 or newer is required. The package supports macOS, Linux, and Windows, and Claude Code must be installed for the Claude Code monitoring workflow. A basic installation is:

Terminal
npm install -g @statforge/claudestat && claudestat setup

Running claudestat setup installs Claude Code hooks and registers the daemon as a user-level system service. After setup, the MCP command can be added to Claude Code with the registration command above. The project is local-first and does not require a cloud service.

Tools and capabilities

The MCP interface provides nine read-oriented tools:

  • get_quota_status reports the current five-hour cycle percentage, plan type, weekly hours by model, and token burn rate.
  • get_current_session returns the latest session's cost, tokens, efficiency score, and detected loops.
  • get_session_stats aggregates session count, cost, tokens, loops, and average efficiency for a chosen number of days.
  • get_top_tools ranks the ten most-used tools by cost, call count, or duration over a selected period.
  • get_usage_insights provides project costs, cache savings, output-to-input ratio, efficiency trends, and peak hours.
  • get_model_breakdown groups cost and session count by Sonnet, Haiku, and Opus.
  • get_weekly_insight returns the weekly usage summary and an actionable tip.
  • get_context_status reports latest-session context tokens, window size, percentage used, and model.
  • get_daily_summary compares today's cost, sessions, tokens, and top tool with yesterday and the user's seven-day average, including weekly pace.

Limitations and notes

The MCP tools are intended for usage inspection rather than controlling coding-agent sessions. Their results depend on telemetry collected from the supported Claude Code and OpenCode workflows. Node.js 22 or newer is needed because the project relies on node:sqlite.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Claudestat

@statforge/claudestat is an MCP server that connects Claude Code and OpenCode usage telemetry to agent-accessible reporting tools. Its main tools cover quota status, current and historical sessions, top tools, usage insights, model costs, weekly summaries, context status, and daily usage. Data is collected locally rather than sent to a cloud service.

Install the package globally with `npm install -g @statforge/claudestat`, then run `claudestat setup`. To register the MCP server with Claude Code, use `claude mcp add claudestat -s user -- claudestat-mcp`. Node.js 22 or newer is required.

It reports quota status, session costs and tokens, aggregate activity, top tools, model breakdowns, context-window usage, daily summaries, and weekly insights. It can also expose project costs, cache savings, efficiency trends, peak hours, and detected loops from collected telemetry.

Yes, @statforge/claudestat supports OpenCode as well as Claude Code. The project can monitor OpenCode sessions and combine or filter telemetry from both sources, while the MCP tools provide usage reporting to the connected agent.

No. @statforge/claudestat is designed to run locally, stores telemetry in SQLite, and has zero cloud dependencies. It supports macOS, Linux, and Windows.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewClaudestat AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/statforge-claudestat?style=directory)](https://allmcps.com/mcp/statforge-claudestat)
HTML Embed
<a href="https://allmcps.com/mcp/statforge-claudestat"><img src="https://allmcps.com/api/badge/statforge-claudestat?style=directory" alt="Claudestat on AllMCPs" /></a>