Google Cloud Observability provides monitoring, logging, and diagnostic tools. These tools can help you monitor and analyze the availability, usage, and performance of your MCP requests. You can create dashboards and alerts specific to those requests and to your MCP-compatible tools.
By default, Cloud API Registry is configured to do the following:
- Send data and system audit logs to Cloud Logging. You can use the collected logs to debug, troubleshoot, and gain insights about your applications.
- Send system and resource metrics to Cloud Monitoring. You can use the collected metrics to monitor health and performance, identify trends and issues, and notify for changes in behavior.
Send audit logs to Cloud Logging
Cloud API Registry sends the following types of audit log data to Cloud Logging:
Data Access audit logs are disabled by default because these audit logs can be quite large. For more information, see Enable Data Access audit logs.
Send metrics to Cloud Monitoring
Cloud API Registry sends metric data from monitored resources to Google Cloud Observability. A monitored resource in Monitoring represents a logical or physical entity, such as a virtual machine, a database, or an application.
Cloud API Registry sends metric data from the following monitored resource
which includes labels to identify the project, service, method, and location
associated with an MCP request:
consumed_mcp_api
To view all resource types, see Monitored resource types.
Resource metrics and labels
Monitored resources contain a unique set of metrics that can be explored, reported through a dashboard, or used to create alerts. Each resource also has a set of resource labels, which are key-value pairs that hold additional information about the resource. Resource labels are available for all metrics associated with the resource.
You can use the following metric types to track MCP tool usage:
mcp/request_count: the count of MCP requests.mcp/request_durations: the duration of the MCP request from the time it was sent until a response is received.
To view all metric types, see Google Cloud metrics.
Read metric data
You can read metric data, also called time-series data, by using the
timeSeries.list method in the Cloud Monitoring API. There are several ways to
call the method, including using a language-specific client library, or by
creating a chart with
Metrics Explorer. You can also try
out the timeSeries.list method using the forms-based
APIs Explorer. For an introduction to metrics
and time series, see
Metrics, time series, and resources. To learn how
to read your metric data, see
Retrieve time-series data.
Use Monitoring dashboards and alerts
You can use Monitoring dashboards and their associated charts to visualize the data for Cloud API Registry metrics.
To monitor these metrics in Monitoring, you can create custom dashboards. You can also add alerts based on these metrics.