Skip to main content
Glama
DeibyGS

claudestat-mcp-bundle

by DeibyGS
README.md
# claudestat-mcp-bundle

MCP server bundle for [`@statforge/claudestat`](https://github.com/DeibyGS/claudestat) — wraps `createMcpServer()` into a standalone package with CLI and programmatic import.

## Install

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

## Quick start

```bash
claudestat-mcp
```

Then add to Claude Code's `claude.json`:

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

## Programmatic usage

```ts
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

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

ActivitySlowing
ResponsivenessNo issues