MCP Server

Reference documentation for the CloudZero MCP server tools that provide secure access to your cost data.

The CloudZero MCP server exposes tools that skills use to query your cost data. While skills handle the analysis workflow, MCP tools provide the underlying data access. This reference documents all available tools, their parameters, and which skills use them.

Authentication and authorization

Authentication

The MCP server supports two authentication methods:

CloudZero account (OAuth)

  • On first use, the MCP server opens a browser window to sign in to CloudZero
  • If you already have an active CloudZero session, authentication is automatic
  • Sessions persist across restarts — you do not need to sign in again until the session expires

API key

  • Pass an X-Api-Key header instead of signing in through the browser
  • API keys are organization-level tokens that grant full access to all cost data for the associated organization
  • Useful for automation, CI/CD pipelines, and MCP clients that do not support browser-based OAuth
  • API key usage is metered with a daily quota (see Usage quotas)

For setup instructions, see API key authentication.

Authorization

The MCP server enforces the same roles and permissions as the CloudZero application. Your access is governed by two mechanisms:

Data access controls

Your role's data access filters apply to all cost queries made through the MCP server. If your role restricts visibility to specific dimensions (for example, only Team = Engineering), the MCP server returns only data matching those filters. This works identically to the CloudZero web application.

API key users have full access to all cost data in the associated organization. Data access filters do not apply.

See Role-based Access Control for details on configuring data access.

Permission sets

Some tools require specific permission sets to be enabled on your role. If a required permission set is not granted, the tool returns an authorization error.

ToolRequired permission set
get_telemetry_dataTelemetry Stream Settings (View Telemetry Streams)
get_telemetry_streamsTelemetry Stream Settings (View Telemetry Streams)
get_optimize_recsOptimize (View Recommendations)
set_org_contextOrganization Administration (Modify Organization Settings)

All other tools are available to any authenticated user.

ℹ️

API key users are not subject to permission set restrictions. All tools are available to any valid API key with the ai-hub:mcp scope.

See View and Manage Roles for details on configuring permission sets.

Usage quotas

API key calls to the MCP server are subject to a daily usage quota per organization. OAuth users are not metered.

Daily limit

Each organization has a daily quota of tool calls made via API keys. The default quota is 3,000 tool calls per UTC calendar day. The quota resets at midnight UTC.

Usage warnings

As your organization approaches the daily limit, the MCP server appends a warning to tool results at the following thresholds:

ThresholdExample warning
50%"Your organization has used 50% (1500/3000) of the daily API call quota."
75%"Your organization has used 75% (2250/3000) of the daily API call quota."
90%"Your organization has used 90% (2700/3000) of the daily API call quota."

These warnings appear as additional text appended to the tool result. Your MCP client displays them alongside the tool output.

Quota exceeded

When the daily quota is exceeded, the MCP server returns an HTTP 429 status code with a Retry-After header indicating how many seconds remain until the quota resets at midnight UTC. No further API key tool calls succeed until the quota resets.

The error message reads: "Daily API key organization quota exceeded (3000/3000). Quota resets at midnight UTC."

Tools Overview

ToolCapabilityDescription
get_cost_dataQueryQuery cost data with filters and groupings
get_recent_query_historyQueryView recent cost queries
get_available_dimensionsAllocationsList dimensions for filtering/grouping
get_dimension_valuesAllocationsGet values for a specific dimension
get_org_contextContextRetrieve organization-specific context
set_org_contextContextSet organization context for queries
get_org_context_versionsContextList available context versions
get_reference_infoReferenceGet reference documentation
get_user_organizationsReferenceList accessible organizations
get_optimize_recsOptimizationGet cost optimization recommendations
get_telemetry_dataTelemetryRetrieve telemetry metrics
get_telemetry_streamsTelemetryList available telemetry streams

get_cost_data

Purpose

Queries cost data from CloudZero with support for grouping, filtering, and time-based analysis. This is the primary tool for retrieving cost information.

Parameters

ParameterRequiredDescription
group_byNoDimensions to group results by
filtersNoFilter criteria to narrow results
date_rangeNoTime period to query
granularityNoTime granularity: hourly, daily, weekly, monthly
cost_typeNoType of cost metric (default: real_cost)
limitNoMaximum results to return

Used by

  • cost-spike-investigation
  • top-cost-drivers
  • cost-trend-analysis
  • cost-comparison
  • service-cost-deep-dive
  • custom-dimension-analysis
  • cost-anomaly-detection
  • tag-coverage-analysis

get_recent_query_history

Purpose

Retrieves the history of recent cost queries made during the session, useful for reviewing past analysis or debugging.

Parameters

ParameterRequiredDescription
limitNoMaximum number of queries to return

Used by

  • All skills (for context and debugging)

get_available_dimensions

Purpose

Lists all available dimensions that can be used for filtering or grouping cost data, including both standard CloudZero dimensions and custom User:Defined dimensions.

Parameters

ParameterRequiredDescription
filterNoFilter dimensions by name pattern
limitNoMaximum dimensions to return
force_refreshNoBypass cache and fetch fresh data
include_hiddenNoInclude hidden dimensions in results

Used by

  • understand-cloudzero-organization
  • custom-dimension-analysis
  • tag-coverage-analysis

get_dimension_values

Purpose

Retrieves the available values for a specific dimension, such as all account names, service types, or team values.

Parameters

ParameterRequiredDescription
dimensionYesThe dimension to get values for
date_rangeNoTime period to scope the values
matchNoFilter values by pattern
limitNoMaximum values to return

Used by

  • understand-cloudzero-organization
  • custom-dimension-analysis
  • tag-coverage-analysis
  • cost-comparison

get_org_context

Purpose

Retrieves organization-specific context including custom dimensions, workflows, naming conventions, and cost allocation policies.

Parameters

ParameterRequiredDescription
versionNoSpecific context version to retrieve

Used by

  • understand-cloudzero-organization
  • All other skills (consume cached context)

set_org_context

Purpose

Sets the organization context that will be used for subsequent queries. This configures how cost data is interpreted and analyzed.

Parameters

ParameterRequiredDescription
contextYesThe context configuration to set

Used by

  • understand-cloudzero-organization

get_org_context_versions

Purpose

Lists all available versions of organization context, allowing you to review historical context configurations or switch between versions.

Parameters

None.

Used by

  • understand-cloudzero-organization

get_reference_info

Purpose

Retrieves reference documentation about CloudZero concepts, workflows, and best practices.

Parameters

ParameterRequiredDescription
reference_typeYesType of reference to retrieve

Reference types

  • cost_types - Documentation on available cost metrics
  • dimensions - Documentation on standard dimensions
  • cost_analysis_workflow - Best practices for cost analysis
  • custom_dimensions_workflow - Working with custom dimensions
  • filtering_workflow - How to filter cost data effectively
  • cost_analyst_instructions - General Cost Analyst guidance

Used by

  • understand-cloudzero-organization
  • All skills (for reference lookups)

get_user_organizations

Purpose

Lists all organizations the current user has access to, useful for multi-organization environments.

Parameters

None.

Used by

  • understand-cloudzero-organization

get_optimize_recs

Purpose

Retrieves cost optimization recommendations from CloudZero, including rightsizing, Reserved Instance, and Savings Plan opportunities.

Parameters

ParameterRequiredDescription
statusNoFilter by recommendation status
limitNoMaximum recommendations to return
offsetNoPagination offset
sort_keyNoField to sort results by
sort_orderNoSort direction: asc or desc

Status values

  • not_started - Recommendations not yet acted upon
  • in_progress - Recommendations being implemented
  • addressed - Completed recommendations
  • ignored - Dismissed recommendations

Used by

  • service-cost-deep-dive (for optimization opportunities)

get_telemetry_data

Purpose

Retrieves telemetry metrics from configured telemetry streams, useful for correlating costs with operational metrics.

Parameters

ParameterRequiredDescription
streamNoSpecific telemetry stream to query
date_rangeNoTime period for telemetry data
granularityNoTime granularity: hourly, daily, weekly, monthly

Used by

  • service-cost-deep-dive (for usage correlation)
  • cost-trend-analysis (for metric correlation)

get_telemetry_streams

Purpose

Lists all available telemetry streams configured in your CloudZero organization.

Parameters

None.

Used by

  • service-cost-deep-dive
  • cost-trend-analysis

Parameter Reference

Cost types

The cost_type parameter accepts the following values:

ValueDescription
real_costActual cost after all discounts (default)
billed_costCost as it appears on your bill
on_demand_costCost at on-demand pricing
amortized_costCost with upfront payments spread over term
discounted_costCost showing discount amounts
discounted_amortized_costAmortized cost with discounts applied

Granularity options

The granularity parameter accepts:

  • hourly - Hour-by-hour breakdown
  • daily - Day-by-day breakdown
  • weekly - Week-by-week breakdown
  • monthly - Month-by-month breakdown
  • None - Total for the period (no time breakdown)