ofershap/cursor-usage

💻 Developer Tools
0 Views
0 Installs

📇 🏠 - Enterprise AI coding usage analytics — track spend, model usage, and costs across Cursor/Claude Code sessions via MCP server

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "ofershap-cursor-usage": {
      "command": "npx",
      "args": [
        "-y",
        "ofershap-cursor-usage"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Cursor Usage - MCP server plugin for Cursor Enterprise API spending and analytics

Cursor Usage - Enterprise AI Spend Tracking Plugin

An MCP server plugin that wraps the Cursor Enterprise API. Ask your AI agent about your team's spending, usage, and model adoption. Get answers in seconds, not spreadsheets.

CI License: MIT TypeScript MCP npm Dashboard


Demo

Demo animation created with remotion-readme-kit


What This Does

You manage a Cursor Enterprise team. You want to know who's spending what, which models are being used, and whether you're getting value from AI. Instead of logging into a dashboard, you ask your AI agent:

"How much did my team spend this week?"

"Who's using the most expensive models?"

"Give me a full usage report for the current billing cycle."

This MCP server plugin wraps the full Cursor Enterprise Admin and Analytics APIs, giving your agent the tools and knowledge to answer those questions directly. Works with Cursor, Claude Code, and any MCP-compatible client.

Part of the cursor-usage-tracker ecosystem. This plugin handles quick questions in the IDE. The tracker is the full open-source dashboard with charts, three-layer anomaly detection, Slack/email alerts, and incident lifecycle tracking. Use them together or separately.

What's Included

ComponentWhat it does
MCP Server15 tools wrapping the full Cursor Enterprise Admin + Analytics API
SkillsData interpretation guide + cost optimization framework
RulesAlways-on cost-awareness guidance for model selection
CommandsQuick-access: /usage-report, /spend-check, /model-audit
AgentSpecialized usage analyst persona

Install

Cursor (Marketplace)

/add-plugin cursor-usage

Then set your API key in Cursor settings:

  • Open Settings → MCP
  • Find cursor-usage and set CURSOR_API_KEY to your Cursor Enterprise Admin API key

Claude Code

/plugin install cursor-usage

Manual (any MCP-compatible client)

Add to your MCP configuration:

{
  "mcpServers": {
    "cursor-usage": {
      "command": "npx",
      "args": ["-y", "cursor-usage-mcp"],
      "env": {
        "CURSOR_API_KEY": "your-api-key-here"
      }
    }
  }
}

As a Skill Only (no MCP server)

Copy the skills/ directory into your project's .cursor/skills/ or .claude/skills/ folder. The skills work standalone as reference material even without the MCP server.

Getting Your API Key

  1. Go to your Cursor team settings (Settings → Team → API Keys)
  2. Generate an Admin API key
  3. For analytics endpoints, you may also need an Analytics API key

The API key gives read access to your team's usage data. The only write operation is set_spend_limit.

Available Tools

Admin API

ToolDescription
get_team_membersList all team members with roles and status
get_spendingCurrent billing cycle spend per member
get_daily_usageDaily usage data: lines, requests, models, modes
get_billing_groupsBilling groups with member lists and spend
get_usage_eventsPer-request events with model, tokens, and costs
set_spend_limitSet a hard spending limit for a user

Analytics API

ToolDescription
get_dauDaily active users (includes CLI, cloud agent, Bugbot)
get_model_usageModel usage breakdown per day
get_agent_editsAgent edit acceptance/rejection rates
get_tabsTab autocomplete effectiveness
get_mcp_usageMCP tool adoption
get_file_extensionsTop file types being edited with AI
get_client_versionsCursor version distribution
get_commandsCommand usage analytics
get_plansPlan mode adoption

Composite Tools

ToolDescription
get_team_overviewOne-call summary: members, spend, DAU, top models
get_user_deep_diveDeep dive into a specific user's usage patterns

Example Conversations

Quick spend check:

You: "How much has my team spent this billing cycle?" Agent: calls get_team_overview → "Your team of 47 active members has spent $3,842 this cycle. Top spender is Alice at $412, followed by Bob at $287..."

User investigation:

You: "Why is Bob's spend so high?" Agent: calls get_user_deep_dive → "Bob has made 847 requests this week, 73% using claude-opus-4.5. His daily average is $41 vs the team median of $12. Switching his chat requests to Sonnet would save approximately $180/month..."

Model audit:

You: "/model-audit" Agent: calls get_model_usage + get_spending + get_agent_edits → "62% of your team's messages use Sonnet (good). However, 5 users account for 78% of all Opus usage. Their acceptance rate on Opus is 44% vs 51% on Sonnet, suggesting Opus isn't providing measurably better results for most of their tasks..."

Full Cursor Enterprise Cost Monitoring Dashboard

This plugin answers quick questions in the IDE. For teams that need:

  • Historical trends over months (API is limited to 30 days)
  • Automated anomaly detection with statistical outlier detection
  • Slack/email alerts when spend spikes
  • Incident tracking with MTTD/MTTI/MTTR lifecycle
  • Web dashboard with charts and visualizations

See cursor-usage-tracker, the open-source Cursor Enterprise dashboard this plugin is part of.

Development

# Install dependencies
npm install

# Run in development
npm run dev

# Build
npm run build

# Type check
npm run typecheck

# Run tests
npm test

# Validate plugin structure
npm run validate

Requirements

  • Node.js 20+
  • A Cursor Enterprise team with API access
  • Admin API key (and optionally Analytics API key)

Author

Ofer Shapira

LinkedIn GitHub

License

MIT © Ofer Shapira

Related MCP Servers

Moxie-Docs-MCP★ Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

💻 Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

📇 ☁️ 🍎 🪟 🐧 - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

💻 Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

💻 Developer Tools0 views
a-25/ios-mcp-code-quality-server

📇 🏠 🍎 - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

💻 Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.