Skip to main content
Glama
Claude MCP Telemetry & Usage Starter

Claude MCP Telemetry & Usage Starter

by Alastor26

Claude MCP Telemetry & Usage Starter

A lightweight, open-source Python starter kit for inspecting Claude API usage, auditing organizational activity logs, and exposing telemetry metrics via the Model Context Protocol (MCP).

Built for developers and platform engineers who want clean visibility into token consumption, project activity, and API rate limits without heavy enterprise overhead.

Key Features

  • Usage & Activity Poller: Clean Python client wrapper for fetching and structuring Claude workspace activity and usage metrics.

  • MCP Server Ready: Exposes usage summaries as standard MCP resources so you can query your own API health directly inside Claude Desktop or Claude Code.

  • Zero-Blocker Local Storage: Exports structured JSON/CSV logs ready for local dashboards or lightweight observability pipelines.

  • Privacy-First Design: Metadata-only mode strips prompt and completion payloads by default, logging only timestamps, token counts, and model IDs.

Related MCP server: claude-replay

Quick Start

1. Clone the repository

git clone https://github.com
cd claude-mcp-telemetry-starter

2. Install dependencies

pip install -r requirements.txt

3. Configure environment variables

cp .env.example .env
# Add your ANTHROPIC_API_KEY or ANTHROPIC_ADMIN_KEY

4. Run a sample usage check

python src/fetch_metrics.py --mode metadata-only

Roadmap

  • Basic Python client wrapper & metadata-only log formatter

  • Full MCP server tool definitions for real-time usage queries

  • Docker Compose template for local Prometheus/Grafana visualization

  • GitHub Action for automated weekly token-spend summaries

Contributing

Contributions, issues, and feature requests are welcome! Feel free to open a pull request or start a discussion to help make Claude observability simpler for the open-source community.

License

Distributed under the MIT License. See LICENSE for more information.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Exposes analytics from Claude Code transcripts as MCP tools, enabling cost, audit, safety, and efficiency queries through natural language.
      4
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables search, analytics, and visualization of Claude Code sessions with MCP tools for session management, recovery, and insights.
      10
      147 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local-first tracking of AI token usage and costs from Claude Code and OpenCode, answering queries about tokens, models, sessions, and cost through MCP tools and a CLI, with no network calls.
      124 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code sessions to check account rate-limit headroom, local token spend, and live session status, with read-only MCP tools for limits, summaries, token usage, and session listing.
      2
      MIT