claudestat-mcp-bundle
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claudestat-mcp-bundlelist available tools"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-bundleRelated MCP server: wrapmcp
Quick start
claudestat-mcpThen 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 stdinstop()— close stdin listeneraddTool(def)— register a tool at runtimeremoveTool(name)— unregister a tooltools— current tool list (readonly)
Options: { tools?, name?, version?, contextPolling? }
License
MIT
Available Tools
9 toolsget_context_statusA
Get current context window usage for the latest session: used tokens, window size, percentage, and model
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses return fields but no behavioral traits beyond that. No annotations provided, so description doesn't confirm read-only or safety. Minimal but not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key information. Every word contributes; no fluff. Concise and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers essential output details despite lacking output schema. Could briefly clarify what 'latest session' refers to (e.g., current session vs last resumed), but overall sufficient for a simple parameterless tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, schema coverage 100%. Baseline 4 applies because description doesn't need to add parameter details. No additional value needed but also no gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly specifies verb 'Get', resource 'context window usage', and enumerates returned fields (used tokens, window size, percentage, model). Differentiates from siblings like get_quota_status and get_current_session by focusing on context usage.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implied usage for checking context usage, but no explicit guidance on when to use this versus sibling tools like get_quota_status or get_current_session. Adequate but lacks strategic direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_current_sessionA
Get details about the most recent Claude Code session: cost, tokens, efficiency score, and loops detected
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the return fields (cost, tokens, efficiency score, loops detected) but lacks details on authentication requirements, rate limits, or any side effects. With no annotations, the description carries the full burden, but it is minimally adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with key information. Every word adds value, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, parameters, or annotations, the description covers the essential return values. However, it could clarify scope (e.g., per-user session) or time window, which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema coverage is 100%. According to guidelines, 0 parameters warrants a baseline of 4, as there is no parameter information to provide beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves details about the most recent Claude Code session, listing specific outputs (cost, tokens, efficiency score, loops detected). This differentiates it from siblings like get_session_stats which likely aggregate over multiple sessions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking the latest session details, but does not provide explicit when-to-use or when-to-avoid guidance compared to alternative tools like get_quota_status or get_usage_insights.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_daily_summaryB
Get today's usage summary vs yesterday and 7-day personal average: cost, sessions, tokens, top tool, and weekly pace
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose any behavioral traits such as idempotency, side effects, rate limits, or performance considerations. The verb 'get' implies a read operation, but this is not explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that effectively front-loads the main purpose and includes key details. While concise, it could be slightly improved by breaking into smaller parts for readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description provides a reasonable overview of return data. However, it could be more exhaustive (e.g., mention if date or time is included) and better differentiate from sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters, so the description's role is to explain the output. It successfully adds meaning by detailing the contents of the summary (cost, sessions, tokens, etc.), which goes beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves today's usage summary with comparisons to yesterday and 7-day average, listing specific data points (cost, sessions, tokens, top tool, weekly pace). This distinctly differentiates it from siblings like get_quota_status or get_top_tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives. No 'when not to use' or explicit context for choosing among similar tools like get_usage_insights or get_session_stats.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_model_breakdownB
Get cost and session count broken down by Claude model (Sonnet, Haiku, Opus) for the last N days
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to look back (default 7) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for disclosing behavioral traits. It does not mention that the operation is read-only, whether it returns historical or live data, or any potential limitations like cost calculation delays. The description is purely functional without behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that conveys essential information without any filler. Every word adds value, making it highly concise and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has only one optional parameter and no output schema, the description adequately explains what the tool returns (cost and session count per model). It is complete enough for a simple aggregation tool, though it could mention whether results are aggregated across all users or current user.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'days', which is adequately described. The description reinforces the time scope but does not add new semantic information about the parameter. The mention of model breakdown relates to output, not parameter semantics, so no extra value over schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'cost and session count broken down by Claude model (Sonnet, Haiku, Opus) for the last N days'. It specifies the exact models and the time scope, making it highly specific and distinguishable from sibling tools like get_quota_status or get_current_session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like get_usage_insights or get_session_stats. It does not mention prerequisites, conditions, or exclusions, leaving the agent to infer usage context from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_quota_statusB
Get current Claude Code quota status: 5h cycle usage %, plan type, weekly hours per model, and burn rate (tokens/min)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavioral traits. It only lists output fields and implies a read operation, but does not mention safety, side effects, rate limits, or permissions. For a data retrieval tool, some reassurance of non-destructiveness or cost implications would be beneficial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words. Every element (verb, resource, listed fields) is functional and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description lists several output fields, which is helpful given no output schema, but lacks explanation of the '5h cycle' context, units for burn rate (though partly implied), and any mention of additional fields that might be returned. It is adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters are defined, and schema description coverage is 100% (trivially). The description adds no parameter information, but the baseline is 3 per guidelines since the schema already captures all needed info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as retrieving 'Claude Code quota status' and lists specific fields (usage %, plan type, weekly hours per model, burn rate), making the purpose unambiguous. However, it does not explicitly distinguish from sibling tools like get_usage_insights or get_weekly_insight, which may overlap.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only states what it does without any context about prerequisites, typical scenarios, or conditions where another tool would be preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_session_statsA
Get aggregated session statistics for the last N days: session count, total cost, total tokens, loops, and average efficiency
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Number of days to look back (1-90, default 7) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It lists metrics but does not disclose any side effects, performance, or limitations. Adequate for a simple read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is front-loaded with purpose and efficiently lists all key metrics. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description names metrics returned (session count, cost, tokens, etc.). However, it does not specify the response structure (e.g., single object vs array), which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the parameter 'days' is described in schema. The description adds minimal extra meaning beyond the schema, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb 'Get' and resource 'aggregated session statistics' with specific metrics listed. Differentiates from sibling tools like get_current_session and get_quota_status by focusing on aggregated data over time.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States use case 'for the last N days' but does not explicitly exclude alternatives or provide when-not-to-use guidance. Context is clear but lacks exclusionary criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_top_toolsB
Get the top 10 most used tools by cost, call count, or duration in the last N days
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to look back (default 30) | |
| sort_by | No | Sort by: cost, count, or duration (default cost) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It does not disclose behavioral traits such as read-only status, data freshness, or potential side effects. The description is minimal beyond the action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that front-loads the key action. It is concise and contains no filler, though it could benefit from a brief note on return format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description should explain what is returned (e.g., structure of top tools list). It does not, leaving ambiguity. Given sibling tools, more contextual details would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The description adds value by specifying 'top 10' and clarifying that sort_by options are 'cost, call count, or duration' (mirroring schema but reinforcing). This adds context beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves top 10 tools by specified metrics (cost, call count, duration) over a time window. It is clear and specific, but does not explicitly differentiate from sibling tools like get_usage_insights or get_model_breakdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor when to avoid it. The description only states what it does, not the context of use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_usage_insightsB
Get unique usage insights not available in /usage: cost per project, cache savings, output/input ratio, efficiency trend, and peak hours
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to look back (default 7) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description only lists output contents, no disclosure of authentication, side effects (e.g., rate limits, data freshness), or return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence front-loads purpose and lists specific insights, no filler. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite simple schema (1 optional param), no output schema exists. Description omits return structure or how insights are formatted, leaving the agent uncertain about response shape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already documents the single parameter 'days' with description; tool description adds no further detail. High schema coverage (100%) sets baseline at 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb 'Get' and resource 'unique usage insights', listing specific metrics (cost per project, cache savings, etc.). It distinguishes from '/usage' endpoint, indicating unique value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implied usage when wanting insights not in /usage, but no explicit when-not-to-use or alternatives relative to sibling tools like get_quota_status.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_weekly_insightB
Get the weekly usage summary with an actionable tip (same as claudestat weekly command)
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days to look back (default 7) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only mentions the output (summary with tip) without disclosing additional behavioral traits such as read-only nature, auth requirements, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the core purpose and a reference to a known command, with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations, output schema, and multiple sibling tools, the description is too minimal; it does not explain behavior for edge cases, prerequisites, or how it differs from tools like get_usage_insights.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of the single parameter with a description of its meaning and default. The tool description does not add extra semantic value beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a weekly usage summary with an actionable tip, and distinguishes it from siblings like get_daily_summary by specifying 'weekly' and the tip aspect.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description compares to 'claudestat weekly' command, offering a hint for users familiar with that CLI, but lacks explicit when-to-use or when-not-to-use guidance compared to other get_* tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v0.1.0- First observed
get_context_status - First observed
get_current_session - First observed
get_daily_summary - First observed
get_model_breakdown - First observed
get_quota_status - First observed
get_session_stats - First observed
get_top_tools - First observed
get_usage_insights - First observed
get_weekly_insight
TDQS
Scored across 9 tools
Each tool targets a distinct aspect of Claude Code usage (quota, session, context, model breakdown, etc.) with clear descriptions, eliminating ambiguity.
All tools use a consistent 'get_' prefix followed by a descriptive noun phrase in snake_case, e.g., get_quota_status, get_current_session.
9 tools is an appropriate size for a usage analytics server, covering various queries without being excessive or insufficient.
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
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal 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.3MIT
- AlicenseNot gradedqualityCmaintenanceUniversal MCP server that wraps any CLI tool, enabling AI assistants to run commands via natural language.MIT
- AlicenseNot gradedqualityDmaintenanceTurns 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
- FlicenseNot gradedqualityBmaintenanceProvides a secure interface to run Anthropic's Claude Code CLI as an MCP server, enabling task execution, persistent memory, and integration with MCP-enabled IDEs.-