Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cursor AI Usage TrackerNew to Visual Studio Code? Get it now.
Cursor AI Usage Tracker

Cursor AI Usage Tracker

mce

|
3 installs
| (0) | Free
View per-user AI usage metrics—cost in USD, input/output tokens, and model usage—in a sidebar panel
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cursor AI Usage Tracker

A Cursor extension that displays per-user AI usage metrics in a sidebar panel: cost in USD, input/output tokens, cache tokens, and model breakdown.

Requirements

  • Cursor Enterprise with a Cursor Enterprise team
  • Session Token (recommended) or Analytics API key from cursor.com/settings

Authentication Options:

  • Session Token (recommended): Use the Chrome extension to copy WorkosCursorSessionToken from cursor.com/dashboard cookies
  • API Key: From cursor.com/settings (provides limited data - no cost/tokens)

Uses the Dashboard API (with session token) for full metrics including cost, tokens, and detailed usage. Falls back to Analytics API with API key for basic metrics.

Running Without Installing

Option 1: Extension Development Host (F5)

  1. Open the project in Cursor.
  2. Press F5 or run Run → Start Debugging and choose "Debug Cursor AI Usage Tracker".
  3. A new Cursor window opens with the extension loaded. Open the AI Usage view from the Activity Bar.

Option 2: Standalone Browser Preview (Real Data)

Run the UI in a browser with real data from the Cursor API:

cd devTools/cursor-ai-usage-tracker
npm run dev:standalone

Then open http://localhost:5173/ in your browser.

  1. Enter your session token in the bar at the top (use the Chrome extension → Copy Token from cursor.com/dashboard cookies).
  2. Set Team ID if different from default (123456).
  3. Click Save, then Refresh in the app to load your real usage data.

Installation

  1. Build the extension:

    cd devTools/cursor-ai-usage-tracker
    npm install
    npm run build
    
  2. Install into Cursor:

    pnpm run install-extension
    
  3. Reload Cursor.

Usage

  1. Open the AI Usage view from the Activity Bar (chart icon).
  2. When prompted, configure authentication:
    • Session Token (recommended): Install the Chrome extension, copy the token from cursor.com/dashboard, then paste in Configure
  3. Select a date range and click Refresh to load data.

Status Bar: Shows last request cost and today's total (updates every 20 seconds). Click to open the AI Usage view.

Features

  • Per-user metrics: Cost, tokens (input/output/cache), Tab lines (accepted/suggested), Agent lines (accepted/suggested)
  • Model breakdown: Expand a user row to see message count and cost by model
  • Cost insights: Daily cost breakdown, top expensive requests, cost by model/user
  • Team summary: Total lines accepted, cost, and active user count
  • Status bar: Last request cost and today's total (updates every 20 seconds)
  • Date range: Custom date range or preset (1-90 days)

Troubleshooting

Viewing error details

When an error occurs, full details are logged to the Output panel:

  1. Go to View → Output
  2. Select "Cursor AI Usage Tracker" from the dropdown
  3. Check the log for the full error message and stack trace

Updating or refreshing your authentication

  • Configure: Command palette → "Cursor AI Usage: Configure API Key or Session Token", or click the Auth button in the AI Usage view
    • Session Token: Install Chrome extension, copy token from cursor.com/dashboard, then paste
    • API Key: Enter your Analytics API key from cursor.com/settings
  • Clear: Command palette → "Cursor AI Usage: Clear API Key" (removes stored credentials)

Common errors

  • 401 Invalid session token: The token is expired or invalid. Get a new one from cursor.com/dashboard using the Chrome extension.
  • 401 Invalid API key: The key is wrong or revoked. Use Configure to enter a new one.
  • 403 Access denied (Enterprise required): Your team is not on an Enterprise plan, or the credentials lack permissions.
  • Rate limit exceeded: Wait a minute and retry. The extension throttles requests automatically.

API Reference

Uses multiple Cursor APIs:

Dashboard API (with session token - full features):

  • GET /api/dashboard/get-filtered-usage-events - Usage events with cost and tokens
  • GET /api/dashboard/usage-summary - Team usage summary and billing info
  • GET /api/dashboard/team - Team members

Analytics API (with API key - basic features):

  • GET /analytics/team/leaderboard - Per-user lines accepted (Tab + Agent)
  • GET /analytics/by-user/models - Model usage (messages) per user
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft