Skip to main content
Glama
claudestat-mcp-bundle

claudestat-mcp-bundle

by DeibyGS

claudestat-mcp-bundle

MCP server bundle for @statforge/claudestat — wraps createMcpServer() into a standalone package with CLI and programmatic import.

Install

npm install -g @statforge/claudestat-mcp-bundle

Related MCP server: wrapmcp

Quick start

claudestat-mcp

Then add to Claude Code's claude.json:

{
  "mcpServers": {
    "claudestat": {
      "command": "claudestat-mcp"
    }
  }
}

Programmatic usage

import { createMcpServer } from '@statforge/claudestat-mcp-bundle'

const server = createMcpServer({
  contextPolling: true,
  tools: [
    { name: 'my_tool', description: 'Does something', inputSchema: {}, handler: () => 'hello' },
  ],
})
server.start()

API

createMcpServer(options?) returns an McpServer with:

  • start() — begin listening on stdin

  • stop() — close stdin listener

  • addTool(def) — register a tool at runtime

  • removeTool(name) — unregister a tool

  • tools — current tool list (readonly)

Options: { tools?, name?, version?, contextPolling? }

License

MIT

Available Tools

9 tools
get_context_statusA

Get current context window usage for the latest session: used tokens, window size, percentage, and model

Inputs: no named parameters.

get_current_sessionA

Get details about the most recent Claude Code session: cost, tokens, efficiency score, and loops detected

Inputs: no named parameters.

get_daily_summaryB

Get today's usage summary vs yesterday and 7-day personal average: cost, sessions, tokens, top tool, and weekly pace

Inputs: no named parameters.

get_model_breakdownB

Get cost and session count broken down by Claude model (Sonnet, Haiku, Opus) for the last N days

Inputs: days.

get_quota_statusB

Get current Claude Code quota status: 5h cycle usage %, plan type, weekly hours per model, and burn rate (tokens/min)

Inputs: no named parameters.

get_session_statsA

Get aggregated session statistics for the last N days: session count, total cost, total tokens, loops, and average efficiency

Inputs: days.

get_top_toolsB

Get the top 10 most used tools by cost, call count, or duration in the last N days

Inputs: days, sort_by.

get_usage_insightsB

Get unique usage insights not available in /usage: cost per project, cache savings, output/input ratio, efficiency trend, and peak hours

Inputs: days.

get_weekly_insightB

Get the weekly usage summary with an actionable tip (same as claudestat weekly command)

Inputs: days.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of Claude Code usage (quota, session, context, model breakdown, etc.) with clear descriptions, eliminating ambiguity.

    Naming Consistency5/5

    All tools use a consistent 'get_' prefix followed by a descriptive noun phrase in snake_case, e.g., get_quota_status, get_current_session.

    Tool Count5/5

    9 tools is an appropriate size for a usage analytics server, covering various queries without being excessive or insufficient.

    Completeness5/5

    The tool set covers all major usage analytics: quota, session details, aggregated stats, top tools, insights, model breakdown, context, daily and weekly summaries, with no obvious gaps.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Local MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Universal MCP server that wraps any CLI tool, enabling AI assistants to run commands via natural language.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Turns any CLI tool or REST API into an MCP server for Claude, enabling Claude to use git, databases, or any API through natural language.
      MIT