
谷歌云
STDIO谷歌云日志、监控和Spanner数据库管理服务器
谷歌云日志、监控和Spanner数据库管理服务器
A Model Context Protocol server that connects to Google Cloud services to provide context and tools for interacting with your Google Cloud resources.
Supported Google Cloud services:
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:
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:
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:
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:
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:
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:
Analyse application performance with Google Cloud Profiler:
Tools: gcp-profiler-list-profiles
, gcp-profiler-analyse-performance
, gcp-profiler-compare-trends
Example prompts:
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:
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?"
This server supports two methods of authentication with Google Cloud:
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.
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.
# Clone the repository git clone https://github.com/krzko/google-cloud-mcp.git cd google-cloud-mcp # Install dependencies pnpm install # Build pnpm build
Authenticate to Google Cloud:
gcloud auth application-default login
Configure the mcpServers
in your client:
{ "mcpServers": { "google-cloud-mcp": { "command": "node", "args": [ "/Users/foo/code/google-cloud-mcp/dist/index.js" ], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "/Users/foo/.config/gcloud/application_default_credentials.json" } } } }
# Build the project pnpm build # Start the server pnpm start
# Build the project pnpm build # Start the server and inspector npx -y @modelcontextprotocol/inspector node dist/index.js
If you encounter timeout issues when running the server with Smithery, try the following:
debug: true
in your configurationlazyAuth: true
is set to defer authentication until it's actually neededImportant: Authentication is still required for operation, but with lazy loading enabled, the server will start immediately and authenticate when needed rather than during initialization.
The server supports two methods of authentication:
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of your service account key fileGOOGLE_CLIENT_EMAIL
and GOOGLE_PRIVATE_KEY
environment variablesIf you're having authentication issues, make sure: