Database Insights Source

The “databaseinsights” source provides a client for the Google Cloud Database Insights API.

About

The databaseinsights source provides a client to interact with the Google Cloud Database Insights API (databaseinsights.googleapis.com). This source supports the Advanced Query Insights tools that are available via the remote Database Insights MCP Server, allowing tools to retrieve query performance statistics, wait event metrics, time-series trends, and index recommendations for Google Cloud databases like AlloyDB.

Authentication is handled via Application Default Credentials (ADC) using OAuth 2.0 access tokens.

Available Tools

Database Insights Source Tools

Tool NameDescription
databaseinsights-get-advanced-aggregated-query-statsFetches aggregated query performance statistics (latency, execution count, wait time) for AlloyDB instances.
databaseinsights-get-advanced-aggregated-wait-event-statsFetches aggregated wait event statistics for AlloyDB instances to identify performance bottlenecks.
databaseinsights-get-advanced-time-series-query-statsFetches time-series performance trends for queries executed on AlloyDB instances.
databaseinsights-get-advanced-time-series-wait-event-statsFetches time-series wait event statistics for AlloyDB instances over time.
databaseinsights-get-index-recommendationsFetches index recommendations for specified query IDs across databases on AlloyDB instances.

Requirements

API Enablement

Enable the required Google Cloud APIs on your target project:

  • AlloyDB API (alloydb.googleapis.com)
  • Database Insights API (databaseinsights.googleapis.com)

Roles required to enable APIs: To enable APIs, you need the serviceusage.services.enable permission. If you created the project, you likely already have this permission through the Owner role (roles/owner). Otherwise, you can obtain this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).

IAM Roles & Permissions

To query performance metrics, wait events, and index recommendations, grant the appropriate IAM roles on the target project or database location:

  • View Cloud Monitoring data: Monitoring Viewer (roles/monitoring.viewer)
  • View Database Insights data: Database Insights Viewer (roles/databaseinsights.viewer)

Fine-grained Database Insights permissions:

  • Get advanced aggregated query statistics: databaseinsights.queryStats.fetch
  • Get advanced time series query statistics: databaseinsights.queryTimeSeries.fetch
  • Get advanced aggregated wait event statistics: databaseinsights.waitEventStats.fetch
  • Get advanced time series wait event statistics: databaseinsights.waitEventTimeSeries.fetch
  • Get index recommendations: databaseinsights.indexRecommendations.batchQuery, databaseinsights.recommendations.query, databaseinsights.resourceRecommendations.query

Example

kind: source
name: database-insights-source
type: databaseinsights
---
kind: source
name: custom-project-database-insights
type: databaseinsights
project: my-quota-project

Reference

fieldtyperequireddescription
typestringtrueMust be “databaseinsights”.
projectstringfalseThe Google Cloud project ID to use as a fallback billing/quota project for API calls if not extracted from the resource path.
endpointstringfalseOverride API endpoint URL (e.g., for staging or testing environments). Defaults to https://databaseinsights.googleapis.com.

Additional Resources




Last modified August 14, 2026: chore(main): release 1.9.0 (#3744) (5de8f13)