> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Track AI coding assistants costs

Implement with AI

Send this guide to your coding agent.

Prerequisite: Install Port MCP

Open plan mode if your tool supports it; otherwise present the plan below filled in and wait for my approval. Implement this Port guide in my org via MCP:

https://docs.port.io/guides/all/track-ai-coding-assistants-costs

Read the raw markdown version at https://docs.port.io/guides/all/track-ai-coding-assistants-costs.md - it contains every tab and code block without page markup.

Goal: get the guide's core flow working end-to-end in my org; adapting it to fit my existing setup takes priority over matching the guide 1:1.

Plan:
1. Confirm MCP is connected, in the right org, with sufficient permissions.
2. If the guide offers alternative implementation paths (tabs), pick the one matching my installed integrations and tools, confirm it with me, and implement only that path.
3. Diff the guide's data model (blueprints, properties, relations, workflows, actions, agents, automations, integrations, webhook data sources, secrets) against mine.
4. Propose adaptations for gaps, reusing existing blueprints/relations over guide-named duplicates.
5. Flag what needs a UI click, credential, or secret from me, testing MCP capability empirically before ruling anything out. If the guide has a "Set up via API" section, use it for anything MCP can't do before treating a step as UI-only.
6. Stop on any blocker and give me options. Approving this plan authorizes the writes it lists; pause only for writes beyond what's listed.

Build:
- Extend blueprint schema additively when upserting; don't remove or overwrite existing properties, and treat type conflicts as a blocker, not an auto-fix.
- Never print secret values into the chat or logs; ask me to set them in Port, or write them via the secrets API without echoing them back.
- List any mock data in the plan, minimal and labeled mock; once approved, seed it without re-asking, and tell me what you seeded.
- For anything the guide writes downstream (e.g. a webhook target), use a real entity, not a mock.
- For pages/widgets, use the real page identifier from the app URL, not a guessed slug.
- When you hit a UI step confirmed (not assumed) unsupported via MCP and not covered by the guide's API sections, pause, give exact clicks, then resume via MCP.
- Validate and give links after each meaningful step (only a tool-returned URL, no guessed paths); don't proceed if the last run wasn't a success.

Done:
- Run the guide's "Let's test it" steps where possible (e.g. execute a workflow test run) and confirm the expected output exists in Port.
- Summarize adaptations, seeded data, what was mocked or skipped, remaining UI steps, and how to verify.

As organizations adopt multiple AI coding assistants, understanding the cost impact of each coding assistant becomes critical. Without centralized visibility, teams overspend or fail to detect runaway costs across Cursor, Claude, and GitHub Copilot.

This guide shows you how to build a unified cost analysis dashboard in Port that aggregates spending data from your existing AI coding assistant integrations, giving you a single pane of glass for AI cost monitoring.

Prerequisites

This guide assumes the following:

  • You have a Port account and have completed the onboarding process.
  • You have installed at least one of the following integrations and have data flowing into Port:
    • Cursor integration: provides total_cents cost data at organization, user, and team levels.
    • Claude integration: provides Claude Platform cost records (claude_platform_cost_record) and token usage data by workspace and model.
    • GitHub Copilot integration: provides usage metrics (suggestions, acceptances, active users) that correlate with seat-based licensing costs.
Install the integrations first

If you haven't installed any of these integrations yet, follow the linked documentation above to set them up. Each integration page includes installation instructions, blueprint definitions, and mapping configurations. Once data is flowing, return to this guide to build your cost dashboard.

Available cost data

Each integration brings different cost-related data into Port. Here is a summary of what is available:

The Cursor integration ingests daily usage records that include a total_cents property representing actual spend. Cost data is available at three levels:

BlueprintDescriptionCost property
cursor_usage_recordOrganization-level daily metrics.total_cents - total cost in cents for the day.
cursor_user_usage_recordPer-user daily metrics.total_cents - cost attributed to a specific user.
cursor_team_usage_recordPer-team daily metrics.total_cents - cost attributed to a specific team.

Additional properties useful for cost analysis include usage_based_reqs, api_key_reqs, subscription_included_reqs, and token counts (total_input_tokens, total_output_tokens).

For full blueprint definitions and setup instructions, see the Cursor integration documentation.

Visualize costs

With your integration data flowing into Port, create a dashboard to visualize AI tool costs and usage across all tools.

AI coding assistants cost dashboard overview

Create a dashboard

  1. Navigate to your context lake.
  2. Click on the + button in the left sidebar.
  3. Select New dashboard.
  4. Name the dashboard AI Tool Costs.
  5. Input Track and compare AI coding tool costs across your organization under Description.
  6. Select the DollarSign icon.
  7. Click Create.

Add widgets

In the new dashboard, create widgets based on the integrations you have installed. Select the relevant tab below:

Total daily spend number chart (click to expand)
  1. Click + Widget and select Number Chart.
  2. Title: Cursor Daily Spend.
  3. Description: Total Cursor cost in cents for the current period.
  4. Select Aggregate by property Chart type and choose Cursor Usage Record as the Blueprint.
  5. Select total_cents as the Property.
  6. Select sum for the Function.
  7. Select custom as the Unit and input cents as the Custom unit.
  8. Click Save.
Cost per team bar chart (click to expand)
  1. Click + Widget and select Bar Chart.
  2. Title: Cursor Cost by Team.
  3. Description: Cost distribution across teams.
  4. Choose the Cursor Team Usage Record blueprint.
  5. Under Breakdown by property, select the Team property.
  6. Click Save.
Cost details table (click to expand)
  1. Click + Widget and select Table.
  2. Title: Cursor Cost Details.
  3. Choose the Cursor Usage Record blueprint.
  4. Click Save to add the widget to the dashboard.
  5. Click on the ... button in the top right corner of the table and select Customize table.
  6. In the top right corner of the table, click on Manage Properties and add the following columns:
    • Record Date (UTC): The date of the usage record.
    • Organization: The Cursor organization.
    • Total Cost (cents): The cost for that day.
    • Usage-based Requests: Requests billed on usage.
    • Total Active Users: Number of active users.
    • Most Used Model: The model consuming the most resources.
  7. Click on the save icon in the top right corner of the widget to save the customized table.
High-cost users table (click to expand)
  1. Click + Widget and select Table.

  2. Title: Cursor High-Cost Users.

  3. Choose the Cursor User Usage Record blueprint.

  4. Add a filter with the following configuration:

    {
    "combinator": "and",
    "rules": [
    {
    "value": 1000,
    "property": "total_cents",
    "operator": ">="
    }
    ]
    }
  5. Click Save.