Google Cloud Monitoring MCP server
Create a powerful Model Context Protocol (MCP) server for Google Cloud Monitoring to query metrics, manage alerting policies, investigate incidents, configure notification channels, and check uptime across your GCP projects. This integration enables AI agents to automate observability workflows—from creating alerts to snoozing them during maintenance—with secure service account authentication.
Setting up an MCP server
This article covers the standard steps for creating an MCP server in AI Gateway and connecting it to an AI client. The steps are the same for every integration — application-specific details (API credentials, OAuth endpoints, and scopes) are covered in the individual application pages.
Before you begin
You'll need:
- Access to AI Gateway with permission to create MCP servers
- API credentials for the application you're connecting (see the relevant application page for what to collect)
Create an MCP server
Find the API in the catalog
- Sign in to AI Gateway and select MCP Servers from the left navigation.
- Select New MCP Server.
- Search for the application you want to connect, then select it from the catalog.
Configure the server
- Enter a Name for your server — something descriptive that identifies both the application and its purpose.
- Enter a Description so your team knows what the server is for.
- Set the Timeout value. 30 seconds works for most APIs; increase to 60 seconds for APIs that return large payloads.
- Toggle Production mode on if this server will be used in a live workflow.
- Select Next.
Configure authentication
Enter the authentication details for the application. This varies by service — see the Authentication section of the relevant application page for the specific credentials, OAuth URLs, and scopes to use.
Configure security
- Set any Rate limits appropriate for your use case and the API's own limits.
- Enable Logging if you want AI Gateway to record requests and responses for auditing.
- Select Next.
Deploy
Review the summary, then select Deploy. AI Gateway provisions the server and provides a server URL you'll use when configuring your AI client.
Connect to an AI client
Once your server is deployed, you'll need to add it to the AI client your team uses. Select your client for setup instructions:
Tips
- You can create multiple MCP servers for the same application — for example, a read-only server for reporting agents and a read-write server for automation workflows.
- If you're unsure which OAuth scopes to request, start with the minimum read-only set and add write scopes only when needed. Most application pages include scope recommendations.
- You can edit a server's name, description, timeout, and security settings after deployment without redeploying.
Authentication
Google Cloud Monitoring uses OAuth 2.0 with service accounts for API access. Create a service account in your Google Cloud project with the Monitoring Admin role (or Monitoring Viewer for read-only access) and download a JSON key file. In Google Cloud Console, go to IAM & Admin > Service Accounts, create a service account with the appropriate Monitoring role, and download a JSON key.
| Value | Setting |
|---|---|
| Token endpoint | https://oauth2.googleapis.com/token |
| Scopes | https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/monitoring |
Available tools
These tools let AI agents work with metrics, alerts, notifications, uptime checks, and dashboards. Alerting-related tools are listed first so agents can create policies, inspect open incidents, and manage who gets notified.
Alerting
| Tool | Description |
|---|---|
| Create alert policy | Define when to fire an alert (metric threshold, log match, or ratio) |
| List alert policies | View all alerting policies in a project |
| Get alert policy | Retrieve details of a specific alerting policy |
| Update alert policy | Change thresholds, channels, or enable/disable a policy |
| Delete alert policy | Remove an alerting policy |
| List alerts | View open and closed alert incidents |
| Get alert | Inspect a single alert incident and its related policy |
| Create notification channel | Add an email, Slack, PagerDuty, or other notification endpoint |
| List notification channels | View configured notification channels |
| Get notification channel | Retrieve channel details and verification status |
| Update notification channel | Rename or reconfigure a channel |
| Delete notification channel | Remove a notification channel |
| Send verification code | Deliver a verification code to a new channel |
| Verify notification channel | Confirm ownership of a channel with the verification code |
| List channel types | See which notification channel types are supported |
| Create snooze | Suppress matching alerts during a maintenance window |
| List snoozes | View active and upcoming snoozes |
| Get snooze | Retrieve snooze details |
| Update snooze | Extend or change a snooze window |
Metrics and observability
| Tool | Description |
|---|---|
| List time series | Query metric data using Monitoring filters |
| Write time series | Publish custom metric points |
| Query with PromQL | Run Prometheus-style queries against Cloud Monitoring metrics |
| List metric descriptors | Discover available metric types |
| Get metric descriptor | View details for a specific metric |
| Create metric descriptor | Register a custom metric |
| Delete metric descriptor | Remove a custom metric definition |
| List monitored resources | See resource types you can monitor (VMs, containers, and more) |
Uptime, SLOs, and dashboards
| Tool | Description |
|---|---|
| Create uptime check | Monitor an HTTP/HTTPS endpoint for availability |
| List uptime checks | View configured uptime checks |
| Get uptime check | Retrieve uptime check configuration |
| Update uptime check | Change path, interval, or other check settings |
| Delete uptime check | Remove an uptime check |
| List uptime checker IPs | Get IP addresses used by uptime checkers (for firewall allowlists) |
| Create service | Register a service for service-level monitoring |
| Create SLO | Define a service-level objective (for example, 99.9% availability) |
| List SLOs | View SLOs for a service |
| Create dashboard | Build a custom Monitoring dashboard |
| List dashboards | View existing dashboards |
| Get dashboard | Retrieve a dashboard definition |
| Update dashboard | Change dashboard layout or widgets |
| Delete dashboard | Remove a dashboard |
Tips
Start with alerting policies tied to notification channels your oncall team already uses (email, Slack, or PagerDuty) so new alerts reach the right people immediately.
Use snoozes during planned maintenance instead of disabling policies—alerts resume automatically when the window ends.
Prefer PromQL for ad-hoc metric queries when investigating incidents; it is the modern query path for Cloud Monitoring.
Create uptime checks for customer-facing URLs and allowlist the checker IP ranges in your firewall so checks are not blocked.
Pair this integration with Google Cloud Logging so agents can correlate metric spikes with log evidence for faster root-cause analysis.
Give agents Monitoring Viewer access when they only need to investigate alerts and metrics; use Monitoring Admin when they must create or change policies.
Cequence AI Gateway