npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cursor-ia-consumption-tracker

v1.0.1

Published

MCP server for tracking AI consumption data from Cursor IDE with simplified logging and platform integration

Downloads

14

Readme

cursor-ia-consumption-tracker

npm version License: MIT

A simplified MCP (Model Context Protocol) server for tracking AI consumption data from Cursor IDE with platform integration and token logging.

Features

  • 🚀 Simple Setup - Easy integration with Cursor IDE via MCP
  • 📊 Consumption Tracking - Automatic token usage and query analysis
  • 🔄 Platform Integration - Sends data to your tracking platform
  • 🎯 Agent Detection - Supports multiple AI agents (Claude, GPT, etc.)
  • 📝 Clean Logging - Structured JSON logs with essential metrics
  • Lightweight - Minimal dependencies and overhead

Installation

Global Installation (Recommended)

npm install -g cursor-ia-consumption-tracker

Local Installation

npm install cursor-ia-consumption-tracker

Setup with Cursor IDE

  1. Add to your Cursor MCP configuration (~/.cursor/mcp.json):
{
  "mcpServers": {
    "ia-consumption-tracker": {
      "command": "node",
      "args": ["node_modules/cursor-ia-consumption-tracker/auto-logger.js"],
      "env": {
        "PLATFORM_HOST": "https://your-platform.com",
        "PLATFORM_ROUTE": "/api/track",
        "CLIENT_ID": "your-client-id",
        "PROJECT_NAME": "your-project-name",
        "AGENT_NAME": "claude-4-sonnet"
      }
    }
  }
}
  1. For global installation:
{
  "mcpServers": {
    "ia-consumption-tracker": {
      "command": "ia-consumption-mcp",
      "env": {
        "PLATFORM_HOST": "https://your-platform.com",
        "PLATFORM_ROUTE": "/api/track",
        "CLIENT_ID": "your-client-id",
        "PROJECT_NAME": "your-project-name",
        "AGENT_NAME": "claude-4-sonnet"
      }
    }
  }
}

Configuration

Environment Variables

| Variable | Description | Required | Default | |----------|-------------|----------|---------| | PLATFORM_HOST | Your tracking platform URL | Yes | https://localhost:8069 | | PLATFORM_ROUTE | API endpoint for tracking | Yes | /ia_tracker/track | | CLIENT_ID | Your client identifier | Yes | cursor_default_client | | PROJECT_NAME | Project name for tracking | Yes | cursor_mcp_logger | | AGENT_NAME | AI agent name | No | cursor-agent |

Usage

Once configured, the MCP server provides one tool:

send_consumption

Automatically tracks and sends consumption data for each chat interaction.

Parameters:

  • user_query (required): The user's question/request
  • response_length (optional): Actual response character count

Example Response:

📊 CONSUMPTION SENT: auto_1758109135068
Agent: claude-4-sonnet
Query: "Hello world"
Tokens: 5 (3+2)
Platform: Sent to https://your-platform.com/api/track

Data Structure

The consumption data sent to your platform includes:

{
  "cursor_data": {
    "request_id": "auto_1758109135068",
    "timestamp": "2024-01-20T10:30:00.000Z",
    "session_id": "session_12345_1705748200",
    "agent_name": "claude-4-sonnet",
    "agent_info": {
      "agent_name": "claude-4-sonnet",
      "session_agent": "claude-4-sonnet"
    },
    "request_data": {
      "type": "chat_completion",
      "query_text": "Hello world",
      "query_length": 11,
      "word_count": 2,
      "query_type": "general",
      "complexity": "low",
      "language": "english",
      "has_code": false
    },
    "token_metrics": {
      "input_tokens": 3,
      "output_tokens": 2,
      "total_tokens": 5,
      "estimation_method": "input_ratio_2.5x"
    },
    "session_context": {
      "total_interactions": 1,
      "workspace": "/path/to/workspace",
      "platform": "darwin"
    }
  }
}

Development

Local Development

# Clone the repository
git clone https://github.com/vunkers/ia-consumption-tracker.git
cd ia-consumption-tracker

# Install dependencies
npm install

# Start development server
npm run dev

Testing

npm test

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release
  • Simple consumption tracking
  • Platform integration
  • Agent detection support
  • Cursor IDE integration

Made with ❤️ by Arkiphere Cloud LLC