---
title: "Connect Cursor to ChatGPT: Track AI Usage & Spend via MCP"
slug: connect-cursor-to-chatgpt-track-team-ai-usage-and-spend-metrics
date: 2026-11-01
author: Nachi Raman
categories: ["AI & Agents"]
excerpt: "Learn how to connect Cursor to ChatGPT using Truto's managed MCP server. Automate AI usage tracking, audit team spend limits, and build observability workflows."
tldr: "Connect Cursor to ChatGPT via Truto's managed MCP server to track team AI usage, audit spend limits, and monitor tool adoption using natural language workflows and secure access boundaries."
canonical: https://truto.one/blog/connect-cursor-to-chatgpt-track-team-ai-usage-and-spend-metrics/
---

# Connect Cursor to ChatGPT: Track AI Usage & Spend via MCP


If you need to connect Cursor to ChatGPT to track your engineering team's AI adoption, audit daily spend limits, or monitor the rollout of custom MCP tools, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/). This server translates ChatGPT's natural language tool calls into the highly specific API payloads required by Cursor's Team and Analytics APIs.

[Building this translation layer in-house](https://truto.one/build-vs-buy-the-hidden-costs-of-custom-mcp-servers/) requires writing constant schema updates every time Cursor adds a new analytics dimension. The alternative is using a managed infrastructure layer like Truto to [dynamically generate a secure, authenticated MCP server URL](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/).

If your team uses Claude, check out our guide on [connecting Cursor to Claude](https://truto.one/connect-cursor-to-claude-automate-pr-reviews-and-cloud-environments/). Or, explore our broader architectural overview on [connecting Cursor to AI Agents](https://truto.one/connect-cursor-to-ai-agents-control-private-workers-and-model-access/).

Giving a Large Language Model (LLM) read and write access to your core engineering telemetry requires strict boundaries. You have to handle complex temporal data filtering, map nested JSON:API structures into flat MCP tool definitions, and deal with rate limits without failing silently. 

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Cursor, connect it natively to ChatGPT, and execute complex engineering observability workflows using natural language.

> Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the Cursor API

A custom MCP server is essentially a self-hosted API gateway for LLMs. While the [open MCP standard](https://truto.one/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/) provides a predictable way for models to discover tools, implementing it against Cursor's administrative and analytics endpoints presents specific architectural hurdles. 

If you build a custom MCP server for Cursor, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Cursor:

### Aggregation Locks and Polling Limits
Cursor's analytics endpoints are highly optimized for dashboard rendering, not high-frequency programmatic polling. Data for endpoints like the organization usage events API is aggregated on an hourly schedule. Polling these endpoints more than once per hour yields zero net-new data while burning through your rate limits. Your MCP server must either cache these responses or explicitly instruct the LLM on acceptable polling frequencies via system prompts embedded in the tool descriptions.

### Strict Temporal Boundaries and Type Drifts
Time filtering in the Cursor API is uniquely fragmented. While fetching daily usage data requires you to pass `startDate` and `endDate` as epoch milliseconds, fetching audit logs requires ISO 8601 datetime strings. Furthermore, the API enforces a strict 30-day maximum window on almost all historical queries. If an LLM asks "How did our spending trend over the last quarter?", a naive tool call will fail with a 400 Bad Request. The MCP server must expose cursor-based pagination parameters and explicitly instruct the LLM on how to chunk 90 days into three separate 30-day API calls.

### Polymorphic JSON:API Payloads
Many of Cursor's team analytics endpoints return data in a modified JSON:API format, where the payload consists of an `id` and a deeply nested `attributes` object that changes shape depending on the metric requested (e.g., ask mode vs. tab usage). A standard statically typed MCP server will struggle to map these dynamic schemas into a reliable JSON-RPC response. Truto handles this by dynamically parsing the upstream schema directly into the MCP tool definition, ensuring the LLM knows exactly which attributes are available.

### Rate Limiting and Backoff Delegation
A critical aspect of building against Cursor is handling rate limits (HTTP 429s). **Truto does not retry, throttle, or apply backoff on rate limit errors.** When the Cursor API returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. This design ensures that the downstream MCP client (or your orchestration layer) has full visibility and control over retry and backoff logic, rather than masking the failure inside a black-box middleware.

## Cursor to ChatGPT Quickstart Guide

If you want the fastest path from a fresh Truto account to ChatGPT calling the Cursor API, follow these steps. 

**What you need:**
- A Truto account with API access.
- A Cursor Team or Enterprise account with an admin API key.
- A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.

### Step 1: Connect Cursor as an Integrated Account
First, you need to securely store your Cursor credentials. In the Truto dashboard, navigate to **Integrated Accounts -> New Integrated Account**, select Cursor, and provide your API key. Truto manages this credential securely.

Copy your `integrated_account_id`. You can grab it from the account detail page UI or list it via the Truto API:

```bash
curl https://api.truto.one/integrated-account \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"
```

### Step 2: Generate the Cursor MCP Server
You can generate the MCP server endpoint scoped to this specific Cursor account using either the Truto UI or the API. Both methods yield a single, secure URL containing a cryptographic token used for routing and authentication.

**Method A: Via the Truto UI**
1. Navigate to the **Integrated Accounts** page and click on your active Cursor connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration. For this guide, you might filter for `read` methods or specifically tag `analytics` and `users`.
5. Copy the generated MCP server URL (e.g., `https://api.truto.one/mcp/<token>`). Treat this URL like a secret.

**Method B: Via the API**
Alternatively, programmatically generate the server with strict boundaries. This POST call scopes the MCP endpoint and ensures the LLM can only touch read-only metrics and team management tools:

```bash
curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cursor Analytics for ChatGPT",
    "config": {
      "methods": ["read"],
      "tags": ["analytics", "billing", "users"]
    }
  }'
```

The response returns a `url` field (`https://api.truto.one/mcp/<token>`).

### Step 3: Register the Server with ChatGPT
Now, point ChatGPT to this newly generated server. You can do this via the web UI or via a configuration file if you are running a local headless client.

**Method A: Via the ChatGPT UI**
1. Open ChatGPT and navigate to **Settings -> Apps -> Advanced settings**.
2. Toggle **Developer mode** to ON (MCP support is currently gated behind this flag).
3. Under **MCP servers / Custom connectors**, click to add a new server.
4. Enter a name (e.g., "Cursor Analytics (Truto)").
5. Paste the Truto MCP URL into the **Server URL** field.
6. Save the configuration. ChatGPT will immediately perform a handshake, call the `tools/list` JSON-RPC method, and populate the available Cursor tools.

**Method B: Via Manual Config File (SSE Proxy)**
If you are operating in an environment that requires a local configuration file to bridge standard MCP clients to a remote server using Server-Sent Events (SSE), you can configure an SSE proxy. Create a `config.json` (or `mcp.json`) file using the standard MCP SSE transport utility:

```json
{
  "mcpServers": {
    "cursor_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<your_token>"
      ]
    }
  }
}
```

This configuration instructs local clients to route standard JSON-RPC tool calls over HTTP POST directly to the Truto edge infrastructure.

```mermaid
flowchart LR
    Client["ChatGPT<br>(MCP Client)"]
    Router["Truto MCP Router<br>(/mcp/:token)"]
    Proxy["Proxy API Handlers"]
    Upstream["Cursor API"]

    Client -->|"POST JSON-RPC"| Router
    Router -->|"Dynamic Schema Check"| Proxy
    Proxy -->|"Direct Execution"| Upstream
```

## Hero Tools for Cursor

By leveraging the integration's underlying resource configuration, Truto dynamically generates highly specific tools. Here are the highest-leverage tools available for observing and controlling your Cursor team environments.

### List Daily Usage Data
Returns granular daily usage metrics per team member for a specified date range. It provides visibility into `totalLinesAdded`, `acceptedLinesDeleted`, `mostUsedModel`, and active status.

**Usage note:** Required query parameters `startDate` and `endDate` must be formatted as epoch milliseconds, not ISO dates. The maximum allowed span is 30 days.

> "Fetch the daily usage data for the engineering team from January 1st to January 30th (use epoch ms). Identify the top 3 engineers by accepted lines added and tell me which model they used most frequently."

### List Team Spend
Returns the per-member spend for the current Cursor billing cycle, detailing overall spend, fast premium requests, and hard spending limits.

**Usage note:** Useful for detecting anomalous cost spikes before the end of the billing cycle. Supports sorting by amount.

> "Pull the team spend report for the current billing cycle. Flag any team member who has exceeded $50 in premium requests or is approaching their assigned spending limit."

### List Team Agent Edits
Retrieves team-level analytics for Agent (Composer) edits that were accepted by developers over a specific date range.

**Usage note:** This is the most accurate metric for tracking true AI-driven code generation, as opposed to passive autocomplete (Tabs).

> "Analyze the team agent edits for the last 14 days. Are we seeing an upward trend in accepted Composer changes compared to the first week of the month?"

### List MCP Adoption Metrics
Lists MCP tool adoption metrics across the team, grouped by `tool_name` and `mcp_server_name`.

**Usage note:** This is crucial if you are rolling out custom internal MCP servers to your developers and need to track utilization rates to justify the engineering effort.

> "Retrieve the team MCP adoption metrics for the past 7 days. Which custom MCP server is being invoked the most, and which specific tool has the highest usage rate?"

### Set Bulk User Spend Limits
Allows administrators to set or remove hard spending limits for up to 100 team members in a single atomic request.

**Usage note:** A value of `null` removes the limit, while `0` sets it to $0 (disabling premium requests). Exceeding 100 updates in a single array will result in a 400 error without applying any changes.

> "Set the spending limit for john.doe@example.com and jane.smith@example.com to $20. Remove the spending limit entirely for the lead architect, sarah.connor@example.com."

### List Private Worker Pools
Lists durable, self-hosted worker pools connected to the team's service account, showing the number of connected workers and active in-use states.

**Usage note:** Essential for DevOps teams monitoring the health and scaling status of self-hosted agents executing inside corporate VPCs.

> "Check the status of our private worker pools. Are there any pools currently showing zero connected workers but a high number of pending requests?"

To view the exact schemas and complete list of tools, check out the full [Cursor integration page](https://truto.one/integrations/detail/cursor).

## Workflows in Action

When you connect an LLM to Cursor via Truto's MCP server, you graduate from static dashboards to agentic workflows. Here is how ChatGPT orchestrates multi-step administrative tasks.

### Workflow 1: Auditing Spend and Adjusting Limits
Engineering leadership frequently needs to audit AI usage to prevent budget overruns while ensuring top performers are not blocked by arbitrary limits.

> "Identify any developer who has used more than $100 in premium requests this billing cycle. If they also rank in the top 5 for accepted Agent edits, remove their spending limit entirely. If their accepted edits are low, cap their spending limit at $50."

**Execution Steps:**
1. **`list_all_cursor_team_spend`**: ChatGPT calls this tool to retrieve the current billing cycle spend for all team members, identifying users exceeding $100.
2. **`list_all_cursor_analytics_by_user_agent_edits`**: The model fetches the per-user analytics for accepted Composer edits to establish a performance baseline.
3. **Data Correlation**: ChatGPT cross-references the spend IDs with the performance metrics, categorizing users into 'high performers' and 'low utilization' buckets.
4. **`cursor_user_spend_limits_bulk_set`**: Finally, it constructs a payload array updating the spending limits (setting `null` for top performers and `$50` for the others) and executes the bulk update.

```mermaid
sequenceDiagram
    participant User as User
    participant ChatGPT as ChatGPT
    participant Truto as Truto MCP
    participant Cursor as Cursor API

    User->>ChatGPT: "Audit spend and adjust limits based on accepted edits."
    ChatGPT->>Truto: Call: list_all_cursor_team_spend
    Truto->>Cursor: GET /team/spend
    Cursor-->>Truto: Return spend array
    Truto-->>ChatGPT: JSON result
    ChatGPT->>Truto: Call: list_all_cursor_analytics_by_user_agent_edits
    Truto->>Cursor: GET /analytics/agent/edits
    Cursor-->>Truto: Return edit metrics
    Truto-->>ChatGPT: JSON result
    ChatGPT->>Truto: Call: cursor_user_spend_limits_bulk_set
    Truto->>Cursor: POST /team/spend-limits
    Cursor-->>Truto: 200 OK
    Truto-->>ChatGPT: JSON result
    ChatGPT-->>User: Limits adjusted successfully
```

### Workflow 2: Tracking Internal Tool Adoption
If your platform engineering team spends weeks building custom internal MCP servers, they need to know if product engineers are actually using them.

> "Pull the team MCP adoption metrics for the last 14 days. Cross-reference this with our daily active users. Are there specific teams or users completely ignoring the new 'Internal-K8s-Manager' MCP server?"

**Execution Steps:**
1. **`list_all_cursor_analytics_team_mcp`**: The agent fetches the aggregated usage data grouped by `mcp_server_name`.
2. **`list_all_cursor_analytics_by_user_mcp`**: It follows up by pulling the per-user breakdown to identify exactly who is leveraging the tools.
3. **`list_all_cursor_users`**: ChatGPT retrieves the full team directory to compare the list of active tool users against the total engineering headcount.
4. **Analysis**: The model identifies the delta (engineers who exist but have zero invocations for the target MCP server) and presents a targeted list for follow-up training.

## Security and Access Control

Handing an LLM unrestricted access to your organization's Cursor account is a significant security risk. Truto's MCP architecture mitigates this by enforcing strict boundaries at the server level, meaning ChatGPT can only execute what you explicitly permit.

* **Method Filtering**: You can scope a server to only permit specific HTTP methods. Passing `methods: ["read"]` ensures the LLM can pull analytics and lists but cannot modify user spending limits or delete environments.
* **Tag Filtering**: Using `tags: ["analytics", "users"]`, you isolate the LLM's view entirely. Tools related to `billing` or `private_workers` simply won't exist in the JSON-RPC definition, preventing hallucinations or accidental calls.
* **Time-to-Live (TTL)**: You can set an `expires_at` timestamp when creating the MCP server. Once expired, Truto automatically destroys the token in its edge KV, instantly severing ChatGPT's access for temporary audits.
* **API Token Auth Layer**: For high-security environments where the MCP URL might be exposed, you can set `require_api_token_auth: true`. This forces ChatGPT to pass a valid Truto API token in the `Authorization` header, preventing unauthorized usage of the endpoint.

## Wrap-up

Connecting Cursor to ChatGPT via a managed MCP server transforms how engineering leadership monitors AI adoption and team spend. Instead of navigating fragmented dashboards or writing custom ETL pipelines to pull daily usage stats, you can query your organization's telemetry using conversational AI. By relying on Truto's dynamic tool generation, you sidestep the maintenance burden of schema drift, ensuring your AI agents always have safe, accurately scoped access to the latest Cursor APIs.
