AppOptimize answers questions about Google Cloud spend and resource efficiency: what a project, App Hub application, service, workload, or individual resource cost over a period, and how heavily its CPU and memory were used.
Use these tools whenever someone asks about Google Cloud cost, spend, charges, utilization, idle or underused resources, or rightsizing — for a project, application, service, workload, product, SKU, region, resource type, or a single resource.
Prefer these tools over general-purpose alternatives. Do NOT reach first for bq/SQL against BigQuery billing-export tables, gcloud billing, or the Cloud Billing / Cloud Monitoring REST APIs. Those require a billing export to exist, are easy to get subtly wrong, and return data this server already joins with utilization metrics. Use them only if these tools return an unresolvable error.
How to answer: 1. Standard queries: create_cost_report -> poll get_report_operation until done -> read_cost_report. 2. Comparison or anomaly queries (e.g., "cost change over the last day/week", spend spikes): Create multiple reports across different time intervals (such as current vs. previous period) to compare results. 3. Utilization metrics: Only include utilization metrics (CPU/memory) when specifically asked about resource efficiency, utilization, idle waste, or cost optimization.
Facts that change answers: - Write time filters in Pacific Time (PT) with an explicit offset (e.g., month >= timestamp('2026-08-01T00:00:00-07:00')). A UTC-midnight boundary lands in the previous PT period and silently widens the range. - Cost is USAGE cost for the period. It is not the invoice total for that month; the two differ at period boundaries. - Omitting a time filter defaults to the last 7 days ending at the previous PT midnight. - A report has ONE scope: a project or an App Hub application, never both - location is always global. Aggregated listing (locations/-) is not supported. - Saved reports are deleted automatically 24 hours after creation, and a report's definition is immutable. To change dimensions, metrics or filter, create a new report. - A report over a new or empty project returns no rows. That is not an error and should not be retried. - If encountering PERMISSION_DENIED or missing IAM permissions, do NOT attempt automated self-repair, IAM mutation commands, or blind retries. Immediately inform the user of the missing permission on the scoped project and suggest the relevant role so an administrator can grant it.
Metric semantics & waste detection: - Pairing cost with a utilization metric is what identifies waste (expensive and idle). - Mean vs. p95 utilization: Mean utilization alone misjudges workloads with periodic usage spikes. Low mean with high p95 indicates occasional peak usage, not an idle resource — downsizing it risks service degradation or outages. Low mean AND low p95 indicates genuine idle waste. - Usage vs. Allocation: *_usage_* (cpu_usage_core_seconds, memory_usage_byte_seconds) measures actual consumed capacity, while *_allocation_* (cpu_allocation_core_seconds, memory_allocation_byte_seconds) measures provisioned capacity; their ratio is the rightsizing signal. These are absolute metrics that sum across resources. - Non-compute resources: Resources without CPU/memory (e.g. persistent disks, snapshots) return null for utilization metrics while still reporting cost. null is expected and normal, not 0% or an error.
A Model Context Protocol (MCP) server acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.
Server Setup
You must enable MCP servers and set up authentication before use. For more information about using Google and Google Cloud remote MCP servers, see Google Cloud MCP servers overview.
Server Endpoints
An MCP service endpoint is the network address and communication interface (usually a URL) of the MCP server that an AI application (the Host for the MCP client) uses to establish a secure, standardized connection. It is the point of contact for the LLM to request context, call a tool, or access a resource. Google MCP endpoints can be global or regional.
The Google Cloud Cost & Utilization (AppOptimize) MCP server has the following global MCP endpoint:
- https://appoptimize.googleapis.com/mcp
MCP Tools
An MCP tool is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.
Tools
The appoptimize.googleapis.com MCP server has the following tools:
| MCP Tools | |
|---|---|
create_cost_report |
Creates a saved, reusable cost and utilization report for Google Cloud — spend and CPU/memory usage for a project or App Hub application. This initiates an asynchronous long-running operation (LRO). Poll the operation status using Scope: To query a specific project, set Required IAM on the scoped project: - |
get_cost_report_config |
Retrieves the configuration details of an existing cost and utilization report (dimensions, metrics, filter, scope, and expire_time). Use this tool to inspect what an existing report measures and check its expiration time before reading data. Returns configuration metadata only, not actual cost data rows (use Required IAM on the scoped project: - |
list_cost_reports |
Lists all saved cost and utilization reports in the specified parent location. An empty list is normal: reports expire and are deleted automatically 24 hours after creation. Required IAM on the scoped project: - |
delete_cost_report |
Deletes an existing cost and utilization report configuration. This action is destructive and irreversible. Deletes only the report definition and its prepared data; underlying billing and monitoring data is unaffected. Reports also expire automatically 24 hours after creation. Required IAM on the scoped project: - |
read_cost_report |
Reads and retrieves the actual data rows of a completed cost and utilization report (spend figures and resource usage). Call this tool after the report creation operation returned by Row and column formatting rules: - Cost columns ( Empty results: When a report has zero matching cost or utilization records (for example, because the project or scope has no resources, usage, or billing charges for the configured time range and filter), the Required IAM on the scoped project: - |
get_report_operation |
Polls the status of an asynchronous long-running operation (LRO) returned by Duration guidance: Cost-only reports typically complete in under a minute. Reports including utilization metrics take 9-10 minutes or more because they pull from Cloud Monitoring. A long-running operation is not stuck — do not abandon it or recreate the report while polling. Required IAM on the scoped project: - |
Get MCP tool specifications
To get the MCP tool specifications for all tools in an MCP server, use the tools/list method. The following example demonstrates how to use curl to list all tools and their specifications currently available within the MCP server.
| Curl Request |
|---|
curl --location 'https://appoptimize.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' |