> For the complete documentation index, see [llms.txt](https://docs.harmony.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.harmony.io/integrations/ai/cursor.md).

# Cursor

Discover team members and track per-user usage across your Cursor workspace

Cursor is an AI-powered code editor built for developer productivity. Connecting Cursor to Harmony via the Team Admin API gives IT teams visibility into usage activity and AI request volume across the organization - making it easy to measure adoption and understand how the tool is being used.

#### What the Cursor integration enables

| Capability             | Description                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------- |
| User Discovery         | Surface Cursor team members in Harmony's software inventory, derived from the last 7 days of usage data |
| Usage Tracking         | Monitor per-user activity, request volume, and the most-used AI model                                   |
| AI Request Metrics     | Track agent, chat, composer, and usage-based requests per user per day                                  |
| Multi-Instance Support | Connect multiple Cursor workspaces for organizations with separate teams                                |

#### Prerequisites

* **Cursor Enterprise team**: Cursor lists the Team Admin API as available to Enterprise teams. A key without that entitlement returns `403 Forbidden` with the message `Enterprise access required`, and no Cursor data is synced
* **Cursor Team Admin**: Admin access to the Cursor team workspace, to create the API key
* **Team API Key**: A key starting with `crsr_` (see below)
* **Harmony Account**: Active Harmony workspace

#### Connect Cursor to Harmony

**Step 1: Generate a Team API Key**

1. Go to **cursor.com/dashboard** and open **API Keys**
2. Click **New API Key**
3. Give the key a descriptive name (e.g. `Harmony Integration`)
4. Copy the generated key - it starts with `crsr_`

{% hint style="warning" %}
Cursor shows the generated key only once. Copy it before closing the dialog - if you lose it, you will need to generate a new key.
{% endhint %}

**Step 2: Navigate to Integrations**

1. Log in to your Harmony dashboard
2. Go to **Settings** > **Integrations**
3. Find **Cursor** under **AI** and click **Connect**

**Step 3: Enter Credentials**

1. Paste your **Team API key**
2. Click **Connect**

{% hint style="info" %}
For organizations with multiple Cursor workspaces, you can add multiple instances by repeating this process for each workspace.
{% endhint %}

#### Disconnect Cursor from Harmony

1. Log in to your Harmony dashboard
2. Go to **Settings** > **Integrations**
3. Find **Cursor** under **AI** and click the integration card
4. Click **Disconnect**
5. Confirm the disconnection when prompted

Once disconnected, Harmony stops syncing data from Cursor. Previously synced data remains available in Harmony. You can also revoke the key in Cursor at **cursor.com/dashboard** > **API Keys**.

#### What Harmony Syncs

**From Cursor:**

* Team members (email address and activity status) - derived from daily usage data and deduplicated to reflect the most recent activity
* Each member's Cursor role label (for example `member`, `owner`, or `free-owner`), when the team members lookup is available on your plan. If it isn't, users still sync and their role is reported as not collected
* Per-user usage and activity data, including the most-used AI model, client version, line and tab counters
* Daily request volume broken down by type:
  * **Agent requests** - requests made through Cursor's agent mode
  * **Chat requests** - requests made through chat
  * **Composer requests** - requests made through Composer
  * **Usage-based requests** - requests recorded outside the subscription allowance

{% hint style="info" %}
Cursor's usage API does not expose seat type or billing status, so Harmony does not sync seat allocation, seat type (Standard, Premium, or Unpaid Admin), or spend data. Display names are not synced either - Cursor user records in Harmony are identified by email address.
{% endhint %}

{% hint style="info" %}
**Sync cadence:**

* Usage data is pulled once every 24 hours
* The user inventory is refreshed every 6 hours, built from the last 7 days of usage data - a team member with no Cursor activity in that window does not appear in the inventory
  {% endhint %}

#### Permissions Explained

Harmony authenticates with a single Cursor **Team API key**, used read-only.

| What Harmony calls             | Why                                                                                                                                              |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `POST /teams/daily-usage-data` | Per-user, per-day activity and request metrics - the source of both usage data and the user inventory                                            |
| `GET /teams/members`           | Reads each member's Cursor role label. Optional - if this call fails, roles are reported as not collected and the rest of the sync is unaffected |

Things to know about the key:

* Team Admin API keys carry the `admin:*` scope, which is team-wide - the key is not scoped to an individual user
* The key is tied to your organization and is viewable by all team admins
* The key is unaffected by the original creator's account status, so it keeps working if that admin leaves the team
* Harmony only reads usage and member data. It does not create, modify, or remove Cursor members, seats, or settings

#### Use Cases

<details>

<summary>AI Tool Adoption</summary>

Track Cursor adoption across engineering teams to measure the impact of AI-assisted development. Use per-user request volume and model preferences to understand how deeply the tool is being used.

</details>

<details>

<summary>Usage Concentration</summary>

See which developers are actively using Cursor and how much, so you can compare active usage against what you're paying for. Note that the Harmony roster is built from the last 7 days of usage data - a developer with no recent Cursor activity is absent from the roster rather than listed as inactive.

</details>

<details>

<summary>Usage-Based Request Visibility</summary>

Monitor usage-based request volume per user to spot teams consuming beyond the subscription allowance. These are request counts as reported by Cursor, not billable amounts or spend - Harmony does not sync Cursor billing data.

</details>

<details>

<summary>Offboarding</summary>

Confirm Cursor access has been removed when developers leave, as part of Harmony offboarding workflows

</details>

#### Troubleshooting

<details>

<summary>No Cursor data appears after connecting</summary>

**Possible causes:**

* The Cursor team does not have Team Admin API access. Cursor lists this API as available to Enterprise teams, and other plans receive `403 Forbidden` with the message `Enterprise access required`
* The first sync has not completed yet
* Nobody on the team has used Cursor in the last 7 days, so there is nothing to derive an inventory from

**Solutions:**

1. Confirm your Cursor plan includes Team Admin API access
2. Allow up to 24 hours for the first full usage sync - the user inventory refreshes every 6 hours
3. Verify in Cursor that the team has recent activity

</details>

<details>

<summary>Users appear but their role is missing</summary>

**Possible causes:**

* The `GET /teams/members` lookup did not succeed - for example, the endpoint is not available on your plan, or the call was rate limited

**Solutions:**

1. This does not break the integration - users are still synced from usage data, and Harmony reports the role as not collected rather than guessing it
2. Confirm the key has the `admin:*` scope and that your plan includes Team Admin API access

</details>

<details>

<summary>Sync appears slow or incomplete on large teams</summary>

**Possible causes:**

* Cursor rate limits the Admin API to 20 requests per minute per team, and returns `429 Too Many Requests` when exceeded

**Solutions:**

1. Harmony paces its requests to stay within this limit and retries after a rate limit response, so large teams simply take longer to sync
2. If you have other tools using the same team API key, they share the same per-team limit

</details>

<details>

<summary>Rotating the API key</summary>

Cursor keys are generated in **cursor.com/dashboard** > **API Keys**. To rotate, generate a new key, disconnect the Cursor integration in Harmony, reconnect with the new key, and then revoke the old key in Cursor.

</details>

#### Data & Privacy

<details>

<summary>Key privacy principles</summary>

For information about how Harmony handles your data, see our [Privacy Policy](https://harmony.io/privacy).

* Harmony accesses Cursor data in read-only mode and does not modify any data in your Cursor account
* The integration can be revoked at any time by disconnecting it in Harmony or revoking the API key in Cursor

</details>

<details>

<summary>Developer productivity data</summary>

The Cursor usage API returns per-developer daily productivity counters, and Harmony ingests them alongside request volume:

* Lines added and accepted lines added
* Tab completions shown and accepted
* Most-used AI model and most-used file extension
* Cursor client version

Harmony does not receive code content, prompts, or conversation contents - only these aggregate daily counters. In some jurisdictions per-developer productivity metrics are subject to works council or employee monitoring requirements, so review this with your legal or privacy team before enabling the integration.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.harmony.io/integrations/ai/cursor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
