Google Cloud

by krzko

58 stars
354 downloads
Not rated
GitHub

About

Integrates with Google Cloud services to provide direct access to Logging, Spanner, and Monitoring resources within conversations through authenticated connections.

Details

Author
krzko
Repository
krzko/google-cloud-mcp
GitHub stars
58
Downloads
354
License
Apache License 2.0
Categories
Cloud Service, Other, Infrastructure, API, Productivity, Developer Tools, Design, File Management, AI, Search, Frontend, Security
Tags
#analytics

- Query and filter log entries from Google Cloud Logging
- Execute SQL queries against Spanner databases
- List available databases and tables in Spanner
- Query metrics with custom filters from Google Cloud Monitoring
- Visualise metric data over time from Monitoring
- List available metric types from Monitoring

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Google Cloud
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 /Users/foo/code/google-cloud-mcp/dist/index.js
    Environment
    • GOOGLE_APPLICATION_CREDENTIALS /Users/foo/.config/gcloud/application_default_credentials.json

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

``bash

This server supports two methods of authentication with Google Cloud:

1. Service Account Key File (Recommended): Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your service account key file. This is the standard Google Cloud authentication method.

2. Environment Variables: Set GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY environment variables directly. This is useful for environments where storing a key file is not practical.

The server will also use the GOOGLE_CLOUD_PROJECT environment variable if set, otherwise it will attempt to determine the project ID from the authentication credentials.

pnpm install

The server supports two methods of authentication:

1. Service Account Key File: Set GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your service account key file
2. Environment Variables: Set
GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY` environment variables

If you're having authentication issues, make sure:

- Your service account has the necessary permissions
- The key file is properly formatted and accessible
- Environment variables are correctly set

gcp-billing-list-accounts

List all billing accounts associated with your Google Cloud project.

gcp-billing-get-account-details

Retrieve details for a specific billing account.

gcp-billing-list-projects

List all projects associated with the billing account.

gcp-billing-get-project-info

Get billing information for a specific project.

gcp-billing-list-services

List all services that are part of the billing account.

gcp-billing-list-skus

List all SKU (Stock Keeping Unit) items available under the billing account.

gcp-billing-analyse-costs

Analyze costs for a specific project over a defined period.

gcp-billing-detect-anomalies

Check for any anomalies in billing for a specified project.

gcp-billing-cost-recommendations

Generate cost recommendations for a specific billing account.

gcp-billing-service-breakdown

Breakdown costs by service for a specific billing account.

gcp-error-reporting-list-groups

List error groups for a specific project.

gcp-error-reporting-get-group-details

Get details for a specific error group.

gcp-error-reporting-analyse-trends

Analyze trends in error reporting for a specific service and project.

gcp-iam-get-project-policy

Retrieve the IAM policy for a specific project.

gcp-iam-test-project-permissions

Test if the user has specific permissions on a project.

gcp-iam-test-resource-permissions

Test if the user has specific permissions on a resource.

gcp-iam-validate-deployment-permissions

Check if the user has permissions required for deployment.

gcp-iam-list-deployment-services

List all services associated with deployment permissions.

gcp-iam-analyse-permission-gaps

Analyze gaps in permissions for a specific deployment.

gcp-logging-query-logs

Query logs based on specific criteria from Google Cloud Logging.

gcp-logging-query-time-range

Query logs for a specific time range.

gcp-logging-search-comprehensive

Perform a comprehensive search for logs.

gcp-spanner-execute-query

Execute a SQL query on a specified Spanner database.

gcp-spanner-list-tables

List all tables in a specified Spanner database.

gcp-spanner-list-instances

List all Spanner instances in a specified project.

gcp-spanner-list-databases

List all databases in a specified Spanner instance.

gcp-spanner-query-natural-language

Query Spanner databases using natural language queries.

gcp-spanner-query-count

Count the number of records that match a specified query in a Spanner database.

gcp-monitoring-query-metrics

Query metrics from Google Cloud Monitoring.

gcp-monitoring-list-metric-types

List all available metric types in Google Cloud Monitoring.

gcp-monitoring-query-natural-language

Query metrics using natural language.

gcp-profiler-list-profiles

List application performance profiles from Google Cloud Profiler.

gcp-profiler-analyse-performance

Analyze application performance and identify bottlenecks.

gcp-profiler-compare-trends

Compare performance trends between different application versions.

gcp-trace-get-trace

Get details for a specific trace by its ID.

gcp-trace-list-traces

List all traces for a specific project.

gcp-trace-find-from-logs

Find traces related to specific log entries.

gcp-trace-query-natural-language

Query traces using natural language.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "google cloud": {
            "env": {
                "GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
            },
            "args": [
                "/Users/foo/code/google-cloud-mcp/dist/index.js"
            ],
            "command": "node"
        }
    }
}

Linux

{
    "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
    },
    "args": [
        "/Users/foo/code/google-cloud-mcp/dist/index.js"
    ],
    "command": "node"
}

Macos

{
    "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
    },
    "args": [
        "/Users/foo/code/google-cloud-mcp/dist/index.js"
    ],
    "command": "node"
}

Windows

{
    "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json"
    },
    "args": [
        "/Users/foo/code/google-cloud-mcp/dist/index.js"
    ],
    "command": "node"
}

Google Cloud MCP Server

A Model Context Protocol server that connects to Google Cloud services to provide context and tools for interacting with your Google Cloud resources.

<a href="https://glama.ai/mcp/servers/@krzko/google-cloud-mcp">
Google Cloud Server MCP server
</a>

Services

Supported Google Cloud services:

- [x] Billing
- [x] Error Reporting
- [x] Identity and Access Management (IAM)
- [x] Logging
- [x] Monitoring
- [x] Profiler
- [x] Spanner
- [x] Trace

Billing

Manage and analyse Google Cloud billing with cost optimisation insights:

Tools: gcp-billing-list-accounts, gcp-billing-get-account-details, gcp-billing-list-projects, gcp-billing-get-project-info, gcp-billing-list-services, gcp-billing-list-skus, gcp-billing-analyse-costs, gcp-billing-detect-anomalies, gcp-billing-cost-recommendations, gcp-billing-service-breakdown

Example prompts:
- "Show me all my billing accounts"
- "Analyse costs for project my-app-prod-123 for the last 30 days"
- "Generate cost recommendations for billing account billingAccounts/123456-789ABC-DEF012"
- "Check for billing anomalies in project my-ecommerce-456"

Error Reporting

Monitor and analyse application errors with automated investigation and remediation suggestions:

Tools: gcp-error-reporting-list-groups, gcp-error-reporting-get-group-details, gcp-error-reporting-analyse-trends

Example prompts:
- "Show me error groups from project my-webapp-prod-789 for the last hour"
- "Get details for error group projects/my-app-123/groups/xyz789"
- "Analyse error trends for service my-api in project analytics-prod-456"

IAM

Query and analyse IAM policies and permissions:

Tools: gcp-iam-get-project-policy, gcp-iam-test-project-permissions, gcp-iam-test-resource-permissions, gcp-iam-validate-deployment-permissions, gcp-iam-list-deployment-services, gcp-iam-analyse-permission-gaps

Example prompts:
- "Get IAM policy for project my-webapp-prod-123"
- "Test if I have storage.buckets.create permission on project data-lake-456"
- "Check deployment permissions for Cloud Run in project microservices-789"
- "Analyse permission gaps for deploying to GKE cluster in project k8s-prod-321"

Logging

Query and filter log entries from Google Cloud Logging:

Tools: gcp-logging-query-logs, gcp-logging-query-time-range, gcp-logging-search-comprehensive

Example prompts:
- "Show me logs from project my-app-prod-123 from the last hour with severity ERROR"
- "Search for logs containing 'timeout' from service my-api in project backend-456"
- "Query logs for resource type gce_instance in project compute-prod-789"

Spanner

Interact with Google Cloud Spanner databases:

Tools: gcp-spanner-execute-query, gcp-spanner-list-tables, gcp-spanner-list-instances, gcp-spanner-list-databases, gcp-spanner-query-natural-language, gcp-spanner-query-count

Example prompts:
- "List all databases in Spanner instance my-instance in project ecommerce-prod-123"
- "Execute SQL: SELECT COUNT() FROM users in database user-db in project my-app-456"
- "Show me table structure for orders in database inventory-db in project retail-789"

Monitoring

Retrieve and analyse metrics from Google Cloud Monitoring:

Tools: gcp-monitoring-query-metrics, gcp-monitoring-list-metric-types, gcp-monitoring-query-natural-language

Example prompts:
- "Show me CPU utilisation metrics for project web-app-prod-123 for the last 6 hours"
- "List available metric types for Compute Engine in project infrastructure-456"
- "Query memory usage for instances in project backend-services-789"

Profiler

Analyse application performance with Google Cloud Profiler:

Tools: gcp-profiler-list-profiles, gcp-profiler-analyse-performance, gcp-profiler-compare-trends

Example prompts:
- "List CPU profiles from project my-java-app-123 for the last 24 hours"
- "Analyse performance bottlenecks in service my-api in project backend-prod-456"
- "Compare heap profiles for deployment v1.2 vs v1.3 in project performance-test-789"

Trace

Analyse distributed traces from Google Cloud Trace:

Tools: gcp-trace-get-trace, gcp-trace-list-traces, gcp-trace-find-from-logs, gcp-trace-query-natural-language

Example prompts:*
- "Get trace details for ID abc123def456 in project distributed-app-789"
- "Show me failed traces from project microservices-prod-123 from the last hour"
- "Find logs related to trace xyz789 in project web-backend-456"
- "Query traces for service checkout-api in project ecommerce-prod-321"

Quick Start

Once configured, you can interact with Google Cloud services using natural language:

"What are my current billing costs for project my-webapp-prod-123?"
"Show me errors from project ecommerce-api-456 in the last hour"
"Check if I have permission to deploy to Cloud Run in project microservices-789"
"Find logs containing 'database timeout' from project backend-prod-321 yesterday"
"List Spanner databases in instance prod-db for project data-store-654"
"What's the CPU usage of Compute Engine instances in project infrastructure-987?"

Authentication

This server supports two methods of authentication with Google Cloud:

1. Service Account Key File (Recommended): Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your service account key file. This is the standard Google Cloud authentication method.

2. Environment Variables: Set GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY environment variables directly. This is useful for environments where storing a key file is not practical.

The server will also use the GOOGLE_CLOUD_PROJECT environment variable if set, otherwise it will attempt to determine the project ID from the authentication credentials.

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.