Get the FREE Ultimate OpenClaw Setup Guide →

google-cloud

🤖 A Model Context Protocol (MCP) server for Google Cloud (GCP)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio krzko-google-cloud-mcp node dist/index.js \
  --env GOOGLE_APPLICATION_CREDENTIALS="<path-to-service-account-key-json>"

How to use

This Google Cloud MCP Server provides a collection of tools and prompts to interact with a range of Google Cloud services (Billing, Error Reporting, IAM, Logging, Monitoring, Profiler, Spanner, and Trace) through natural language. Each service exposes a set of dedicated tools (for example, gcp-billing-list-accounts, gcp-logging-query-logs, gcp-spanner-list-tables, gcp-trace-list-traces) that you can invoke via natural prompts in your MCP client. Use the provided mcpServers configuration to connect the server to your client, then query or guide the server with natural language prompts like “Show me billing accounts” or “List Spanner databases in instance prod-db.” The server will translate your prompts into targeted Google Cloud API calls and return structured results and insights.

How to install

Prerequisites:

  • Node.js (recommended LTS) and a compatible package manager (e.g., npm or pnpm)
  • Access to a Google Cloud project with appropriate IAM permissions and a service account key (if using a key file)

Installation steps:

  1. Clone the repository git clone https://github.com/krzko/google-cloud-mcp.git cd google-cloud-mcp

  2. Install dependencies npm install

    or with pnpm if used by the project

    pnpm install

  3. Build the project (if applicable) npm run build

    or

    pnpm build

  4. Run the server locally npm run start

    or

    pnpm start

  5. Prepare authentication

    • Option A: Create and download a service account key file and set this path: export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account.json"
    • Option B: Set the following environment variables directly: export GOOGLE_CLIENT_EMAIL="your-service-account-email@project.iam.gserviceaccount.com" export GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
  6. Configure your MCP client’s mcpServers section to point to the server (see example below).

Additional notes

Tips and common considerations:

  • Authentication: Use a service account key file or directly provide GOOGLE_CLIENT_EMAIL and GOOGLE_PRIVATE_KEY. The server will also use GOOGLE_CLOUD_PROJECT if set, or determine the project from credentials.
  • Environment management: Keep sensitive credentials secure. Use environment variable injection or a mounted credentials file in production deployments.
  • Debugging: If you encounter timeouts or authentication issues, enable verbose logging in your MCP client configuration and verify credentials are accessible by the server process.
  • Versioning: Ensure your Google Cloud SDK and libraries are compatible with the MCP server version you’re running.
  • Network access: Ensure your server can reach Google Cloud endpoints from its running environment (firewall rules, proxies, and VPC settings may affect connectivity).

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗