Skip to main content
Glama
udah1

cursor-usage-mcp

cursor-usage-optimizer

npm version GitHub stars License: MIT Built for Cursor

npm downloads node TypeScript Release

Purpose: stop the Cursor agent from burning through your request quota.

On many Cursor plans you get a fixed pool of included requests (e.g. 500 / month) and then pay per request out of a budget. Every time the agent stops mid-task to ask you a one-off question, your answer starts a new billable turn — so a chatty agent quietly eats your quota.

This is a local MCP server that fixes that. It reads your live usage from the same backend your Cursor dashboard uses, and hands the agent a conserve flag. When you're consuming your quota, a bundled rule makes the agent conserve requests by:

  • routing questions through Cursor's questions/options UI (asking is free) instead of open-ended "stop and wait" prompts — so it still asks what it needs, without burning a request. Note: only the question is free; doing the work still consumes your quota,

  • batching multiple questions into a single options prompt (one turn instead of many),

  • only defaulting silently when the choice is trivial or you didn't answer,

  • cutting needless confirmation round-trips ("should I continue?").

When your included quota is used up, get_usage returns exhausted: true. On a corporate/team plan (usage moves to on-demand, covered by the org — not out of your pocket) this is internal info for the agent only: it silently continues normally — no approval prompts, no more conserving, and crucially no "you're out of requests" reminders or usage/spend numbers volunteered to you (that's transparent). The only place usage surfaces is the verbose footer, and only when verbose is on.

Usage cache. Once exhausted, the decision can't change until the billing cycle resets (used only goes up), so get_usage serves a cached reading instead of hitting the network on every task — turning a ~1s call into a ~10ms read. The cache lives in ~/.cursor-usage/cache.json, auto-invalidates at the cycle's billingCycleEnd (from the API), and refreshes at most once/day as a safety net. Below the limit it always fetches fresh (crossing the threshold matters). Verbose isn't affected — the footer has its own non-blocking background refresher that shares the same cache. Pass refresh: true to get_usage, or login/logout, to force a fresh read.

How it works (three pieces)

  1. Auth (zero-setup by default)get_usage reconstructs your dashboard session from the token Cursor already stores locally, so on most machines there's nothing to log in to. A browser login flow exists only as a fallback. See Authentication below.

  2. get_usage — makes a direct authenticated API call (no browser) and returns your included-request usage (e.g. 278/500), on-demand spend ($0/$75), and a conserve decision computed against a threshold.

  3. conserve-requests rule (installed globally) — tells the agent to call get_usage at the start of each task and follow the conserve behavior above when the flag is on.

The threshold controls when conserving kicks in: 0 (default) = conserve whenever you still have requests; 80 = only conserve once you've used 80% of the quota. See Tuning below.

Heads up / caveats

  • This calls undocumented internal Cursor endpoints (the same ones your dashboard calls). They can change without notice and may be against Cursor's ToS to script against. Personal, read-only use only.

  • The default auth path reads Cursor's local token read-only and never stores it. The optional login fallback stores a session cookie at ~/.cursor-usage/store.json (chmod 600, never committed) that expires periodically — re-run login when that happens.

Setup

No clone, no build. Add it to ~/.cursor/mcp.json and let npx fetch it:

{
  "mcpServers": {
    "cursor-usage": {
      "command": "npx",
      "args": ["-y", "cursor-usage-optimizer"],
      "env": {
        "CURSOR_USAGE_THRESHOLD_PCT": "0",
        "CURSOR_USAGE_VERBOSE": "false",
        "CURSOR_USAGE_FOLLOWUP": "false"
      }
    }
  }
}

Requires Node ≥ 22.5 (uses the built-in node:sqlite). Reload Cursor — with the default local-token auth there's no login step, just call get_usage.

Optionally install the flag-aware self-check hooks (adds postToolUse + sessionStart entries to ~/.cursor/hooks.json):

npx -y -p cursor-usage-optimizer cursor-usage-optimizer-install-hook

From source (contributors)

git clone https://github.com/udah1/cursor-usage-mcp && cd cursor-usage-mcp
npm install
npx playwright install chromium   # optional: only needed for the browser `login` fallback
npm run build

Then point mcp.json at the local build ("command": "node", "args": ["/ABS/PATH/dist/index.js"]) and set CURSOR_USAGE_MCP_DIR to the repo path so the hook uses your local build. Restart Cursor (or reload the MCP) after npm run build.

Related MCP server: mcp-token-saver

Authentication

By default the server needs no login. Cursor keeps its own auth in …/Cursor/User/globalStorage/state.vscdb (a SQLite key/value store) under ItemTable → cursorAuth/accessToken — a JWT whose sub claim is your user id. The dashboard's session cookie has a fixed shape:

WorkosCursorSessionToken=<userSub>::<accessToken>

where userSub is the JWT sub with any auth0| prefix stripped. get_usage reads that file read-only (via Node's built-in node:sqlite), rebuilds the exact cookie the browser would send, and also picks up your teamId from cursorAuth/cachedTeam. Nothing is written and the token is never stored. Because the token rotates, it's re-read on every call.

Cross-platform. The state.vscdb location is derived from the OS:

OS

Path

macOS

~/Library/Application Support/Cursor/User/globalStorage/state.vscdb

Windows

%APPDATA%\Cursor\User\globalStorage\state.vscdb

Linux

${XDG_CONFIG_HOME:-~/.config}/Cursor/User/globalStorage/state.vscdb

Override with CURSOR_STATE_DB=/abs/path/state.vscdb for non-standard installs.

When the local path can't be used — the server automatically falls back to the browser login flow. This happens if: the MCP runs on a different machine than Cursor (no local DB), the file isn't readable, node:sqlite is unavailable (Node < 22.5), or you set CURSOR_USAGE_FORCE_LOGIN=1.

Browser login fallback (either works):

# call the `login` tool from inside Cursor (just ask it to "log into cursor-usage")

# — or — standalone CLI flow
npm run login

login opens a real Chromium window (Playwright), sniffs the network to discover the usage endpoints, and saves them plus your session cookie to ~/.cursor-usage/. Run status any time to see which auth source is active (local-token vs login).

For the installing agent — do this right after setup

Agent instructions. If you are an AI agent that just installed or set up this MCP for the user, run one final step before you finish: tell the user which flags/modes are available and ask whether they want to change any. Ask through Cursor's questions/options UI (the same free-to-answer prompt this MCP is built around) — not an open-ended text question. If the MCP is already loaded, call status first so you can show the user their current effective values.

Present these three configurable flags with their current values and let the user pick which (if any) to change in a single options prompt:

Flag

Tool

Env override

Default

What it controls

Conserve threshold

set_threshold

CURSOR_USAGE_THRESHOLD_PCT

0 (always conserve)

The used-% at which conserve mode turns on. 0 = conserve whenever requests remain; 80 = only near the limit.

Verbose

set_verbose

CURSOR_USAGE_VERBOSE

off

Append a Cursor Usage: X/limit · $used/$limit footer to every message.

Follow-up

set_followup

CURSOR_USAGE_FOLLOWUP

off

End each task with a brief "anything else?" question via the options UI.

Suggested options to offer: "Leave defaults", "Raise conserve threshold (e.g. 80%)", "Enable verbose footer", "Enable follow-up questions" — plus room for a custom answer. Apply the chosen changes with the matching set_* tool, then confirm the new effective values with status. (Env vars in mcp.json override the set_* tools — mention this if the user's choice is being overridden by an env value.)

Applying changes to existing chats

New chats pick up the rule and MCP automatically — nothing to do.

For a chat that was already open before you installed/updated this:

  1. Reload the MCP once (Settings → MCP → toggle cursor-usage off/on). This restarts the shared server, so every chat — including open ones — sees the latest code and tools on its next turn.

  2. Nudge the existing chat so it starts behaving immediately (rules are re-read per turn, but an explicit nudge guarantees it):

    From now on follow the conserve-requests rule: call the cursor-usage get_usage tool,
    report my current usage, and if conserve is on — ask via the questions UI (not open prompts),
    batch questions, and only default on trivial choices.
    If verbose is on, end every message with the footer.

Version updates (daily check)

The server checks once a day, in the background, whether a newer version exists. It auto-detects how it was installed:

  • npm install (no .git): compares the installed version against the latest dist-tag on the npm registry.

  • git checkout (.git present): compares local HEAD against origin/master via GitHub's compare API (no git fetch).

Both are fully fail-open (offline / proxy / rate-limit simply surfaces nothing) and run from the background reminder refresher (plus a non-blocking kick from get_usage), so they never add latency.

When an update is available, get_usage returns update.available: true and the agent asks you once, via the options UI, whether to update. If you skip, dismiss_update records that version so you're not asked again until an even newer version appears (not daily). If you accept, the agent gives you the right commands for your install (reload the MCP so npx fetches @latest, or git pull && npm run build for a clone). State lives in ~/.cursor-usage/update.json. Run check_update any time to check immediately.

Reminder hooks (flag-aware self-check)

Two optional hooks re-inject a short self-check so agents keep following the rules — because the always-applied rule alone is a soft instruction that fast models often skip or forget mid-chat:

  • sessionStart (hooks/cursor-usage-optimizer-session-start.sh) injects the reminder into a new conversation's initial context, so conserve/follow-up/verbose behavior is in effect from the very first turn — before any tool runs. (beforeSubmitPrompt can't do this: its output schema is {continue, user_message} only, with no context-injection field.)

  • postToolUse (hooks/cursor-usage-optimizer-reminder.sh) re-injects the reminder as the task goes on, throttled per conversation (default 120s).

Install both with:

npx -y -p cursor-usage-optimizer cursor-usage-optimizer-install-hook

This copies the scripts to ~/.cursor/hooks/, adds the postToolUse + sessionStart entries to ~/.cursor/hooks.json (replacing any older cursor-usage entries, preserving other hooks), and cleans up legacy files. The hooks work for both install modes: they prefer a built local clone (default ~/personal-dev/cursor-usage-mcp, or CURSOR_USAGE_MCP_DIR if set) and otherwise refresh via npx -y -p cursor-usage-optimizer cursor-usage-optimizer-reminder.

Why per-conversation throttle? Earlier versions keyed the 120s throttle by a single global state file, so with multiple concurrent sessions only one conversation "won" each window and the rest were silently skipped — the reminder showed up in some chats but not others. The throttle is now keyed by the hook's conversation_id, so every conversation gets its own timer.

It's flag-aware: reminder-cli builds the text from the current state, so it only mentions modes that are actually active — e.g. once the quota is exhausted it drops the CONSERVE nudge (nothing left to conserve), and it omits FOLLOW-UP unless follow-up mode is on. The refresh runs detached (non-blocking) and shares the usage cache.

Because the hook launches the CLIs without the MCP's env, the MCP syncs the effective config (env-aware verbose/followup/threshold) into ~/.cursor-usage/store.json on startup, so the hook-run CLIs read the same settings you configured via mcp.json.

Tools

Tool

What it does

get_usage

Reads usage and returns the conserve decision + an exhausted flag (included quota used up → on-demand, corp-covered; the agent silently continues, no reminders/numbers). Call at task start. Includes included-request count, on-demand spend, plan, billing-cycle reset + days left, and a burn-rate projection (requests/day → projected total by reset).

usage_breakdown

This cycle's usage broken down by model: cost, request count, and token totals (input/output/cache). Heavier than get_usage; call on request.

login

Fallback browser login + endpoint auto-discovery (only needed when the local-token path can't be used). Reports current usage immediately.

logout

Clears the stored login session (cookie + endpoints). Does not affect the local-token path. forgetBrowser=true also wipes the saved browser profile.

set_threshold

Sets the persisted threshold (0-100). Default 0 = conserve whenever requests remain. Overridden by the CURSOR_USAGE_THRESHOLD_PCT env var if set.

set_verbose

Enables/disables the per-message usage footer (persisted). Overridden by the CURSOR_USAGE_VERBOSE env var if set.

set_followup

Enables/disables the end-of-task "anything else?" follow-up question (persisted, default off). Overridden by the CURSOR_USAGE_FOLLOWUP env var if set.

check_update

Forces an immediate check against GitHub for a newer version (bypasses the once/day throttle) and reports how to update.

dismiss_update

Records that the user declined the current available update, so it isn't surfaced again until a newer version lands.

status

Shows the active auth source (local-token vs login) and local-token details (state.vscdb path, teamId, token expiry), whether a login session is stored, capture time, and stored/env/effective threshold, verbose, and follow-up settings.

Tuning when conserve mode kicks in

The threshold is the minimum used percentage at which conserve mode activates:

  • 0 (default): conserve as long as any requests remain.

  • 80: only conserve once you've used ≥80% of the limit.

There are two ways to set it, and the env var wins if both are set:

1. Env var (recommended — declarative, in mcp.json):

"cursor-usage": {
  "command": "npx",
  "args": ["-y", "cursor-usage-optimizer"],
  "env": {
    "CURSOR_USAGE_THRESHOLD_PCT": "80"
  }
}

(For a local clone, use "command": "node", "args": ["/ABS/PATH/dist/index.js"] instead.)

Change the number and reload the MCP. Accepts 0100. Leave it as "0" (or remove it) for the default always-conserve behavior. If CURSOR_USAGE_THRESHOLD_PCT is set, it overrides any value set via the tool below.

Set CURSOR_USAGE_VERBOSE to true in the mcp.json env to have the agent append a usage footer to the end of every message:

"env": { "CURSOR_USAGE_VERBOSE": "true" }

Footer format (rendered as a fenced code block):

Cursor Usage: 290/500 requests · $0.00/$75.00 (~as of task start)

You can also toggle it at runtime without editing mcp.json via the set_verbose tool (persisted in ~/.cursor-usage). The CURSOR_USAGE_VERBOSE env var, if set, overrides the tool value — remove it from mcp.json to control verbose purely via set_verbose.

Notes: the numbers reflect the reading from the start of the task (not refreshed per message), and because appending a footer to every message is a model behavior, it may occasionally be missed. Default is off.

Follow-up mode (end-of-task "anything else?" question)

Independent of conserve/verbose. When on, get_usage tells the agent to end each task with a brief follow-up question through Cursor's questions/options UI — e.g. "Anything else?" with a "No, we're done" option plus room for an open answer (a more specific question when it fits). Because answering that UI is free, you almost always get a prompt you can respond to and keep the session going without spending an extra request to re-engage.

Enable via env in mcp.json:

"env": { "CURSOR_USAGE_FOLLOWUP": "true" }

Or toggle at runtime with the set_followup tool (persisted in ~/.cursor-usage). The CURSOR_USAGE_FOLLOWUP env var, if set, overrides the tool value. Default is off.

Threshold, continued

2. set_threshold tool (persisted in ~/.cursor-usage):

set_threshold { "activationThresholdPct": 80 }

Used only when the env var is unset/empty. Run status to see storedThresholdPct, envThresholdPct, and the resulting effectiveThresholdPct.

How usage is read (no browser at query time)

get_usage does not open a browser. It makes direct authenticated requests (with the cookie from the local token, or the stored login cookie) to the dashboard endpoints:

  • /api/usage?user=<sub> → included-request count (gpt-4.numRequests / maxRequestUsage), e.g. 278/500.

  • /api/usage-summarymembershipType, isUnlimited, limitType, on-plan spend (individualUsage.plan.used), and on-demand spend (individualUsage.onDemand, cents → dollars).

  • /api/dashboard/teams (team accounts) → requestQuotaPerSeat.

  • /api/dashboard/get-hard-limit (team accounts) → per-user $ cap for context.

The browser (Playwright) is used only during the login fallback. The conserve decision is based on the included-request percentage (the "X / 500" number).

Budget vs. team cap. The spend line reports your actual on-demand budget from individualUsage.onDemand.limit (authoritative for you), and — for context — the team-wide default per-user cap from get-hard-limit (hardLimitPerUser). These usually match, but can differ if your org sets per-user overrides; the tool flags it when they diverge.

Team accounts. For team-billed accounts the included-request math mirrors Cursor's dashboard exactly: the limit is 500 × requestQuotaPerSeat (fetched from /api/dashboard/teams) and the used count comes from on-plan spend (ceil(planUsedCents / 4)), falling back to the legacy gpt-4 bucket when spend is 0 or the seat quota can't be read. Individual accounts just use the legacy gpt-4 bucket directly.

get_usage always returns the raw JSON per source, so if a field ever looks off you can inspect raw and adjust parseLegacyBucket / computeIncludedRequests / parseSummary in src/usage.ts.

Releasing (maintainers)

Publishing to npm is automated via GitHub Actions (.github/workflows/release.yml) and triggered by a version tag:

npm version patch      # bumps package.json + creates a vX.Y.Z tag (use minor/major as needed)
git push --follow-tags # pushes the commit and the tag → CI publishes to npm

The workflow runs npm ci && npm run build, verifies the tag matches package.json's version, then npm publish --access public.

Auth = npm Trusted Publishing (OIDC) — no token/secret. The workflow authenticates with GitHub's OIDC token (id-token: write); provenance is generated automatically. One-time setup on npmjs.com: package → Settings → Publishing access → Trusted Publisher → GitHub Actions, and enter:

Field

Value

Organization or user

udah1

Repository

cursor-usage-mcp

Workflow filename

release.yml

Environment

(leave blank)

(The workflow upgrades npm to @latest in CI because Trusted Publishing needs npm ≥ 11.5.1.)

Available Tools

10 tools
check_updateCheck now for a newer versionA

Forces an immediate check against GitHub (bypasses the once/day throttle) and reports whether a newer version is available plus how to update. Normally the check runs automatically once a day.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations were provided, so the description carries the behavioral disclosure burden. It discloses that the check 'bypasses the once/day throttle' and reports the availability and update instructions. This reveals a rate-limit bypass behavior and the tool's side effect of performing a network call. It does not mention potential failure modes, but for a check tool the description is adequately transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, with the first sentence front-loading the core purpose and behavior, and the second providing context about the daily automatic check. Every word earns its place; no filler or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, no output schema, and no annotations, the description provides sufficient information for an agent to understand what the tool does, when to invoke it, and what it returns. It explains the bypass behavior and the nature of the report. The presence of sibling tools is addressed through the clear focus on forcing an immediate check.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the schema is empty and description adds no parameter details. Per the instructions, a 0-parameter tool gets a baseline 4. The description doesn't need to explain anything about parameters, and the schema coverage is trivially complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Forces an immediate check against GitHub' and the outcome: 'reports whether a newer version is available plus how to update.' This distinguishes it from siblings like dismiss_update, which is about dismissing an update notification, and status, which likely shows current state. The verb 'check' is specific and the resource 'GitHub' is explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context by noting that 'normally the check runs automatically once a day', implying the tool is for when an immediate check is desired. It gives a clear scenario for use (bypassing the daily throttle) but does not explicitly name alternative tools or state when not to use it. This is solid usage guidance without being exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

dismiss_updateSkip the current available updateA

Call this when the user declines an available update. Records the current remote version as skipped so get_usage won't surface it again — until an even newer version appears on GitHub.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavior: it records the skip state, affects get_usage, and is temporary until a newer version appears. This clarifies side effects and temporal scope without contradicting any structured data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the call condition and immediately explains the effect. Every phrase earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no parameters and no output schema, the description is complete: it tells when to use, what it does, and the impact on get_usage. The caveat about newer versions covers edge behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, which sets a baseline of 4. The description adds no parameter-specific details (as none exist), but it conveys the tool's action and effect, which is sufficient for a no-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: recording the current remote version as skipped so get_usage won't surface it. It uses specific verbs ('Call this when the user declines') and names the affected sibling tool (get_usage), distinguishing it from other tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs when to call ('when the user declines an available update') and implies when not to call (when the user accepts). It also references get_usage as the alternative that would otherwise surface updates, providing clear contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_usageGet Cursor usage + conserve decisionA

Call this at the START of a task. Reads the user's current Cursor usage/spend and returns conserve + followup flags. If conserve is true, ask any real questions through the questions/options UI (free) instead of open-ended prompts or silent defaults, and batch them into one prompt. If followup is true, end each task with a brief 'anything else?' options question. Auth is automatic (reads Cursor's local token); if needsLogin is true, ask the user to ensure Cursor is open/logged in on this machine, or to run the 'login' tool. Once the quota is exhausted the reading is cached until the cycle resets (pass refresh=true to force a fresh read).

ParametersJSON Schema
NameRequiredDescriptionDefault
refreshNoBypass the cache and force a fresh fetch. Default false.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Given the absence of annotations, the description discloses key behavioral traits: automatic authentication via Cursor's local token, handling of needsLogin, and caching behavior with refresh support. This gives the agent comprehensive insight beyond the tool's name and schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the call timing instruction, followed by purpose and actionable conditional logic. Each sentence provides necessary information without redundancy, making it appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description compensates by explaining the return flags (conserve, followup, needsLogin) and how to respond to each. It also covers auth and caching behaviors, making it complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the refresh parameter as bypassing the cache, and the description adds valuable context about when caching is active (once quota is exhausted until cycle resets) and why refresh would be needed. This enriches the parameter's meaning and improves correct usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: reading the user's current Cursor usage/spend and returning conserve and followup flags. This distinguishes it from siblings like usage_breakdown, which likely provides detailed breakdowns, by focusing on the summary decision flags.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to call this at the START of a task and provides conditional behavior based on the returned flags (e.g., using the questions/options UI when conserve is true, ending with an options question when followup is true). However, it does not explicitly mention alternatives or when not to use it beyond those conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

loginLog in to Cursor and capture usage endpoint (fallback auth)A

FALLBACK auth only. By default get_usage needs no login — it reads Cursor's local token from state.vscdb. Use this tool only when that can't work: the MCP runs on a different machine than Cursor, the local DB is unreadable, node:sqlite is unavailable, or CURSOR_USAGE_FORCE_LOGIN is set. It opens a real browser, you log in, and it auto-discovers the usage endpoints and stores your session cookie locally (~/.cursor-usage).

ParametersJSON Schema
NameRequiredDescriptionDefault
timeoutSecondsNoHow long to wait for login + endpoint discovery. Default 240.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the key behaviors: opening a real browser, requiring user login, auto-discovery of endpoints, and storing the session cookie locally at ~/.cursor-usage. It could have mentioned the return/result of the tool or failure modes, but the main behavior and side effects are clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences, front-loaded with 'FALLBACK auth only.' Each sentence serves a purpose: announcing the fallback nature, specifying conditions for use, and explaining the process and outcome. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's interactive nature and one parameter, the description covers the rationale, conditions, and side effects well. It does not explicitly describe return values, but the absence of an output schema is balanced by the clear behavioral outcome (cookie stored, endpoints discovered). The completeness is strong, though a brief note on results would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter, timeoutSeconds, has 100% schema description coverage ('How long to wait for login + endpoint discovery. Default 240.'). The tool description itself does not elaborate on the parameter, but per the rubric, high schema coverage justifies a baseline score of 3. No additional parameter semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as a fallback login mechanism, opening a real browser to log in, auto-discovering usage endpoints, and storing the session cookie. It explicitly differentiates from get_usage by stating 'By default get_usage needs no login' and 'Use this tool only when that can't work', making the specific verb+resource+scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance, listing concrete conditions such as the MCP running on a different machine, unreadable local DB, unavailable node:sqlite, or the CURSOR_USAGE_FORCE_LOGIN environment variable. It names the alternative (get_usage) and frames login as a fallback only, which is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

logoutLog out (clear stored session)A

Clears the stored session cookie and discovered endpoints so get_usage reports needsLogin. Set forgetBrowser=true to also wipe the saved browser profile (forces a full re-login next time). Threshold config is preserved.

ParametersJSON Schema
NameRequiredDescriptionDefault
forgetBrowserNoAlso delete the saved Playwright browser profile. Default false.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden and does an excellent job: it discloses what gets cleared (cookie and endpoints), the optional behavior of forgetBrowser (wipe browser profile, force full re-login), and what is preserved (threshold config). This is transparent and adds meaningful context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the primary action, and each sentence earns its place. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description covers the essential behavior, the optional parameter's effect, and what is preserved. It is complete enough for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter, so baseline is 3. The description adds extra semantic value by explaining the consequence of forgetBrowser=true ('forces a full re-login next time'), which goes beyond the schema's 'delete the saved Playwright browser profile'. Thus a score of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Clears') and resource ('stored session cookie and discovered endpoints'), clearly distinguishing it from login and other session-related tools. It also mentions the observable effect on get_usage, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (to force get_usage to report needsLogin) and notes that threshold config is preserved, which helps distinguish it from tools like set_threshold. However, it does not explicitly name alternative tools or exclusion cases, so it falls short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_followupEnable/disable the end-of-task follow-up questionA

Persists follow-up mode (default off): when on, get_usage tells the agent to end each task with a brief 'anything else?' question via the questions/options UI, so you almost always get a prompt you can respond to. Overridden by the CURSOR_USAGE_FOLLOWUP env var if set.

ParametersJSON Schema
NameRequiredDescriptionDefault
followupYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description itself discloses key behaviors: persistence (state change), default off, effect on get_usage, and the env var override. It does not mention permissions or return value, but for a boolean setter these are less critical. The description adds meaningful behavioral context beyond the tool name and title.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, with the key information front-loaded. Every sentence adds value: the first explains the mechanism and effect, the second the override. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-boolean setter with no output schema, the description is exceptionally complete. It covers purpose, default, effect on a related tool, and the env var override, which are the essential aspects. There is no missing critical information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It does by explaining the meaning of the followup parameter indirectly: 'default off' and 'when on' indicate the boolean effect. However, it does not explicitly state that the followup parameter should be set to true to enable and false to disable, leaving a small gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: it persists a follow-up mode that affects get_usage's behavior. It specifies the action ('Persists follow-up mode'), the resource (end-of-task follow-up question), and distinguishes from siblings by tying it to get_usage. The default (off) and overriding env var add precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: to control whether get_usage includes a follow-up question. It notes that when on, the agent will almost always get a prompt, and that an env var can override. It does not explicitly state 'use this instead of setting the env var' or list alternatives, but the context is clear enough for a simple setter.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_thresholdSet conserve activation thresholdA

Set the minimum usage percentage (0-100) at which conserve mode activates. Default 0 means conserve whenever a reading succeeds and requests remain. Set e.g. 80 to only conserve near the limit.

ParametersJSON Schema
NameRequiredDescriptionDefault
activationThresholdPctYes

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of transparency. It explains the behavioral effect of the threshold value, such as 0 meaning conserve whenever a reading succeeds and requests remain, and 80 meaning conserve only near the limit. This provides meaningful insight into the tool's behavior, though it does not cover all potential side effects (e.g., persistence or authorization).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences, front-loaded with the main purpose, and contains no redundant information or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple setter with one parameter, no annotations, and no output schema, the description is sufficiently complete. It explains the parameter semantics and gives behavioral examples, covering all essential aspects needed for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description fully explains the activationThresholdPct parameter by stating it is a usage percentage from 0 to 100 and providing examples. Since the schema has no description for the parameter, this is essential and effectively compensates for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states specifically that it sets the minimum usage percentage at which conserve mode activates. This is a clear verb+resource pair, and it distinguishes from sibling tools like set_verbose or set_followup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by explaining the default (0) and giving an example (80), but it does not explicitly discuss when to use this tool versus alternatives. However, the given examples imply appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_verboseEnable/disable the per-message usage footerA

Persists verbose mode: when on, get_usage returns a footer the agent appends to every message (Cursor Usage: X/limit requests · $used/$limit). Overridden by the CURSOR_USAGE_VERBOSE env var if set.

ParametersJSON Schema
NameRequiredDescriptionDefault
verboseYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavior. It reveals that the mode persists, affects get_usage's output, and can be overridden by an environment variable. This is valuable context, though it does not mention return values or side effects beyond the setting itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exactly two sentences, front-loaded with the core action and followed by a relevant conditional nuance. Every word earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-boolean setter with no output schema, the description covers the essential behavior: persistence, effect on get_usage, and the override condition. It omits where the setting is stored or the exact return value, but these are not critical for understanding how to invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only defines 'verbose' as a required boolean with zero description. The tool description explains that 'on' results in a footer from get_usage and mentions the env var override, giving the parameter meaningful context. This compensates well for the lack of schema documentation, though it does not specify defaults or edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Persists verbose mode') and the target resource (per-message usage footer), with the title reinforcing the enable/disable function. It is easily distinguished from sibling tools like set_threshold or set_followup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool—when you want to enable or disable the usage footer—but it does not explicitly contrast with alternatives or state when not to use it. The relationship with get_usage is clear, but no exclusions or alternate tool references are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

statusShow cursor-usage configuration statusA

Reports auth source, stored session/endpoints, thresholds, verbose/follow-up settings, and usage-cache age/cycle.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. The word "Reports" implies a read-only operation and enumerating the reported items adds useful context. However, it does not explicitly state that the tool makes no changes, nor does it mention any side effects, permissions, or output format. It provides moderate transparency but leaves the read-only nature implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence. It begins with the verb "Reports" and then lists the key information categories without unnecessary filler. Every word earns its place, achieving high conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has no parameters and no output schema, the description provides a complete enumeration of the report content (auth source, session/endpoints, thresholds, etc.). It could go further by explicitly noting the read-only nature or how the output is presented, but for a status-reporting tool, the listed categories offer adequate completeness for an agent to decide when to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema already fully defines the input interface (empty object). Per calibration, the baseline for 0 parameters is 4. The description adds no parameter-specific information because none is needed, and it correctly focuses on what the tool reports rather than input details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ("Reports") and enumerates the exact resources it covers: auth source, stored session/endpoints, thresholds, verbose/follow-up settings, and usage-cache age/cycle. This distinguishes it from siblings like get_usage (which reports usage) and set_threshold (which modifies settings).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool vs alternatives. The description simply states what it reports but does not mention prerequisites, exclusions, or alternative tools like get_usage or set_threshold. Usage context is only implied (checking configuration status) rather than explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

usage_breakdownPer-model cost & token breakdownA

Shows this billing cycle's usage broken down by model: cost, request count, and token totals (input/output/cache). Use when the user asks what's costing them or which models they use most. Heavier than get_usage, so call it on request rather than every task.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the temporal scope (billing cycle), the grouping (by model), the output metrics, and a key behavioral trait: it is heavier than get_usage. However, it does not explicitly state read-only/non-mutating behavior, though 'shows' implies it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: output description, usage trigger, and performance caveat. Front-loaded with the core purpose, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description is remarkably complete: it covers what it returns, when to use it, and how it compares to the sibling tool. No essential context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description adds context about the output breakdown but no parameter details are needed since there are none.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool shows this billing cycle's usage broken down by model, including specific metrics (cost, request count, token totals). The verb 'shows' and the resource 'usage breakdown by model' are specific and the tool is distinguished from get_usage by the granularity of the breakdown.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use guidance is provided: 'Use when the user asks what's costing them or which models they use most.' It also names an alternative (get_usage) and gives a performance-based exclusion: 'Heavier than get_usage, so call it on request rather than every task.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.1.2
    • First observedcheck_update
    • First observeddismiss_update
    • First observedget_usage
    • First observedlogin
    • First observedlogout
    • First observedset_followup
    • First observedset_threshold
    • First observedset_verbose
    • First observedstatus
    • First observedusage_breakdown

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: usage reading, auth management, configuration, update handling, and status. Even get_usage and usage_breakdown are well differentiated by weight and intent, with descriptions explicitly stating when to use each.

Naming Consistency4/5

Most tools follow a verb_noun pattern (get_usage, set_threshold, dismiss_update), but a few deviations exist: usage_breakdown has no verb, and login, logout, and status are single words. This is a minor inconsistency that does not impair readability or prediction.

Tool Count5/5

10 tools is well-scoped for a Cursor usage management server. Each tool covers a distinct aspect of the domain without redundancy, and no tool feels superfluous.

Completeness5/5

The tool surface covers the full lifecycle: usage retrieval, detailed breakdown, auth options, configuration settings, update management, and an overall status overview. There are no obvious dead ends or missing operations for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables real-time monitoring of Cursor Pro usage limits and API quotas across different AI services. Tracks Sonnet 4.5, Gemini, and GPT-5 request usage with alerts when approaching subscription limits.
    6
    2
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Real-time Claude.ai subscription awareness for AI coding assistants. Surfaces live utilization, forecasts limits, gates expensive operations, and measures real per-task cost.
    5
    16
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Automatically reduces token usage in Claude Code sessions using algorithmic optimizations like code compression, smart file reading, output summarization, and prompt rewriting, with no extra API calls or cost.
    38
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP plugin that alerts you when AI token usage is wasteful. Fires warnings, errors, and alerts on large outputs, verbose logs, and repetitive history, auto-suppressing noise to keep your context lean.
    6
    38
    5
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/udah1/cursor-usage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server