API / get-mcp-adoption-via-analytics-api

API

Get MCP adoption with the Analytics API

Pull team-level MCP (Model Context Protocol) tool adoption metrics with GET https://api.cursor.com/analytics/team/mcp. Official reference: Analytics API → MCP Adoption.

Authenticate with Basic auth (API key as username, empty password). Create keys at Cursor Dashboard → API Keys. Most Analytics endpoints need scope admin:*. Availability: Enterprise only. Team-level rate limit: 100 requests per minute per team (by-user Analytics endpoints are 50/min — covered in a later batch).

Returns daily adoption counts broken down by tool_name and mcp_server_name.

Query parameters

Parameter Rules
startDate Optional. Default: 7 days ago. Prefer YYYY-MM-DD, or shortcuts now / today / yesterday / Nd (e.g. 14d). Max range 30 days. Time is ignored (day-level UTC).
endDate Optional. Default: today. Same formats as startDate.
users Optional. Comma-separated emails and/or public user ids (user_…). Mix formats in one request.

Omit both dates for the last 7 days (simplest path for HTTP caching). Prefer day shortcuts or YYYY-MM-DD over ISO timestamps so ETag cache hits stay stable.

Request

curl -X GET "https://api.cursor.com/analytics/team/mcp" \
  -u YOUR_API_KEY:

With a date window and user filter:

curl -X GET "https://api.cursor.com/analytics/team/mcp?startDate=14d&endDate=today&users=alice@example.com,user_abc123" \
  -u YOUR_API_KEY:

Example response:

{
  "data": [
    {
      "event_date": "2025-01-15",
      "tool_name": "read_file",
      "mcp_server_name": "filesystem",
      "usage": 245
    },
    {
      "event_date": "2025-01-15",
      "tool_name": "search_web",
      "mcp_server_name": "brave-search",
      "usage": 128
    },
    {
      "event_date": "2025-01-16",
      "tool_name": "read_file",
      "mcp_server_name": "filesystem",
      "usage": 231
    }
  ],
  "params": {
    "metric": "mcp",
    "teamId": 12345,
    "startDate": "2025-01-01",
    "endDate": "2025-01-31"
  }
}

Response fields

Field Type Meaning
event_date string Day the metrics cover (YYYY-MM-DD)
tool_name string MCP tool that was invoked
mcp_server_name string MCP server that exposed the tool
usage number Adoption / invocation count for that day
params.metric string Echoes mcp
params.teamId number Team id for the key
params.startDate / params.endDate string Resolved range

Caching

Store the response ETag and send it back as If-None-Match on the next poll. Unchanged data returns 304 Not Modified with no body; 304s do not count against the rate limit. Analytics endpoints use Cache-Control: public, max-age=900 (15 minutes). See API Overview → Caching.

Pitfalls

  • Requesting more than 30 days — the Analytics date range caps at 30 days.
  • Sending timestamps with clock times — time is ignored, and varying times break ETag cache hits.
  • Aggregating only by server — rows are keyed by both tool_name and mcp_server_name.
  • Polling without If-None-Match — burns the 100/min team budget on identical payloads.

Sibling how-tos in this batch: Get client versions, Get top file extensions, Get commands adoption. Related: Get agent edits, Get model usage.